RPA Toolkit
Added version 2 of the calc
authorMartin Stoilov <martin@sigmadrone.org>
Sat, 18 Apr 2020 22:58:18 +0000 (15:58 -0700)
committerMartin Stoilov <martin@sigmadrone.org>
Sat, 18 Apr 2020 22:58:18 +0000 (15:58 -0700)
tests/datapatterns/calc-simple2.rpa [new file with mode: 0644]

diff --git a/tests/datapatterns/calc-simple2.rpa b/tests/datapatterns/calc-simple2.rpa
new file mode 100644 (file)
index 0000000..8fd2efd
--- /dev/null
@@ -0,0 +1,10 @@
+#!noemit term
+#!noemit mulex
+
+int     ::= [0-9]+
+term   ::= <:int:> | '(' <:expr:> ')'
+mulop   ::= ('*' | '/')
+addop   ::= ('+' | '-')
+mulex  ::= <:mulex:> <:mulop:> <:term:>  | <:term:>
+expr   ::= <:expr:>  <:addop:> <:mulex:> | <:mulex:>
+numexpr        ::= <:expr:>
\ No newline at end of file