#
primary
"true" | "false" | "nil" | "this" | NUMBER | STRING | IDENTIFIER | "(" expression ")" | "super" "." IDENTIFIER | arrayLiteral | hashLiteral | functionExprreferenced by: call
EBNF notation. Click any rule to navigate.
notation
| alternative[ ] optional{ } repetitionprogram structure
{ import } { declaration } EOFdeclarations
[ "export" ] "class" IDENTIFIER [ "<" IDENTIFIER ] "{" { function } "}"statements
exprStmt | forStmt | ifStmt | printStmt | returnStmt | whileStmt | breakStmt | continueStmt | block"for" "(" ( varDecl | constDecl | exprStmt | ";" ) [ expression ] ";" [ expression ] ")" statementexpressions
( call "." IDENTIFIER | call "[" expression "]" | IDENTIFIER ) "=" assignment | logic_orprimary { "(" [ arguments ] ")" | "." IDENTIFIER | "[" expression "]" }"true" | "false" | "nil" | "this" | NUMBER | STRING | IDENTIFIER | "(" expression ")" | "super" "." IDENTIFIER | arrayLiteral | hashLiteral | functionExprliterals
IDENTIFIER, NUMBER, STRING, EOF are lexical tokens.