[antlr-interest] Re: [C++] How to init variables of MyParser ?
Ruslan Zasukhin
sunshine at public.kherson.ua
Wed Sep 3 12:27:07 PDT 2003
on 9/3/03 10:17 PM, izniegoed at klaren at cs.utwente.nl wrote:
> Hi,
>
> --- In antlr-interest at yahoogroups.com, Ruslan Zasukhin <sunshine at p...>
> wrote:
>> Question is, how I can make ANTLR to generate C++ sources that will init
>> mstream on construction of parser instance ???
>
> I see two options:
>
> 1. Use constructors with different signatures as the default ones
> provided by antlr.
>
> 2. Turn of generation of default constructors. (development versions
> contain a option for it) if you use it you have to provide all
> constructors yourself.
But I suggest other way:
Each constructor generated by ANTLR should call some empty function.
And we can implement this function in grammar. Or this can be as option in
Parser class.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list