term.bnf 539 Bytes
Newer Older
MARCHE Claude's avatar
MARCHE Claude committed
1
\begin{syntax}
2 3 4 5 6 7 8 9 10 11 12 13 14
  term ::= integer ; integer constant
       | real ; real constant
       | qualid ; symbol
       | prefix-op term ;
       | term infix-op term ;
       | lqualid term+ ; function application
       | "if" formula "then" term "else" term ; conditional
       | "let" pattern "=" term "in" term ; local binding
       | "match" ("," term)+ "with" "|"? match-cases "end" ;
       | "(" term ("," term)* ")" ; tuple
       | term ":" type ; cast
       | label term ; label
       | "(" term ")" ; parentheses%
MARCHE Claude's avatar
MARCHE Claude committed
15
\end{syntax}