Simplify the grammar a little bit (sike!)
This commit is contained in:
parent
afbb45caac
commit
756bb883f0
|
@ -1,18 +1,12 @@
|
||||||
<program> ::= { DeclarationStart <declaration> }
|
<program> ::= { DeclarationStart <declaration> }
|
||||||
|
|
||||||
<declaration> ::= Type Symbol Assign <variant_decl> { VBar <variant_decl> }
|
<declaration> ::= Symbol Colon <expr> DeclarationStart Symbol { Symbol } Assign <expr>
|
||||||
| Symbol Colon <full_type> DeclarationStart Symbol { Symbol } Assign <expr>
|
|
||||||
<variant_declaration> ::= Symbol { <grouped_type> }
|
<variant_declaration> ::= Symbol { <grouped_type> }
|
||||||
|
|
||||||
<full_type> ::= <tight_type> [ Comma [ <additional_type> ] [ Aro <full_type> ] ]
|
|
||||||
<additional_type> ::= <tight_type> [ Comma [ <additional_type> ] ]
|
|
||||||
<tight_type> ::= OpenParen <full_type> CloseParen
|
|
||||||
| Symbol [ OpenSquareBracket <domain> CloseSquareBracket ]
|
|
||||||
<domain> ::= <expr> [ Comma [ <domain> ] ]
|
|
||||||
|
|
||||||
<expr> ::= If <expr> <ifblock>
|
<expr> ::= If <expr> <ifblock>
|
||||||
| <let> { <let> } In <expr>
|
| <let> { <let> } In <expr>
|
||||||
| <infix_expr>
|
| <infix_expr>
|
||||||
|
| Type <expr>
|
||||||
<tightexpr> ::= Literal
|
<tightexpr> ::= Literal
|
||||||
| Symbol
|
| Symbol
|
||||||
| OpenParen <expr> CloseParen
|
| OpenParen <expr> CloseParen
|
||||||
|
|
Loading…
Reference in a new issue