aboutsummaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2023-08-14 21:14:41 -0700
committercolin <colin@cicadas.surf>2023-08-14 21:14:41 -0700
commita28bc73e3eff6abdc3f2e4e12da6ed3be49e4915 (patch)
tree66688bc260b3fbc5fb87ff7ad9b4403eed78d00c /README.org
parentf603413e06b694829db16d5cb21d972971b7b0c3 (diff)
updated readme
Diffstat (limited to 'README.org')
-rw-r--r--README.org25
1 files changed, 12 insertions, 13 deletions
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
-<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