[antlr-interest] Questions to Java.g
Terence Parr
parrt at cs.usfca.edu
Sun Jul 15 11:31:55 PDT 2007
On Jul 15, 2007, at 9:38 AM, Andreas wrote:
> mail.acc at freenet.de schrieb:
>> 2nd:
>> I made further tests with this grammar and by chance noticed
>> something weird. This time I have an valid Java file, but Java.g
>> reported an lexer-error (at least I think it is an lexer-error).
>> But it occurs only in this special situation.
>> If the last line of the file ends with an single line comment, and
>> if there is no newline after this, I get the following error:
>>> line 2:12 mismatched character '<EOF>' expecting 'n'
>> Input:
>> ---------------------
>> public class Code {}
>> // End Class
>> ---------------------
Yeah, i should modify comments to have EOF as valid terminator. UNIX
doesn't like files w/o final new line so I didnt' bother before.
Ter
More information about the antlr-interest
mailing list