// Sad-Script: S-Expressions and Dashes // non-terminals ::= ( | )* ::= (FUNCTION IDENTIFIER ( | (EQUALS ))) | (IMPORT FUNCTION IDENTIFIER ) ::= (OPEN_PAREN IDENTIFIER* CLOSE_PAREN) | IDENTIFIER ::= OPEN_BRACE * CLOSE_BRACE ::= INT_LIT | DOUBLE_LIT | BOOL_LIT | STRING_LIT | NIL | | | IDENTIFIER | | ::= OPEN_PAREN IDENTIFIER * CLOSE_PAREN ::= OPEN_BRACKET IDENTIFIER * CLOSE_BRACKET ::= | | | | | | | | | | ::= VAR (IDENTIFIER | (OPEN_PAREN IDENTIFIER+ CLOSE_PAREN)) EQUALS ::= SET (IDENTIFIER | (OPEN_PAREN IDENTIFIER+ CLOSE_PAREN)) EQUALS ::= LAMBDA (IDENTIFIER | (OPEN_PAREN IDENTIFIER* CLOSE_PAREN)) ( | ) ::= IF (ELSEIF )* (ELSE )? ::= (FOR IDENTIFIER FROM TO ) | (FOR IDENTIFIER (AT IDENTIFIER)? IN ) ::= WHILE ::= DO WHILE ::= SWITCH * OPEN_BRACE (CASE + COLON )* (DEFAULT COLON )? CLOSE_BRACE ::= MATCH * OPEN_BRACE (CASE + COLON )* (DEFAULT COLON )? CLOSE_BRACE ::= RETURN ::= DIE // terminals INT_LIT DOUBLE_LIT BOOL_LIT STRING_LIT OPEN_PAREN CLOSE_PAREN OPEN_BRACKET CLOSE_BRACKET OPEN_BRACE CLOSE_BRACE COLON IDENTIFIER FUNCTION VAR SET IF ELSE ELSEIF FOR TO AT IN WHILE DO SWITCH CASE DEFAULT RETURN DIE IMPORT NIL FROM EQUALS (subtype of IDENTIFIER) LAMBDA MATCH