[antlr-interest] Writing a two pass compiler.
olczyk2002 at yahoo.com
Thu Jan 20 20:47:23 PST 2005
First, I sent this message via gmane.
It has been two hours since I sent it,
and it has not shown up here, so I assume
that it did not go through ( many groups
on gmane do that ). If it did but I did
not see it yet, my appologies for sending
this message twice.
I have a grammar for a language which I discover is
written quite poorly. Certain types of strings can
have different meanings depending on context, so
I cannot unambiguously tokenise the strings.
Mainly this is do to the fact that there is
no way to distinguish text data from "source".
Having examined the language closely, I believe it
can be parsed using antlr to generate a two pass
compiler. Pass2 being a context sensitive parse.
A difficuly for me is that I've only written a few
very trivial parsers ( at the calcualtor level ). I
was wondering if there were any simple samples of
antlr being used to implement a two pass compiler to
me along the way.
Thaddeus L. Olczyk
PS: Something going for me is that the language is
relatively simple. I suspect that most people parse
it using regular expressions, but I would like to have
a more genric solution.
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
More information about the antlr-interest