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
1 changed files with 2 additions and 8 deletions

View File

@ -1,18 +1,12 @@
<program> ::= { DeclarationStart <declaration> }
<declaration> ::= Type Symbol Assign <variant_decl> { VBar <variant_decl> }
| Symbol Colon <full_type> DeclarationStart Symbol { Symbol } Assign <expr>
<declaration> ::= Symbol Colon <expr> DeclarationStart Symbol { Symbol } Assign <expr>
<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>
| <let> { <let> } In <expr>
| <infix_expr>
| Type <expr>
<tightexpr> ::= Literal
| Symbol
| OpenParen <expr> CloseParen