[antlr-interest] Syntax errors (masked by -diagnostic option)
Ramanand Mandayam
ramanand_mandayam at yahoo.com
Sat Jul 10 00:41:03 PDT 2010
Hi
I am using antlr-3.2.jar obtained from the antlr.org website and am trying to
process a lexical grammar as follows:
> java -cp /usr/local/antlr/antlr-3.2.jar antlr.Tool -o . Vlogpp_bug.g
I get the following error:
Vlogpp_bug.g:23:2: Syntax error in action: Vlogpp_bug.g:23:2: unexpected
char: '$'
However when I use the -diagnostic option then I do not see a syntax error but a
few warnings:
> java -cp /usr/local/antlr/antlr-3.2.jar antlr.Tool -o . -diagnostic
Vlogpp_bug.g
ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
Generating vlg_Lexer.txt
Vlogpp_bug.g:23: warning:lexical nondeterminism upon
Vlogpp_bug.g:23: k==1:'*'
Vlogpp_bug.g:23: k==2:'/'
Vlogpp_bug.g:23: between alt 1 and exit branch of block
Generating vlg_LexerTokenTypes.txt
Generating vlg_LexerTokenTypes.txt
Any help would be appreciated.
Cheers
Ramanand Mandayam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Vlogpp_bug.g
Type: application/octet-stream
Size: 502 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20100710/3d950851/attachment.obj
More information about the antlr-interest
mailing list