NAME ^

PunieOpLookup -- A lookup table for opcodes

SYNOPSYS ^

  .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

DESCRIPTION ^

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.

LICENSE ^

Copyright (C) 2006, The Perl Foundation.

This is free software; you may redistribute it and/or modify it under the same terms as Parrot.

AUTHOR ^

Allison Randal <allison@perl.org>


parrot