Simplify the grammar a little bit (sike!)

This commit is contained in:
Emi Simpson 2022-04-22 10:31:07 -04:00
parent afbb45caac
commit 756bb883f0
Signed by: Emi
GPG key ID: A12F2C2FFDC3D847

View file

@ -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