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






List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to