| parrotcode: A lookup table for opcodes | |
| Contents | Language Implementations | Punie | 

PunieOpLookup -- A lookup table for opcodes

  .sub _main :main
      load_bytecode 'PunieOpLookup.pir'
      .local pmc oplookup
      .local string op
 
      # Retrieve the subroutine
      oplookup = find_global 'PunieOpLookup', 'lookup'
      # Translate operator name to PASM opcode name
      op = oplookup($S1)
      ... # Do something with the opcode name
      end
  .end

PunieOpLookup is a module for looking up the translation between a Punie operator name (as defined in the operator precedence parser), and the equivalent PASM opcode name. Eventually this will be implemented as a data file, possibly in YAML.

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>
|  |   |