[antlr-interest] No errors on missing tokens?

Bill Andersen andersen at highfleet.com
Tue Jun 28 10:34:39 PDT 2011


Partial answer to my own question, in case anyone is interested.

I added all the missing token definitions to my lexer.  When I then compiled the lexer and parser and looked at the .tokens files, all the tokens and their type #s lined up.  So it seems that:

1) Given a complete lexer, the compilation of the parser grammar is using the lexer's .tokens properly

2) Compiling the parser yielded no errors for a complete lexer .tokens file

3) Compiling the parser signalled no errors for an incomplete lexer .tokens file


On Jun 27, 2011, at 22:21 , Bill Andersen wrote:

> Hi Folks
> 
> I have a grammar split into a lexer grammar and parser grammar
> 
> I have not yet defined all the token types in the lexer, so the parser grammar is making reference to tokens that are not in the lexer .tokens file.  The lexer .tokens file has a max token # of 108.  This should produce errors but is not.  BTW, compiling the parser grammar yields a .tokens file with a max token # of 158.  
> 
> Can anyone tell me what's going on here?  Thanks
> 
> 	.bill
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Bill Andersen 
Highfleet, Inc. (www.highfleet.com)
3600 O'Donnell Street, Suite 600
Baltimore, MD 21224
Office: +1.410.675.1201
Cell: +1.443.858.6444
Fax: +1.410.675.1204







More information about the antlr-interest mailing list