File: declarations-phantom.mly

package info (click to toggle)
menhir 20181113-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,992 kB
  • sloc: ml: 21,252; makefile: 425; sh: 90; lisp: 8
file content (9 lines) | stat: -rw-r--r-- 315 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
%token ID ARROW LPAREN RPAREN COLON SEMICOLON
%start<unit> program
%%
typ0: ID | LPAREN typ1(RPAREN) RPAREN          {}
typ1(phantom): typ0 | typ0 ARROW typ1(phantom) {}
declaration(phantom): ID COLON typ1(phantom)   {}
program:
| LPAREN declaration(RPAREN) RPAREN
| declaration(SEMICOLON)  SEMICOLON            {}