[antlr-interest] Antlrworks 1.1.3 hangs when generating code
Jeremy Sheldon
Jeremy.Sheldon at 90degreesoftware.com
Thu Sep 20 13:17:05 PDT 2007
Hi all,
I'll start by saying that I've just started learning to use Antlr (and
AntlrWorks), so forgive the possible foolish questions.
I've got a grammar file which I'm trying to generate the code for. When
I do this inside AntlrWorks, it seems to go on processing forever.
Looking at the output directory, the lexer appears in the directory,
however the parser does not. 'Check Grammar' runs successfully, though.
Given that I was not sure whether this was an issue with my grammar or
AntlrWorks, I decided to try and generate the code on the command line
(WinXP, btw). This returned some strange (and basic-looking)
complaints:
Grammar\DMLSQL2>java antlr.Tool DmlSQL2.g
ANTLR Parser Generator Version 2.7.7 (20060906) 1989-2005
DmlSQL2.g:81:1: unexpected token: grammar
error: Token stream error reading grammar(s):
DmlSQL2.g:91:1: unexpected char: '@'
DmlSQL2.g:81:1: rule grammar trapped:
DmlSQL2.g:81:1: unexpected token: grammar
TokenStreamException: unexpected char: '@'
I've got two questions for your collective wisdom:
1) Has anyone else run into (or heard of) the same issue with
AntlrWorks, where it will seem to process (or loop) forever when
generating code? Can anyone shed any light on this behavior?
2) When running the tool from the command line, it's returning an
error with the 'grammar' token. Is this not a basic like which is at
the top of any grammar? I'm confused that it's complaining about such
an apparently basic part of the grammar file.
P.S. I was not sure if this mailing list would accept attachments, so I
did not try to attach the offending grammar.
Thanks for your time in advance!
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070920/1628d898/attachment.html
More information about the antlr-interest
mailing list