Wafer grammar stages
19 grammar stages from wasmgroundup/code, from an empty language through strings and memory.
01-noplang
chapter02/01-noplang.js · 1 rules · grammar · rule atlas · expanded Main
02-numbers
chapter02/02-numbers.js · 2 rules · grammar · rule atlas · expanded Main
03-expression-stub
chapter03/01-exprStub.js · 3 rules · grammar · rule atlas · expanded Main
04-addition
chapter03/02-waferAdd.js · 3 rules · grammar · rule atlas · expanded Main
05-addition-subtraction
chapter03/03-waferAddSub.js · 4 rules · grammar · rule atlas · expanded Main
06-arithmetic
chapter03.js · 5 rules · grammar · rule atlas · expanded Main
07-identifiers
chapter04/01-identifiers.js · 8 rules · grammar · rule atlas · expanded Main
08-primary-expressions
chapter04/02-primaryexpr.js · 10 rules · grammar · rule atlas · expanded Main
09-locals
chapter04/03-compileLocals.js · 10 rules · grammar · rule atlas · expanded Main
10-assignment
chapter04.js · 12 rules · grammar · rule atlas · expanded Main
11-functions
chapter05/04-functionDecl.js · 15 rules · grammar · rule atlas · expanded Module
12-function-calls
chapter05.js · 17 rules · grammar · rule atlas · expanded Module
13-if-expressions
chapter06/01-ifExpr.js · 23 rules · grammar · rule atlas · expanded Module
14-comparisons
chapter06/03-test-comparison.js · 27 rules · grammar · rule atlas · expanded Module
15-while
chapter06/04-test-while.js · 30 rules · grammar · rule atlas · expanded Module
16-statements
chapter06.js · 31 rules · grammar · rule atlas · expanded Module
17-extern-functions
chapter07.js · 36 rules · grammar · rule atlas · expanded Module
- Module
- Statement
- LetStatement
- IfStatement
- WhileStatement
- FunctionDecl
- ExternFunctionDecl
- Params
- BlockExpr
- BlockStatements
- ExprStatement
- Expr
- AssignmentExpr
- PrimaryExpr
- CallExpr
- Args
- IfExpr
- binaryOp
- compareOp
- logicalOp
- number
- keyword
- if
- else
- func
- let
- while
- and
- or
- extern
- identifier
- identStart
- identPart
- space
- singleLineComment
- multiLineComment
18-memory-and-arrays
chapter09.js · 36 rules · grammar · rule atlas · expanded Module
- Module
- Statement
- LetStatement
- IfStatement
- WhileStatement
- FunctionDecl
- ExternFunctionDecl
- Params
- BlockExpr
- BlockStatements
- ExprStatement
- Expr
- AssignmentExpr
- PrimaryExpr
- CallExpr
- Args
- IfExpr
- binaryOp
- compareOp
- logicalOp
- number
- keyword
- if
- else
- func
- let
- while
- and
- or
- extern
- identifier
- identStart
- identPart
- space
- singleLineComment
- multiLineComment
19-strings
chapter10.js · 38 rules · grammar · rule atlas · expanded Module
- Module
- Statement
- LetStatement
- IfStatement
- WhileStatement
- FunctionDecl
- ExternFunctionDecl
- Params
- BlockExpr
- BlockStatements
- ExprStatement
- Expr
- AssignmentExpr
- PrimaryExpr
- CallExpr
- Args
- IfExpr
- binaryOp
- compareOp
- logicalOp
- number
- keyword
- if
- else
- func
- let
- while
- and
- or
- extern
- identifier
- identStart
- identPart
- stringLiteral
- quote
- space
- singleLineComment
- multiLineComment