[antlr-interest] More, Status of C++ backend?
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Jan 1 12:23:37 PST 2008
On 1/1/08 9:49 PM, "Jim Idle" <jimi at temporal-wave.com> wrote:
Hi Jim,
> Yes - the new C++ runtime (when I eventually finish it!) will not
> allocate any memory for the token strings unless you access it. It will
> also avoid smart pointers and things. However, at the end of the day,
> unless you really really want to use C++ in your actions, I think that
> the C target will always be a little bit faster. Hence I am also going
> to look at making the C target more C++ compatible too.
>
> Porting a C++ 2.7 grammar to 3.x C probably involves more work on the
> grammar and tree stuff than it does on the C++ to C work. In general I
> advise people to limit the action code to API calls, which means that
> you would need to supply a C linkable interface to your current code,
> then keep your grammar and action ode as separate as possible. Grammars
> that hae too much of the for actions directly typed in to them tend to
> be difficult to read anyway.
Do you mean something as
Tree_rule:
{Sql_Node_Ptr p = make_sql_insert_node(); }
?
All our such factories return our C++ nodes.
I do not see reason why this should not work in C runtime,
Except as make it compile as CPP.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the antlr-interest
mailing list