office-gobmx/toolkit/src2xml/source/expression_test.py
Kurt Zenker 17eed69bd5 INTEGRATION: CWS layout_DEV300 (1.1.2); FILE ADDED
2008/02/13 08:56:22 jcn 1.1.2.1: Import src2xml and doc/layout from GIT.
2008-03-06 10:54:07 +00:00

23 lines
450 B
Python

#!/usr/bin/env python
import sys
import expression
def run (exp):
tokens = exp.split()
expparser = expression.ExpParser(tokens)
expparser.build()
expparser.dumpTree()
def main ():
run("6 + 34")
run("6 + 34 - 10")
run("6 + 34 - 10 + 200")
run("6 + 34 - 10 * 200")
run("6 + 34 - 10 * 200 + 18")
run("6 + 34 - 10 * 200 + 18 / 2")
run("6 * ( ( 10 + 2 ) - 10 ) * 33")
if __name__ == '__main__':
main()