[antlr-interest] A simple prepocessor with a lexer?
maaxxxcal
maaxxxcal at yahoo.com
Sat Oct 4 20:21:05 PDT 2003
I am trying to write a very simple preprocessor but I'm not quite
sure how to go about it.
Here's the problem, I need to process pragmas that are really inside
single-line comments in a SQL script (not necessarily from the start
of line).
For instance, I can have input of the form:
<sql>
...
<sql> -- <pragma>
...
<sql>
What is the simplest way to achieve this with ANTLR? Is a lexer
enough as long as the syntax of the pragma is not too complex?
I tried writing such a lexer but I'm having trouble defining a rule
that would match "anything until --"
Thanks for your help!
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list