bison-patches
[Top][All Lists]
Advanced

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

Re: push parser implemenation


From: Paul Eggert
Subject: Re: push parser implemenation
Date: Mon, 11 Sep 2006 12:32:51 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Bob Rossi <address@hidden> writes:

> - Does it make sense to use these options together? (I don't know what
>   %parse-param is used for)

I suspect it does.  %parse-param is used to specify extra options
given to yyparse and friends.  I'd expect a push parser would
always want to use %parse-param, no?  So you can make it an error
if someone tries to define a push parser without parameters.
And then, given:

  %parse-param {semantic_value *result}
  %parse-param {int *count}

you can generate:

  void yyparse (semantic_value *result, int *count);

(perhaps with extra args? I don't know what a push parser needs) instead of:

  void yyparse (void *PVVOID);

> - Should I generate a yypushparse function instead to avoid this
>   problem?

This would make sense, if you plan to be able to generate both
functions in the same module.  Is that a reasonable thing to do?

> - Should I make the push-parser handle those extra parameters when
>   %parse-param is used? (ie)
>   void yyparse (void *PVVOID, semantic_value *result, int *count);

Yes, I think that'll be helpful.




reply via email to

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