[antlr-interest] Unexpected token at the end of my grammar file

Terence Parr parrt at cs.usfca.edu
Thu May 31 14:53:53 PDT 2007


On May 31, 2007, at 2:42 PM, Benjamin Niemann wrote:

> troy runkel wrote:
>
>> I've just recently started working with ANTLR v3 and am in the  
>> process
>> of putting together a T-SQL grammar.  Whenever I run ANTLR on the
>> grammar file I get the following error message.
>>
>>      ANTLR Parser Generator  Version 3.0 (May 17, 2007)  1989-2007
>>      error(100): TSQL.g:1630:1: syntax error: antlr: TSQL.g:1630:1:
>> unexpected token: null
>>
>> The error occurs on the last line of the grammar file, which is  
>> blank.
>>  Any ideas what might be causing the error message?  Thanks.
>
> Not without seeing the complete grammar. Error handling/reporting  
> in ANTLR3
> is, well, rather suboptimal and sometimes misleading.

Really?  It's MUCH better than v2 and I'm impressed with it.  Can you  
give an example?

Ter


More information about the antlr-interest mailing list