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

p = earlpy.Parser("grammars/c")

if False:
    p = earlpy.Parser("grammars/expression")
    node = p.parse_string("1 + 1 + 2 + 3")
    print(node.pprint())
elif False:
    p = earlpy.Parser("grammars/c")
    node = p.parse_file("examples/file.c")
    print(node.pprint())
elif False:
    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