Clearly a function which raises an exception does not return the result you are expecting, in my tests it appears to return 0 or nil depending on type.
I don't know what the language spec says, I could not find a reference to this.
In general I would not expect that after an exception any results from an inner function or procedure could be relied on (i.e. result or var parameters).
On a style note, it could be considered debatable whether end of file is an unexpected condition. Sure its an error condition, just maybe not an exception?
Either way, I would prefer to deallocate resources closer to where they are allocated, especially in an exception condition.
In a recursive descent parser, an end of file condition could be handled by ending the current block normally. This would leave a sane parse tree even if not syntactically valid.