[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stopping as soon as a valid symbol is read
From: |
Akim Demaille |
Subject: |
Re: Stopping as soon as a valid symbol is read |
Date: |
Wed, 27 Jul 2011 18:32:57 +0200 |
Le 25 juil. 2011 à 16:22, Ludovic Courtès a écrit :
> However, with a pure API, I don’t see how to get yyresult back from user
> code? The code snippet in the manual pushes tokens but never asks for
> the result.
If you dive into the generated code, you might find something useful, but
certainly not easy to use. Since Bison keeps everything in a stack of unions,
don't expect to find the "current result" (whatever that means) easy to get
with the right type. If you need such a feature, it is certainly safer and
easier for you to have your own variable keep track of the value you want to
track, and maintain it in your actions.
Re: Stopping as soon as a valid symbol is read, Hans Aberg, 2011/07/25