[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pushing and poping the semantic stack
From: |
Ilyes Gouta |
Subject: |
Pushing and poping the semantic stack |
Date: |
Fri, 15 Feb 2008 10:31:49 +0100 |
Hi guys,
Is there a way to push, pop and peek into bison's semantic stack (i.e,
manipulating the YYSTYPE variables, pushing custom ones) during the
recognition of a rule? My goal is to build an AST during the rule
matching phase and I need these tools for some special cases. I
already did this (AST construction) but using a separate custom
stack, I'm maintaining during the processing.. but now I would like to
do that using the native bison stack..
Also, is it possible to define YYSTYPE to be a pointer on a structure
instead of a union or a structure? I already tried that and just
checked if it compiles fine and it was OK, however I didn't check the
coherency of the whole recognition process.
Best regards,
Ilyes Gouta.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Pushing and poping the semantic stack,
Ilyes Gouta <=