File: declarations.mly

package info (click to toggle)
menhir 20201216-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,056 kB
  • sloc: ml: 23,365; makefile: 181; sh: 95; lisp: 8
file content (9 lines) | stat: -rw-r--r-- 239 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 {}
typ1: typ0 | typ0 ARROW typ1  {}
declaration: ID COLON typ1    {}
program:
| LPAREN declaration RPAREN
| declaration SEMICOLON       {}