merge the formfield patch from ooo-build
[ooovba.git] / toolkit / src2xml / source / expression_test.py
blob7e7393fb2fba379294b3c4645643a8ebe77508ab
1 #!/usr/bin/env python
3 import sys
4 import expression
6 def run (exp):
7 tokens = exp.split()
8 expparser = expression.ExpParser(tokens)
9 expparser.build()
10 expparser.dumpTree()
12 def main ():
13 run("6 + 34")
14 run("6 + 34 - 10")
15 run("6 + 34 - 10 + 200")
16 run("6 + 34 - 10 * 200")
17 run("6 + 34 - 10 * 200 + 18")
18 run("6 + 34 - 10 * 200 + 18 / 2")
20 run("6 * ( ( 10 + 2 ) - 10 ) * 33")
22 if __name__ == '__main__':
23 main()