[prev in list] [next in list] [prev in thread] [next in thread] 

List:       antlr-dev
Subject:    [antlr-dev] what about -o?
From:       ric.klaren () gmail ! com (Ric Klaren)
Date:       2007-02-12 10:16:15
Message-ID: bc607a4e0702120216l64f90903l8d347894e08d6823 () mail ! gmail ! com
[Download RAW message or body]

Hi,

On 2/11/07, Terence Parr <parrt at cs.usfca.edu> wrote:
> so, if they use -o to redirect .java files to another dir, should I do
>
> ../other/TParser.java : T.g
>
> including path in dependency?

I think that should be a yes. Keeping to the philosophy that you'd run
the tool as you would run it to generate the files with just the
-depend added. Although this often depends a bit on the structure of
the project and on how and where antlr is run.

How does -depend work at the moment? You run it at a point with all
the input files (e.g. the directory where it is run can differ from
the normal invocation directory of antlr?)

Or do you run it in a directory including the right options for
finding supergrammars and importVocabularies upon which antlr then
looks at those and loads them? In that case I think it would be
sufficient to look one level deep.

In the latter case it's a full yes to the question. In the other it's
more of a it depends, in that case it's probably best to provide some
prefix variable (per directory where .g files are found) which can be
filled in by the environment... If you get my drift. (The the build
environment can glue things together as needed)

Or maybe provide a few flavours of -depend.

1. Generate one big dependency thing.
2. Generate a dependency file per directory where an antlr grammar is
found. (This would
    require specifying the file in which dependencies would have to be
written with
    some option)

Not sure there's an overengineering monster looming on the horizon is
my feeling a bit.

Maybe it's an idea to ask for opinions on the normal list. My guess
would be that there's multiple people who have had issues with
integrating antlr(2) in their build environments (especially with -o
and importing vocabularies).

By the way does -o also write the generated tokenvocabulary files to
the output directory?

Cheers,

Ric

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic