[antlr-interest] Error while generating syntax diagram with ANTLRWorks

Dennis Benzinger Dennis.Benzinger at gmx.net
Wed Mar 4 08:09:31 PST 2009


Hi!

I have a separat lexer and parser grammar and want to generate syntax
diagrams for both by using ANTLRWorks (the org.antlr.works.Console
class). Creating the lexer diagrams works fine but during the creation
of the parser diagrams ANTLRWorks emits the following error message for
every rule:

error(3):  cannot find tokens file grammar/output/XYZLexer.tokens

I suppose the reason for this error is that ANTLRWorks tries to load the
tokens file which is generated while generating the lexer. But my lexer
and parser is not generated into the grammar directory but into a src
directory, therefore ANTLRWorks cannot find the tokens file.

The lexer diagrams are created nevertheless and they look OK so I'm
wondering why ANTLRWorks needs the tokens file.


Dennis Benzinger


More information about the antlr-interest mailing list