diff options
author | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2025-05-21 07:48:44 +0200 |
---|---|---|
committer | Flavian Kaufmann <flavian@flaviankaufmann.ch> | 2025-05-21 07:48:44 +0200 |
commit | 396685999cca865b9ea110d8cb461373a962ebe9 (patch) | |
tree | c564aacc33c1b72a821886da2be8eab8607947a3 /README.md | |
parent | 5a90102b20d18966b69496d85361d14c085479db (diff) | |
download | imp-396685999cca865b9ea110d8cb461373a962ebe9.tar.gz imp-396685999cca865b9ea110d8cb461373a962ebe9.zip |
doc fix
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -19,7 +19,7 @@ A small interpreter of the IMP programming language. [Syntax](/res/syntax.ebnf) -**Statement <stm>** +**Statement `<stm>`** Variable assignment: - `<var> := <aexp>` any variable not assigned, has the value 0. @@ -33,17 +33,17 @@ Control flow: - `skip`, nop **Expression** -Arithmetic Expression <aexp>: +Arithmetic Expression `<aexp>`: - `<num>` - `<var>` -- `(<aexp> + <aexp>) -- `(<aexp> - <aexp>) -- `(<aexp> + <aexp>) - -Boolean Expression <bexp>: -- `not <bexp> -- `(<bexp> or <bexp>) -- `(<bexp> and <bexp>) +- `(<aexp> + <aexp>)` +- `(<aexp> - <aexp>)` +- `(<aexp> + <aexp>)` + +Boolean Expression `<bexp>`: +- `not <bexp>` +- `(<bexp> or <bexp>)` +- `(<bexp> and <bexp>)` - `<aexp> = <aexp>` - `<aexp> # <aexp>` not equals - `<aexp> < <aexp>` @@ -51,8 +51,8 @@ Boolean Expression <bexp>: - `<aexp> > <aexp>` - `<aexp> >= <aexp>` -**Variable <var>** +**Variable `<var>`** - `[a-zA-Z][A-Za-z0-9]*` -**Numeral <num>** +**Numeral `<num>`** - `[0-9]+` |