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

Udo Weik WeikEngOff at aol.com
Tue Jan 24 00:28:27 PST 2012


Hello Jim,

> Don't use templates.
>
> Sigh.

Why?


Greetings
Udo

>> -----Original Message-----
>> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
>> bounces at antlr.org] On Behalf Of Gokulakannan Somasundaram
>> Sent: Monday, January 23, 2012 8:12 PM
>> To: Terence Parr
>> Cc: antlr-interest at antlr.org
>> Subject: Re: [antlr-interest] Antlr v4 - C++ target
>>
>> Hi All,
>>           I have decided to spend some time to come up with a C++ Target
>> for ANTLR 3.4, as i need it desperately for my project. I have started
>> working on it and i am going to come with a initial version within a
>> week or two.
>> My ideas
>> a) The details of the parser related functionality will be stolen from
>> C Target
>> b) It is not going to have function pointers/virtual functions. Its
>> going to be all templates
>> c) It is going to be a header-only library.
>> d) Its going to have Exception handling
>> e) I am going to replace structures like string, vector, stack, hash
>> map, list etc with data structures in C++
>> f) I am trying to make it as much type-safe as possible
>>
>> But Since i don't have much experience with building Trees, i am not
>> going to touch the .stg files of the Tree Parser. I need some-one to
>> take it up, once i put out the first version.
>>
>> Any suggestions?
>>
>> Thanks,
>> Gokul.
>>
>> On Sat, Jan 21, 2012 at 4:35 PM, Gokulakannan Somasundaram<
>> gokul007 at gmail.com>  wrote:
>>
>>> it is v3. Some of the function pointers have been converted to member
>>> functions. It basically has removed the flexibility of overriding
>> some
>>> of the token related functions. But the performance gain is that the
>>> space occupied by those function pointers are saved. So this patch
>> can
>>> be considered by those who use C++, don't want to override any of the
>>> token specific functionality ( which will definitely be useful to
>> many ).
>>>
>>> Gokul.
>>>
>>>
>>> On Sat, Jan 21, 2012 at 10:34 AM, Terence Parr<parrt at cs.usfca.edu>
>> wrote:
>>>
>>>> the code says antlr3XXX. is it v4 or v3?
>>>> Ter
>>>> On Jan 20, 2012, at 6:22 PM, A Z wrote:
>>>>
>>>>> With this (very quickly written) code I see about 7MB/sec for the
>>>>> lexer using clang++ and using static linking. Memory use is about
>>>>> 30:1 but
>>>> many
>>>>> features have been removed, like getText and setText.
>>>>>
>>>>
>>>>
>>>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>>>> Unsubscribe:
>>>> http://www.antlr.org/mailman/options/antlr-interest/your-email-
>> addres
>>>> s
>>>>
>>>
>>>
>>
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
>> email-address
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list