Slide 62
Slide 62 text
Named References とは
expression:
NUMBER '+' expression { $$ = $1 + $3 }
| NUMBER '-' expression { $$ = $1 - $3 }
| '(' expression ')' { $$ = $2 }
expression[result]:
NUMBER '+' expression[rest] { $result = $NUMBER + $rest }
| NUMBER '-' expression[rest] { $result = $NUMBER - $rest }
| '(' expression[inside-exp] ')' { $result = $[inside-exp] }