summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthew@masot.net>2024-02-19 02:25:28 -0800
committerMatthew Sotoudeh <matthew@masot.net>2024-02-19 02:25:28 -0800
commitffc6388571004b17e3a3dee2511ec99076ee803a (patch)
treeba14dfc0fc0b1beae949e12b8853fa690d588d2a /examples
initial dump
Diffstat (limited to 'examples')
-rw-r--r--examples/simple.c3
-rw-r--r--examples/test.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/examples/simple.c b/examples/simple.c
new file mode 100644
index 0000000..a8110a7
--- /dev/null
+++ b/examples/simple.c
@@ -0,0 +1,3 @@
+if (x + 5 == 10) {
+ x += 2;
+}
diff --git a/examples/test.py b/examples/test.py
new file mode 100644
index 0000000..bf8c6d2
--- /dev/null
+++ b/examples/test.py
@@ -0,0 +1,4 @@
+import earlpy
+p = earlpy.Parser("grammars/expression")
+node = p.parse_string("1 + 1 + 2 + 3")
+print(node.pprint())
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback