-
Notifications
You must be signed in to change notification settings - Fork 0
BNF
Sohei Yamaga edited this page Sep 30, 2017
·
9 revisions
<expr> ::= <define> | <typedef>
<define> ::= <label> {<label>} ':=' [<let>] <term> ';'
<let> ::= 'let' {<define>} 'in'
<term> ::= <term> '+' <term>
| <term> '-' <term>
| <term'>
<term'> ::= <term'> '*' <term'>
| <term'> '/' <term'>
| <term''>
<term''> ::= '\' <tabel> '->' '<term>'
| '(' <term> ')'
| <label>
| <call>
| <label>
| <num>
<call> ::= <label> '(' <args> ')'
<args> ::= <term> ',' <args> | <term>
<label> ::= <label><anychar> | <lower>
<typedef>::= <label> '::' <type>
<type> ::= <Label> | '(' {<Label> ','} <Label> ')' '->' <type>
<Label> ::= <Label><anychar> | <upper>