Aaron Sherman <[EMAIL PROTECTED]> wrote:
> I've done quite a lot of thinking about Parrot's rx_compile op, as I was
> thinking about implementing it.

Given that rx_compile syntax and semantics aren't really final and
second that compiling a rx takes substantial time, I'd do something like
this:

  # classes/rx_compiler.pmc
  #
  pmclass Rx_Compiler extends Compiler need_ext {
      ...
      METHOD rx_to_fsa(){...}   # as discussed today - NCI method
      ...
  }

Then cou can

  Px = new Rx_Compiler
  foo = Px."rx_to_fsa"(bar)
  ... whatever is appropriate

You can experiment with needed methods, implement new ...
You can subclass the Rx_Compiler, implement it in PIR and what not.

Eventually for gaining the last bit of speed, we could make opcodes for
the methods.

leo

Reply via email to