[antlr-interest] Antlr v4 - C++ target

Gokulakannan Somasundaram gokul007 at gmail.com
Tue Jan 24 09:20:34 PST 2012


Hi Ruslan,


> > d) Its going to have Exception handling
>
> Sense?
>
>    My humble opinion is that, if we choose to work with a language, then
we should not design stuffs that go against the very purpose the language
was created. I hope you understand, when you say no to Exception handling,
you are saying no to destructors & stack based allocations. To me, its like
asking for a Java target, with GC disabled.


> > e) I am going to replace structures like string, vector, stack, hash map,
> > list etc with data structures in C++
>
> Very against !!


> Why ??
>
> Just use C-target  things...
>
> OR at least NOT use std::strings ...
>
> Same argument here. But I am designing things with a level of flexibility.
So it is going to be std::string by default, but you can just change the
compile time trait and provide a alternate implementation, where in you can
put ANTLR3_STRING/alternate impl of course, if you wish.

I am designing things without being based on boost. But i cannot design
something not based on std. Instead i would try to provide compile time
traits to replace the data structures with the user preferred one. I need
templates to provide this flexibility without runtime performance hit. I
will definitely make sure to keep compile time performance in mind.

Thanks,
Gokul.


More information about the antlr-interest mailing list