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

Terence Parr parrt at cs.usfca.edu
Thu May 31 15:23:37 PDT 2007


Oh, my bad.  ANTLR v3 grammars are recognized by  a v2 at the  
moment.  I have not made any attempt to emit good error messages.  I  
was speaking about the generated parsers, which are much better.  I  
am in the process of rewriting v3 in v3.
Ter
On May 31, 2007, at 3:11 PM, troy runkel wrote:

> I think I may have solved this on my own.  The last thing in my
> grammar file was a multi-line C-style comment like this.
>
>     /**********************************
>      * some comments               *
>      **********************************/
>
> I removed the comment so that an ANTLR rule was the last thing in the
> file and the error message went away.
>
> Troy Runkel
>
>
> On 5/31/07, troy runkel <trunkel at gmail.com> wrote:
>> Greetings,
>>
>> 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.
>>
>> Troy Runkel
>>



More information about the antlr-interest mailing list