Created
February 14, 2014 15:47
-
-
Save Ra1nWarden/9003351 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This does not work | |
S | |
: LBRACE exp_s RBRACE { $$ = $2} | |
; | |
exp_s | |
: { $$ = []; } | |
| exp SEMI exp_s { $$ = $3.unshift($1); } | |
exp | |
: /*omitted*/ | |
// This works | |
S | |
: LBRACE exp_s RBRACE { $$ = $2} | |
; | |
exp_s | |
: { $$ = null; } | |
| exp_p { $$ = $1; } | |
; | |
exp_p | |
: exp SEMI { $$ = [$1];} | |
| exp SEMI exp_p { $$ = $3.unshift($1);} | |
; | |
exp | |
: /*omitted*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment