[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: push parser

From: Paul Eggert
Subject: Re: push parser
Date: Wed, 20 Sep 2006 21:58:30 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

>> One way to address this issue would be to have two entry points:
>>        status = yypushparse (ctx, ch, yylloc);
>> for tokens that have no semantic value, and
>>        status = yypushparseval (ctx, ch, yylval, yylloc);
>> for tokens that do.
>> Another possibility, which will avoid a copy in some cases if semantic
>> values are large, is to pass a pointer:
>>        status = yypushparse (ctx, ch, &yylval, yylloc);
>> where you pass a NULL pointer if the token has no semantic value.  If
>> the copying issue is of concern, it may also make sense to pass yylloc's
>> address too:
>>        status = yypushparse (ctx, ch, &yylval, &yylloc);
>> I don't know whether the copying concern is enough to affect
>> performance, though.
> I'm not decided on how to modify the yypushparse function parameters.
> Have you made up your mind?

If it doesn't matter to you, let's use the second method (passing
the addresses).  We can always change it later if it turns
out to have a problem.

> Attached is a patch on some changes we both agree on.

Thanks; I installed that.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]