Skip to content
Sohei Yamaga edited this page Sep 30, 2017 · 9 revisions

BNF: tmpla

構文

<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>
Clone this wiki locally