[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can you help me to explain a example in manual?
From: |
receipt |
Subject: |
Can you help me to explain a example in manual? |
Date: |
Wed, 6 Sep 2006 10:34:46 +0800 |
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
address@hidden
2006-09-06
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Can you help me to explain a example in manual?,
receipt <=