| parrotcode: A grammar for transforming an opcode syntax tree to PIR. | |
| Contents | Language Implementations | Cardinal | 

PIRGrammar -- A grammar for transforming an opcode syntax tree to PIR.

  .sub _main :main
      load_bytecode 'PIRGrammar.pir'
      .local pmc grammar
       grammar = new 'PIRGrammar'
      # Build the PIR output
      .local pmc pirbuilder
      pirbuilder = grammar.apply(match)
      .local pmc pir
      pir = pirbuilder.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.

Kevin Tew <tewk@tewk.com>
|  |   |