[antlr-interest] Java grammar v3.0, missing references.

Vidar Håkestad vidar at hawkis.com
Thu Apr 20 07:55:00 PDT 2006


Downloaded antlrWorks, and the grammar examples 'examples-v3.tar.gz'.
Works stated 'missing references':
NUM_LONG and
NUM_DOUBLE

I added two lexer rules as follows:

NUM_LONG
	: NUM_INT
	;

NUM_DOUBLE
	: NUM_FLOAT
	;

and antlrWorks stopped complaining. I don't know if this is a full workaround, 
but the rules for NUM_INT and NUM_FLOAT does not seem to have any 
restrictions on how many digits they are allowed to gobble.
Another way to do this is to remove them from the constant production (because 
they are not referenced anywhere else). 

If the intent is to differenciate between long and short values, I suppose a 
more laborate solution must be created?

Regards,
Hawkis


More information about the antlr-interest mailing list