[Top][All Lists]

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

Re: yyparse being prototyped in y.tab.h causes problems.

From: Kaz Kylheku
Subject: Re: yyparse being prototyped in y.tab.h causes problems.
Date: Tue, 18 Aug 2015 07:40:12 -0700
User-agent: Roundcube Webmail/0.9.2

On 18.08.2015 06:35, I blundered:
Hi Akim,

The example I gave is (to my best knowledge and effort)
POSIX-conforming Yacc code.

Hi Akim, and everyone,

Sorry for the above nonsense; of course it obviously is
not due to the

  %parse-param{private_context *ctx}

which is important to the issue!

If you use an extension, then the yacc implementation
can put whatever it wants in y.tab.h, of course;
conformance has largely gone out the window.

Though not standard, %pure-parser and %parse-param are implemented by other parser generators, though, like Berkeley Yacc. (Because reentrant parsing is a very
important extension!)

On the other hand, %code doesn't port to byacc:

  byacc: e - line 10 of "test.y", syntax error
  %code { abc }

reply via email to

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