[antlr-interest] Semantic Predicates invoking locally defined methods
Foolish Ewe
foolishewe at hotmail.com
Tue Nov 21 12:17:41 PST 2006
Hello All:
Thanks for the hints. I'm using ANTLRworks 1.0b6 with ANTLR 3.0b5 (the
latest and greatest
on both).
I am getting errors using separate compilation. I would like to divide my
compiler into a frontend
and backend. My frontend would include my .g file (the ANTLR language part)
and some
additional classes in files written in java. I would like all the frontend
files to be in the same
java package (we use Eclipse here) so that I can reference my own classes in
the
actions of the ANTLR grammar. In the ANTLR source I have created
@lexer::header{}
and @parser::header{} regions, have the filenames/package names match
between ANTLR
and java, however, when I try to build the program in ANTLRworks, ANTLRworks
complains
that the symbol associated with my class cannot be found. These errors
appear to be
java compilation issues. When I go to look at the parser and lexer java
files, they don't
appear updated (perhaps since the compilation failed).
On a side note, I wish ANTLR would allow for a single optional region that
would come
first in all files, and then allow for optional lexer and parser specific
header sections that
would follow it in the generated code.
Any help would be appreciated.
Thanks:
Bill M.
_________________________________________________________________
All-in-one security and maintenance for your PC. Get a free 90-day trial!
http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://clk.atdmt.com/MSN/go/msnnkwlo0050000001msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail
More information about the antlr-interest
mailing list