[antlr-interest] ‘Cannot find tokens file’

Hendrik Maryns qwizv9b02 at sneakemail.com
Thu Nov 6 06:43:21 PST 2008


Hi,

I split up my grammar into three parts, inspired by

So now I have fsqLexer.g, fsqParser.g and fsqTreeParser.g.  The latter
complains that ‘(3): cannot find tokens file
<unset-dir>/fsqParser.tokens’.  Indeed, there is no file
fsqParser.tokens.  fsqParser.g compiles fine, and even from the command
line, no tokens file is created.  What is the solution to this?

fsqTreeParser.g contains the following:

options {
  language = Java;
  ASTLabelType = CommonTree;
  tokenVocab = fsqParser;
}

fsqParser.g

options {
  language = Java;
  output = AST;
  tokenVocab = fsqLexer;
}

fsqLexer.java and fsqParser.java are successfully created,
fsqTreeParser.java is not.

Thanks for suggestions, H.
-- 
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20081106/62fb9de4/attachment.bin 


More information about the antlr-interest mailing list