[antlr-interest] C/C# pre-processor
Kamal Verma
kverma at hotmail.com
Wed Jul 27 04:54:08 PDT 2005
I mean both.
A pre-processor using ANTLR which is part of ANTLR factory or utilities
classes. Or some other set of pre-processor techniques that can be used
along with ANTLR.
In general, preprocessing is 1st step that a language developer (one who
works with language) needs before lexing. As I learnt from the antlr
discussions and other on the web I found various strategies folks has
implemented. There is no one set way to do it.
I think for ANTLR to be more useful tool it is needed that we have a nice
way to pre-process a langauge. Also, since everyone says it is not that
complex, we can code these preprocessor utilites as factory classes once and
make it part of standard ANTLR runtimes.
Wouldn't it be nice if we are able to do following,
----8<----
Stream s = File.OpenText("somefile.code");
CSPreprocessor pp = new CSPreprocessor(s, "DEBUG;CPP;SOMECONST");
MyLexer lexer = new MyLexer(pp);
MyParser parser = new MyParser(lexer);
parser.main();
----8<----
_K
>From: Bryan Ewbank <ewbank at gmail.com>
>Reply-To: Bryan Ewbank <ewbank at gmail.com>
>To: antlr-interest at antlr.org
>Subject: Re: [antlr-interest] C/C# pre-processor
>Date: Wed, 27 Jul 2005 06:41:11 -0400
>
>Do you mean parsing it with antlr, or using it in the context of
>antlr, or something else?
>
>On 7/26/05, Kamal Verma <kverma at hotmail.com> wrote:
> > Does anybody have any experience with C/C++/C# preprocessor.
> > I am new to antlr, any help in this direction will be of great help.
>
>If you are wanting information on using it, most any C manual will
>have a chapter or two...
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
More information about the antlr-interest
mailing list