[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shift reduce errors due to embedded actions
From: |
David Durham |
Subject: |
Re: Shift reduce errors due to embedded actions |
Date: |
Mon, 15 Oct 2001 09:52:50 -0500 |
I short (and a bit over simplified), inserting the extra mid-rule
actions causes bison to have to execute that action before going too
much further in the input (1 token or 1 reduction, not sure)... So if
some rule cannot be distinguished from another rule up to that point of
the mid-rule action, it can't say, do you action, then realize, 'oh I
didn't need to do that...' then undo the results of that action...
On Tue, 2001-10-09 at 08:52, shri wrote:
>
> hi
>
> i have developed a parser for a language similar to c to generate the cross
> reference information of variables and function names used in the source code.
>
> from the embedded actions in the rules section of bison, i invoke a function
> to generate cross reference information about the variables in the program,
> which leads to shift reduce errors.
>
> how can i avoid getting the shift reduce errors due to embedded actions in
> the rules section of bison?
>
> is there any way where i can do away with embedded actions while achieving
> the purpose of generating the cross reference information?
>
> thanks
> srinivas
> india
>
>
>
> _______________________________________________
> Help-bison mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-bison
Re: Shift reduce errors due to embedded actions,
David Durham <=