view python/test_burm.py @ 319:8d07a4254f04

Work on burg
author Windel Bouwman
date Sat, 18 Jan 2014 18:58:43 +0100
parents
children
line wrap: on
line source

from tree import Tree
from arm_burm import Matcher


def main():
    t = Tree('ASGNI',
             Tree('ADDRLP'),
             Tree('ADDI',
                  Tree('CVCI', Tree('INDIRC', Tree('ADDRLP'))),
                  Tree('CNSTI')
                 )
            )
    print(t)
    Matcher().gen(t)

if __name__ == '__main__':
    main()