summaryrefslogtreecommitdiff
path: root/examples/test.py
blob: e5783c554aa932554766a67ced77b4917b7d7834 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import earlpy

if False:
    p = earlpy.Parser("grammars/expression")
    node = p.parse_string("1 + 1 + 2 + 3")
    print(node.pprint())
elif True:
    p = earlpy.Parser("grammars/c")
    node = p.parse_file("examples/simple.c")
    print(node.pprint())
else:
    p = earlpy.Parser("grammars/c")
    node = p.parse_file("examples/expr.c")
    print(node.pprint())
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback