RPA Toolkit
Added simple numeric expression pattern file.
authorMartin Stoilov <martin@sigmadrone.org>
Sat, 18 Apr 2020 20:24:44 +0000 (13:24 -0700)
committerMartin Stoilov <martin@sigmadrone.org>
Sat, 18 Apr 2020 20:24:44 +0000 (13:24 -0700)
tests/datapatterns/calc-simple.rpa [new file with mode: 0644]

diff --git a/tests/datapatterns/calc-simple.rpa b/tests/datapatterns/calc-simple.rpa
new file mode 100644 (file)
index 0000000..328e3a6
--- /dev/null
@@ -0,0 +1,7 @@
+#!noemit term
+#!noemit mulex
+
+term   ::= [0-9]+ | '(' <:expr:> ')'
+mulex  ::= <:mulex:> ('*' | '/') <:term:>  | <:term:>
+expr   ::= <:expr:>  ('+' | '-') <:mulex:> | <:mulex:>
+numexpr        ::= <:expr:>