help-bison !
Hello, when I was look through the man-page of bison ,I found a example :
************************************************************************************
@example
@group
stmt: LET '(' var ')'
@{ $<context>$ = push_context ();
declare_variable ($3); @}
stmt @{ $$ = $6;
pop_context ($<context>5); @}
@end group
@end example
@noindent
As soon as @samp{let (@var{variable})} has been recognized, the first
action is run. It saves a copy of the current semantic context (the
list of accessible variables) as its semantic value, using alternative
@code{context} in the data-type union. Then it calls
@code{declare_variable} to add the new variable to that list. Once the
first action is finished, the embedded statement @code{stmt} can be
parsed. Note that the mid-rule action is component number 5, so the
@samp{stmt} is component number 6.
***************************************************************************************
I can not understand the sentence : "Note that the mid-rule action is
component number 5",
so can you help me on this ? I mean what does the entire action sequence look
like ?
!
receipt
[EMAIL PROTECTED]
2006-09-06
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison