[antlr-interest] ISSUE: ANTLR only looks in output directory for XXXTokenTypes.txt file

micheal_jor open.zone at virgin.net
Fri May 2 04:05:17 PDT 2003


Hi,

Just came across this issue in ANTLR 2.7.2.

Scenario: 
a) All ANTLR source files (i.e. *.g and *TokenTypes.txt) are in a dir 
named "source". 
b) All output should be directed to a directory named "output".
c) MyParser.g importVocab's "MyLexer".
d) MyLexerTokenTypes.txt *IS* in the "source" directory.

Command:
    java -cp antlr.jar antlr.Tool -o output source/MyParser.g 

Result:
    panic: Cannot find importVocab file 'MyLexerTokenTypes.txt'

Comments:
1) I feel it's reasonable to expect that ANTLR would search the 
directory where it's main source file - the MyParser.g - file is 
located for any dependencies.
2) If it is different from the source directory, the output directory 
should then be searched as well.
3) Is there a need for a specific command-line option that suggests 
*additional* directories to include in the search?


Cheers,

Micheal



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list