repo.or.cz
/
ooovba.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
merge the formfield patch from ooo-build
[ooovba.git]
/
toolkit
/
src2xml
/
source
/
expression_test.py
blob
7e7393fb2fba379294b3c4645643a8ebe77508ab
1
#!/usr/bin/env python
2
3
import
sys
4
import
expression
5
6
def
run
(
exp
):
7
tokens
=
exp
.
split
()
8
expparser
=
expression
.
ExpParser
(
tokens
)
9
expparser
.
build
()
10
expparser
.
dumpTree
()
11
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"
)
19
20
run
(
"6 * ( ( 10 + 2 ) - 10 ) * 33"
)
21
22
if
__name__
==
'__main__'
:
23
main
()