parrotcode: A grammar for transforming an abstract syntax tree to an | |
Contents | Language Implementations | Punie |
OSTGrammar -- A grammar for transforming an abstract syntax tree to an opcode syntax tree.
.sub _main :main
load_bytecode 'OSTGrammar.pir'
.local pmc grammar
grammar = new 'OSTGrammar'
# Construct the "OST"
load_bytecode "languages/punie/lib/POST.pir"
.local pmc ostbuilder
ostbuilder = grammar.apply(match)
.local pmc ost
ost = ostbuilder.get('result')
end
.end
Copyright (C) 2006, The Perl Foundation.
This is free software; you may redistribute it and/or modify it under the same terms as Parrot.
Allison Randal <allison@perl.org>
|