This commit is contained in:
Adrien Vannson 2022-05-08 18:29:54 +02:00
parent 136da4a898
commit 34455d887d
No known key found for this signature in database
GPG Key ID: FE2E66FD978C1A55
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ rule token = parse
| ')' { RPAREN }
| "->" { RARROW }
| '~' { TILDE }
| "False" { FALSE }
| ['a'-'z']+['0'-'9']* as s { VAR_NAME s }
| ['A'-'Z']+['0'-'9']* as s { TYPE_NAME s }
| eof { EOF }

View File

@ -3,7 +3,7 @@
%}
/* Description des lexèmes définis dans lexer.mll */
%token LPAREN RPAREN RARROW TILDE
%token LPAREN RPAREN RARROW TILDE FALSE
%token <string> VAR_NAME
%token <string> TYPE_NAME
%token ENDL EOF
@ -26,3 +26,4 @@ ty:
| ty RARROW ty { TImpl ($1, $3) }
| TYPE_NAME { TSimple $1 }
| TILDE ty { TImpl ($2, TFalse) }
| FALSE { TFalse }