diff options
author | colin <colin@cicadas.surf> | 2023-08-14 21:14:41 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-08-14 21:14:41 -0700 |
commit | a28bc73e3eff6abdc3f2e4e12da6ed3be49e4915 (patch) | |
tree | 66688bc260b3fbc5fb87ff7ad9b4403eed78d00c | |
parent | f603413e06b694829db16d5cb21d972971b7b0c3 (diff) |
updated readme
-rw-r--r-- | README.org | 25 |
1 files changed, 12 insertions, 13 deletions
@@ -63,7 +63,6 @@ slime, you can evoke ~M-x slime-documentation~ with your cursor over the ~calc~ symbol to see this: #+begin_src - Documentation for the symbol CALC: Function: @@ -71,22 +70,22 @@ Function: A calculator language -<START> ::= (<SUBEXPR> ::EOF:: | <VALUE> ::EOF:: | <UNOP> ::EOF:: | <BINOP> ::EOF::) -<EXPR> ::= (<SUBEXPR> | <VALUE> | <UNOP> | <BINOP>) -<SUBEXPR> ::= {CALC} -<VALUE> ::= ::TOKEN:: -<BINOP> ::= <EXPR> ('+' | '-' | '/' | '*' | '^' | '%') <EXPR>+ -<UNOP> ::= ('SIN' | 'COS' | 'TAN' | '-') <EXPR> +start ::= (subexpr eof | value eof | unop eof | binop eof) +expr ::= (subexpr | value | unop | binop) +subexpr ::= {CALC} +value ::= token +binop ::= expr ('+' | '-' | '/' | '*' | '^' | '%') expr+ +unop ::= ('SIN' | 'COS' | 'TAN' | '-') expr ------------------------------------------ ADDITIONAL NOTES: -<SUBEXPR> A subexpression, like (1 + 2 / cos(1.5)) -<VALUE> A Number +subexpr A subexpression, like (1 + 2 / cos(1.5)) +value A Number ------------------------------------------ KEY: -::TOKEN:: Any ole token -::EOF:: Explicitly match the end of the input -{GRAMMAR} Parse a sublist of tokens with GRAMMAR -(a|b|..) One of the alternavites a b ... +token Any ole token +eof Explicitly match the end of the input +{LANGUAGE} Parse a sublist of tokens with LANGUAGE +(A|B|...) One of the alternavites a b ... PATTERN+ One or more PATTERN PATTERN* Zero or more PATTERN <RULE> A nonterminal symbol - naming a parse rule |