What version of antlr?

 

Jim

 

From: [email protected] [mailto:[email protected]] On
Behalf Of Trevor
Sent: Monday, September 27, 2010 2:15 PM
To: [email protected]
Subject: [antlr-dev] ANTLR -depend broken for C target

 

[I'm new to ANTLR, so please let me know if this is a known issue, and if
not, if I should attempt to file a bug for it.]

 

I'm trying to add ANTLR support to Boost.Build
<http://www.boost.org/doc/html/bbv2.html> , based on the ANTLR -depend
feature, but -depend seems to output incorrect target filenames for
language=C. For example, for a lexer grammar X, it incorrect adds the suffix
"Lexer" to the header filename:

 

X.c : X.g

.\X.tokens : X.g

XLexer.h : X.g

 

For grammars using "import", the problem is a bit more severe. For composite
grammar B, which imports lexer grammar L and parser grammar A, -depend
outputs:

 

B.g: L.g, A.g

BParser.c : B.g

.\B.tokens : B.g

BParser.h : B.g

BLexer.c : B.g

BLexer.h : B.g

B_L.c : B.g

B_A.c : B.g

 

However, the actual files generated by ANTLR, with just B.g on the command
line, are:

 

A.tokens

B.tokens

BParser.c

BParser.h

B_A.c

B_A.h

 

Note that the lexer isn't generated at all. Is this to be expected? Also
putting L.g on the command line addresses this, but then of course the
output files are L.h and L.c, which don't match the -depend output for B.g.

 

Thanks for any guidance,

Trevor

 

_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev

Reply via email to