Farly::ASA::Rewriter - Rewrite the parse tree into an abstract syntax tree


Farly::ASA::Rewriter rewrites the Parse::RecDescent <autotree> parse tree into an abstract syntax tree (AST). The AST structure mirrors the parse tree structure. Farly::ASA::Rewriter is run after Farly::ASA::Annotator has converted the tokens into value objects.

The AST node classes are defined in $AST_Node_Class. The AST node values are the Token objects from the parse tree and are recognized by the presence of the '__VALUE__' key.

Farly::ASA::Rewriter dies on error.

Farly::ASA::Rewriter is used by the Farly::ASA::Builder only.


Farly::ASA::Rewriter Copyright (C) 2012 Trystan Johnson

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <>.