Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

semicolons are not required

  • Loading branch information...
commit 4ef8fc70ff3d554a8625a0d3498c4ded319266cf 1 parent 6af1c10
@tj authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 examples/switch.g
View
8 examples/switch.g
@@ -9,17 +9,17 @@ program =
switch
| eol
| < (!eol .)* >
- { fprintf(stderr, "parse error near '%s'\n", yytext); }
+ { fprintf(stderr, "parse error near '%s'\n", yytext) }
;
switch =
a:name - '=' - b:value
- { printf("%s is now %s\n", a, b ? "on" : "off"); }
+ { printf("%s is now %s\n", a, b ? "on" : "off") }
;
value =
- 'on' { $$ = ON; }
- | 'off' { $$ = OFF; }
+ 'on' { $$ = ON }
+ | 'off' { $$ = OFF }
;
name =
Please sign in to comment.
Something went wrong with that request. Please try again.