help-bison
[Top][All Lists]
Advanced

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

mid-rule actions


From: Davy Durham
Subject: mid-rule actions
Date: Fri, 24 Nov 2000 13:52:37 -0600

Hey... I use mid rule actions do something like the following (I'll use
a C++ construct as an example):

simple_class_declaration
    : class IDENT
        { // mid-rule action
            ...
            // do something now that I know a class is being defined
            int a=...;
            ...
        } '{' class_body '}'
    {  // rule's real action
        ...
            ... use a's value ... (unfortunately, it can't be used)
        ...
    }
    ;


My question is that:   Notice 'a' is declared in the mid-rule action....
I really wish there were a way to use 'a' in the rule's real action...
    Any sugguestions....  It would be quite convenient not to have to
store a's value somewhere then getting it back thus creating another
point-of-failure...

-- Davy





reply via email to

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