From b4f86ba667d53be3e10123bbeb100346e0f20241 Mon Sep 17 00:00:00 2001 From: Valk Richard Li <48872266+ValKmjolnir@users.noreply.github.com> Date: Tue, 13 Aug 2019 22:22:48 +0800 Subject: [PATCH] Add calculation rules --- version0.3/ebnf.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/version0.3/ebnf.cpp b/version0.3/ebnf.cpp index b865104..a3306ec 100644 --- a/version0.3/ebnf.cpp +++ b/version0.3/ebnf.cpp @@ -19,8 +19,8 @@ ::= <[> | <]> //hash - ::= <[> <]> - ::= <:> + ::= <.> | + ::= <:> | ::= <,> ::= <,> ::= <{> | <}> @@ -33,7 +33,19 @@ //definition & assignment ::= <=> | <;> - ::= <=> <;> + ::= <=>|<+=>|<-=>|<*=>||<~=> <;> + +//calculation + ::= <+> + ::= <-> + ::= <*> +
::= + ::= <~> + ::= |||
+ ::= <(> | <)> + ::= <+>|<->|<*>||<~> + ::= <+>|<->|<*>||<~> + ::= <+>|<->|<*>||<~> //loop ::= | <;> | <;> |