aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index 1d43430..888abac 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ or can be interpreted with the [ABCMachine][abc-github] project.
## Grammar
```
-<Program> ::= <Function>-list
+<Program> ::= <Initialisation>-list <Function>-list
<Function> ::= <Type> <Name> '(' <Arg>-clist ')' '{' <CodeBlock> '}'
@@ -38,7 +38,10 @@ or can be interpreted with the [ABCMachine][abc-github] project.
| '(' <Expression> ')' // Parenthised expression
<Op1> ::= '~' | '!'
-<Op2> ::= '+' | '-' | '*' | '/' | '%' | '==' | '||' | '&&' | ':'
+<Op2> ::= '+' | '-' | '*' | '/' | '%' // Int Int -> Int
+ | '==' | '<>' | '<' | '>' | '<=' | '>=' // Int Int -> Bool
+ | '||' | '&&' // Bool Bool -> Bool
+ | ':' // a [a] -> [a]
<Type> ::= 'Bool' | 'Int' | 'Void'
| '(' <Type>-clist ')' // Tuple