1441Re: importVocab and output directories
- Mar 1, 2000
>I'd like to adopt a somehow reverted viewpoint:working,
> In the world of programming environments, we are used to a kind of
> where a file ``knows'', what it is dependent of. E.g. a C source``knows'',
> which header files it relies upon, a Java source ``knows'', what other[ proposal to implement dependency generation for antlr snipped ]
> class-files it is dependent of, ...
I think these issues are related, but different.
A C source file knows that it depends on an include file, for example
"#include <stdio.h>". It doesn't know where stdio.h lives, and nor should
it. It might live in a different place different machines, and that kind of
dependency shouldn't be reflected in the source code.
For something like "cc -M" to work, cc also needs to know where to go
looking for include files if they aren't all in the same directory. Without
that information, it can't generate a list of dependencies. Not to mention
not being able to compile the code.
importVocab says bring in the vocabulary with this name. At the moment,
antlr assumes that it must be in the current directory. I'd really like to
be able to tell antlr to look somewhere else.
I can also see the value of a -M option for antlr to generate dependencies,
but it is less critical. I have autogeneration of dependencies for C/C++,
and depend on it. But I have 2-3 orders of magnitude more C++ files than
antlr files, so maintaining antlr dependencies by hand is a little less
- << Previous post in topic