annotate python/test_burm.py @ 319:8d07a4254f04

Work on burg
author Windel Bouwman
date Sat, 18 Jan 2014 18:58:43 +0100
parents
children
rev   line source
319
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
1 from tree import Tree
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
2 from arm_burm import Matcher
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
3
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
4
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
5 def main():
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
6 t = Tree('ASGNI',
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
7 Tree('ADDRLP'),
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
8 Tree('ADDI',
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
9 Tree('CVCI', Tree('INDIRC', Tree('ADDRLP'))),
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
10 Tree('CNSTI')
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
11 )
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
12 )
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
13 print(t)
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
14 Matcher().gen(t)
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
15
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
16 if __name__ == '__main__':
8d07a4254f04 Work on burg
Windel Bouwman
parents:
diff changeset
17 main()