NAME ^

ASTGrammar -- A grammar for transforming the output of a PGE parse into an abstract syntax tree.

SYNOPSYS ^

  .sub _main :main
      load_bytecode 'ASTGrammar.pir'
      .local pmc grammar
       grammar = new 'ASTGrammar'

      # Construct the "AST"
      load_bytecode "PAST.pbc"
      .local pmc astbuilder
      astbuilder = grammar.apply(match)
      .local pmc ast
      ast = astbuilder.get('past')

      end
  .end

DESCRIPTION ^

LICENSE ^

Copyright (C) 2006-2007, 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