incorporating actions to PGE in main()

Veli Ogla Sungutay velisungutay at gmail.com
Sun Sep 13 11:16:39 UTC 2009


Hi all,
I have started to play with PGE and followed the example in book/pct/
ch04_pge.pod. Now how can I incorporate "actions" to this small
example? Assume that actions.pm is in place.

I could not find the function definitions of get_hll_global, or the
returned pmc (top). I would assume they accept an actions parameter.
Here is the main() function below from ch04_pge.pod


 .sub main :main
      load_bytecode 'PGE.pbc'        # load some required modules
      load_bytecode 'dumper.pbc'
      load_bytecode 'PGE/Dumper.pbc'

      load_bytecode 'Contacts.pir'   # load your grammar

      .local string source
      source  = "3 John"

      .local pmc top, grammar, match
      top     = get_hll_global ['Contacts'], 'TOP'
      grammar = get_class 'Contacts'
      match   = top(source, 'grammar' => grammar)

      _dumper(match, "match")
  .end


More information about the parrot-dev mailing list