fix some specs
This commit is contained in:
27
README.md
27
README.md
@@ -8,11 +8,13 @@
|
||||
* RCURLY `}`
|
||||
* LPAREN `(`
|
||||
* RPAREN `)`
|
||||
* ID `[all]`
|
||||
* ID `[any]`
|
||||
* SEMI `;`
|
||||
* COMMA `,`
|
||||
* ARROW `->`
|
||||
* STAR `*`
|
||||
* ANDREF `&`
|
||||
* DOLLAR `$`
|
||||
* COMMENT `#`
|
||||
* NUM `[0-9]*(.[0-9]+)?`
|
||||
* RETURN `return`
|
||||
@@ -23,8 +25,25 @@
|
||||
## Syntax Spec
|
||||
|
||||
```
|
||||
decl := val typespec id stmt ;
|
||||
typespec := id | [id* -> id?]
|
||||
stmt :=
|
||||
program := defn*
|
||||
defn := VAL type ID ;
|
||||
| VAL type ID expr ;
|
||||
|
||||
expr := atom atom* ;
|
||||
|
||||
atom := ID
|
||||
| NUM
|
||||
| STR
|
||||
| lambda
|
||||
| compound
|
||||
| reference
|
||||
| dereference
|
||||
|
||||
stmt := defn
|
||||
| expr
|
||||
|
||||
|
||||
stmt := defn | st
|
||||
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user