You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
326 B
13 lines
326 B
%token LEFT_PAR RIGHT_PAR |
|
%token <string> VAR |
|
%token DOT |
|
%token LAMBDA |
|
%start <Lambda.term> termc |
|
|
|
%% |
|
|
|
termc: |
|
| x = VAR { Lambda.to_var x } |
|
| LAMBDA ; l = nonempty_list(VAR) ; DOT; t = termc { Lambda.to_lambda l t } |
|
| LEFT_PAR ; t = termc ; u = termc ; RIGHT_PAR { Lambda.to_app t u } |
|
| LEFT_PAR ; t = termc ; RIGHT_PAR { t }
|
|
|