From a28bc73e3eff6abdc3f2e4e12da6ed3be49e4915 Mon Sep 17 00:00:00 2001 From: colin Date: Mon, 14 Aug 2023 21:14:41 -0700 Subject: updated readme --- README.org | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'README.org') diff --git a/README.org b/README.org index 0c5db81..12a3b26 100644 --- a/README.org +++ b/README.org @@ -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 - ::= ( ::EOF:: | ::EOF:: | ::EOF:: | ::EOF::) - ::= ( | | | ) - ::= {CALC} - ::= ::TOKEN:: - ::= ('+' | '-' | '/' | '*' | '^' | '%') ⁤+ - ::= ('SIN' | 'COS' | 'TAN' | '-') +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: - A subexpression, like (1 + 2 / cos(1.5)) - 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 A nonterminal symbol - naming a parse rule -- cgit v1.2.3