diff options
author | Matthew Sotoudeh <matthew@masot.net> | 2024-02-19 02:25:28 -0800 |
---|---|---|
committer | Matthew Sotoudeh <matthew@masot.net> | 2024-02-19 02:25:28 -0800 |
commit | ffc6388571004b17e3a3dee2511ec99076ee803a (patch) | |
tree | ba14dfc0fc0b1beae949e12b8853fa690d588d2a /examples |
initial dump
Diffstat (limited to 'examples')
-rw-r--r-- | examples/simple.c | 3 | ||||
-rw-r--r-- | examples/test.py | 4 |
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()) |