Closed drewwells closed 8 years ago
Given the nex file:
%{ package main %} %union { n int } %token NUMBER %token ADD SUB MUL DIV ABS %token EOL %% start: term ; term: NUMBER | ABS term { $$ = $2 >= 0? $2 : - $2; } ; %%
Got:
# command-line-arguments desk.y:33[/Users/drew/src/snazzle/desk/y.go:468]: syntax error: unexpected ?
Expected: $2 is returned as positive number
c code won't work for go
Given the nex file:
Got:
Expected: $2 is returned as positive number