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

Ric Klaren klaren at cs.utwente.nl
Fri May 2 05:22:10 PDT 2003


Hi,

On Fri, May 02, 2003 at 11:05:17AM -0000, micheal_jor wrote:
> Just came across this issue in ANTLR 2.7.2.

Think that's been present since ever ;)

> 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.

I had a look at this stuff when I ran into it with my project well slightly
different problem but anyway... It is fixable but not completely trivial
needs some restructuring here and there. At the time it was a lot easier to
just solve it by copying TokenTypes.txt files around in my makefiles.

> 3) Is there a need for a specific command-line option that suggests 
> *additional* directories to include in the search?

Ouch the C-word *ducks for cover because Terence will come stampeding down
any moment now* ;)

Seriously though this is IMHO a good idea. Would make my life somewhat
easier as well.

Don't have really time to look at it atm. Will be at least 2 weeks before I
can spend some time on antlr. Hopefully I can get a snapshot with configure
build and MSVC fixes out then.

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
 Why don't we just invite them to dinner and massacre them all when they're
  drunk? You heard the man. There's seven hundred thousand of them. Ah? ..
           So it'd have to be something simple with pasta, then.
                 From: Interesting Times by Terry Pratchet


 

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




More information about the antlr-interest mailing list