/*
 * This code is autogenerated by MakeTea. Do not edit.
 */

#ifndef _AST_H_
#define _AST_H_

#include <iostream>
#include <sstream>
#include <iomanip>
#include <phc/lib/error.h>
#include <phc/lib/Object.h>
#include <phc/lib/List.h>
#include <phc/lib/String.h>
#include <phc/lib/Boolean.h>
#include <phc/lib/Integer.h>
#include <phc/lib/AttrMap.h>

class Tree_transform;
class Tree_visitor;

class AST_node_factory;
class AST_node;
class Token_interface_name_list;
class AST_formal_parameter_list;
class AST_directive_list;
class AST_list_element_list;
class AST_expr_list;
class AST_array_elem_list;
class AST_actual_parameter_list;
class AST_php_script;
class AST_class_mod;
class AST_signature;
class AST_method_mod;
class AST_formal_parameter;
class AST_type;
class AST_attr_mod;
class AST_directive;
class AST_list_element;
class AST_variable_name;
class AST_target;
class AST_array_elem;
class AST_method_name;
class AST_actual_parameter;
class AST_class_name;
class AST_commented_node;
class AST_identifier;
class AST_interface_def_list;
class AST_class_def_list;
class AST_member_list;
class AST_statement_list;
class AST_switch_case_list;
class AST_catch_list;
class AST_interface_def;
class AST_class_def;
class AST_member;
class AST_statement;
class AST_switch_case;
class AST_catch;
class AST_expr;
class AST_list_elements;
class AST_reflection;
class Token_interface_name;
class Token_class_name;
class Token_method_name;
class Token_variable_name;
class Token_directive_name;
class Token_cast;
class Token_op;
class Token_constant_name;
class AST_method;
class AST_attribute;
class AST_if;
class AST_while;
class AST_do;
class AST_for;
class AST_foreach;
class AST_switch;
class AST_break;
class AST_continue;
class AST_return;
class AST_static_declaration;
class AST_unset;
class AST_declare;
class AST_try;
class AST_throw;
class AST_eval_expr;
class AST_literal;
class AST_assignment;
class AST_list_assignment;
class AST_cast;
class AST_unary_op;
class AST_bin_op;
class AST_conditional_expr;
class AST_ignore_errors;
class AST_constant;
class AST_instanceof;
class AST_variable;
class AST_pre_op;
class AST_post_op;
class AST_array;
class AST_method_invocation;
class AST_new;
class AST_clone;
class Token_int;
class Token_real;
class Token_string;
class Token_bool;
class Token_null;
class Wildcard;

class AST_node_factory
{
public:

public:
	static AST_node* create(char* name, List<Object*>* args);
	static AST_node* create(char* name, Object* arg);
};

class AST_node : public virtual Object
{
public:
	AttrMap* attrs;

public:
	AST_node();
	virtual bool deep_equals(Object* other);
	virtual AST_node* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_node* transform(Tree_transform* transform) = 0;
	virtual AST_node* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_node* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
	int get_line_number();
	String* get_filename();
};

class Token_interface_name_list : public virtual List<Token_interface_name*>, public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual Token_interface_name_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual Token_interface_name_list* transform(Tree_transform* transform);
	virtual Token_interface_name_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual Token_interface_name_list* post_transform(Tree_transform* transform);
};

class AST_formal_parameter_list : public virtual List<AST_formal_parameter*>, public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_formal_parameter_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_formal_parameter_list* transform(Tree_transform* transform);
	virtual AST_formal_parameter_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_formal_parameter_list* post_transform(Tree_transform* transform);
};

class AST_directive_list : public virtual List<AST_directive*>, public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_directive_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_directive_list* transform(Tree_transform* transform);
	virtual AST_directive_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_directive_list* post_transform(Tree_transform* transform);
};

class AST_list_element_list : public virtual List<AST_list_element*>, public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_list_element_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_list_element_list* transform(Tree_transform* transform);
	virtual AST_list_element_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_list_element_list* post_transform(Tree_transform* transform);
};

class AST_expr_list : public virtual List<AST_expr*>, public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_expr_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_expr_list* transform(Tree_transform* transform);
	virtual AST_expr_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr_list* post_transform(Tree_transform* transform);
};

class AST_array_elem_list : public virtual List<AST_array_elem*>, public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_array_elem_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_array_elem_list* transform(Tree_transform* transform);
	virtual AST_array_elem_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_array_elem_list* post_transform(Tree_transform* transform);
};

class AST_actual_parameter_list : public virtual List<AST_actual_parameter*>, public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_actual_parameter_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_actual_parameter_list* transform(Tree_transform* transform);
	virtual AST_actual_parameter_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_actual_parameter_list* post_transform(Tree_transform* transform);
};

class AST_php_script : public virtual AST_node
{
public:
	AST_interface_def_list* interface_defs;
	AST_class_def_list* class_defs;

public:
	AST_php_script();
	AST_php_script(AST_interface_def_list* interface_defs, AST_class_def_list* class_defs);
	virtual bool deep_equals(Object* other);
	virtual AST_php_script* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_php_script* transform(Tree_transform* transform);
	virtual AST_php_script* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_php_script* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	void init();
	AST_class_def* get_class_def(const char* name);
};

class AST_class_mod : public virtual AST_node
{
public:
	bool is_abstract;
	bool is_final;

public:
	AST_class_mod();
	AST_class_mod(bool is_abstract, bool is_final);
	virtual bool deep_equals(Object* other);
	virtual AST_class_mod* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_class_mod* transform(Tree_transform* transform);
	virtual AST_class_mod* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_class_mod* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_signature : public virtual AST_node
{
public:
	AST_method_mod* method_mod;
	bool is_ref;
	Token_method_name* method_name;
	AST_formal_parameter_list* formal_parameters;

public:
	AST_signature();
	AST_signature(AST_method_mod* method_mod, bool is_ref, Token_method_name* method_name, AST_formal_parameter_list* formal_parameters);
	AST_signature(const char* name);
	virtual bool deep_equals(Object* other);
	virtual AST_signature* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_signature* transform(Tree_transform* transform);
	virtual AST_signature* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_signature* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_method_mod : public virtual AST_node
{
public:
	bool is_public;
	bool is_protected;
	bool is_private;
	bool is_static;
	bool is_abstract;
	bool is_final;

public:
	AST_method_mod();
	AST_method_mod(bool is_public, bool is_protected, bool is_private, bool is_static, bool is_abstract, bool is_final);
	AST_method_mod(AST_method_mod* a, AST_method_mod* b);
	virtual bool deep_equals(Object* other);
	virtual AST_method_mod* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_method_mod* transform(Tree_transform* transform);
	virtual AST_method_mod* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_method_mod* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	static AST_method_mod* new_PUBLIC();
	static AST_method_mod* new_PROTECTED();
	static AST_method_mod* new_PRIVATE();
	static AST_method_mod* new_STATIC();
	static AST_method_mod* new_ABSTRACT();
	static AST_method_mod* new_FINAL();
};

class AST_formal_parameter : public virtual AST_node
{
public:
	AST_type* type;
	bool is_ref;
	Token_variable_name* variable_name;
	AST_expr* expr;

public:
	AST_formal_parameter();
	AST_formal_parameter(AST_type* type, bool is_ref, Token_variable_name* variable_name, AST_expr* expr);
	AST_formal_parameter(AST_type* type, Token_variable_name* name);
	AST_formal_parameter(AST_type* type, bool is_ref, Token_variable_name* name);
	virtual bool deep_equals(Object* other);
	virtual AST_formal_parameter* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_formal_parameter_list* transform(Tree_transform* transform);
	virtual AST_formal_parameter_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_formal_parameter_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_type : public virtual AST_node
{
public:
	bool is_array;
	Token_class_name* class_name;

public:
	AST_type();
	AST_type(bool is_array, Token_class_name* class_name);
	virtual bool deep_equals(Object* other);
	virtual AST_type* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_type* transform(Tree_transform* transform);
	virtual AST_type* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_type* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_attr_mod : public virtual AST_node
{
public:
	bool is_public;
	bool is_protected;
	bool is_private;
	bool is_static;
	bool is_const;

public:
	AST_attr_mod();
	AST_attr_mod(bool is_public, bool is_protected, bool is_private, bool is_static, bool is_const);
	AST_attr_mod(AST_method_mod* mm);
	virtual bool deep_equals(Object* other);
	virtual AST_attr_mod* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_attr_mod* transform(Tree_transform* transform);
	virtual AST_attr_mod* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_attr_mod* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	static AST_attr_mod* new_PUBLIC();
	static AST_attr_mod* new_PROTECTED();
	static AST_attr_mod* new_PRIVATE();
	static AST_attr_mod* new_STATIC();
	static AST_attr_mod* new_CONST();
};

class AST_directive : public virtual AST_node
{
public:
	Token_directive_name* directive_name;
	AST_expr* expr;

public:
	AST_directive();
	AST_directive(Token_directive_name* directive_name, AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_directive* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_directive_list* transform(Tree_transform* transform);
	virtual AST_directive_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_directive_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_list_element : public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_list_element* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_list_element* transform(Tree_transform* transform) = 0;
	virtual AST_list_element* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_list_element* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
};

class AST_variable_name : public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_variable_name* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_variable_name* transform(Tree_transform* transform) = 0;
	virtual AST_variable_name* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_variable_name* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
};

class AST_target : public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_target* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_target* transform(Tree_transform* transform) = 0;
	virtual AST_target* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_target* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
};

class AST_array_elem : public virtual AST_node
{
public:
	AST_expr* key;
	bool is_ref;
	AST_expr* val;

public:
	AST_array_elem();
	AST_array_elem(AST_expr* key, bool is_ref, AST_expr* val);
	virtual bool deep_equals(Object* other);
	virtual AST_array_elem* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_array_elem_list* transform(Tree_transform* transform);
	virtual AST_array_elem_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_array_elem_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_method_name : public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_method_name* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_method_name* transform(Tree_transform* transform) = 0;
	virtual AST_method_name* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_method_name* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
};

class AST_actual_parameter : public virtual AST_node
{
public:
	bool is_ref;
	AST_expr* expr;

public:
	AST_actual_parameter();
	AST_actual_parameter(bool is_ref, AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_actual_parameter* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_actual_parameter_list* transform(Tree_transform* transform);
	virtual AST_actual_parameter_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_actual_parameter_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_class_name : public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_class_name* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_class_name* transform(Tree_transform* transform) = 0;
	virtual AST_class_name* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_class_name* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
};

class AST_commented_node : public virtual AST_node
{
public:

public:
	AST_commented_node();
	virtual bool deep_equals(Object* other);
	virtual AST_commented_node* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_commented_node* transform(Tree_transform* transform) = 0;
	virtual AST_commented_node* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_commented_node* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
	List<String*>* get_comments();
};

class AST_identifier : public virtual AST_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_identifier* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_identifier* transform(Tree_transform* transform) = 0;
	virtual AST_identifier* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_identifier* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
	virtual String* get_value_as_string() = 0;
};

class AST_interface_def_list : public virtual List<AST_interface_def*>, public virtual AST_commented_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_interface_def_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_interface_def_list* transform(Tree_transform* transform);
	virtual AST_interface_def_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_interface_def_list* post_transform(Tree_transform* transform);
};

class AST_class_def_list : public virtual List<AST_class_def*>, public virtual AST_commented_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_class_def_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_class_def_list* transform(Tree_transform* transform);
	virtual AST_class_def_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_class_def_list* post_transform(Tree_transform* transform);
};

class AST_member_list : public virtual List<AST_member*>, public virtual AST_commented_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_member_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_member_list* transform(Tree_transform* transform);
	virtual AST_member_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_member_list* post_transform(Tree_transform* transform);
};

class AST_statement_list : public virtual List<AST_statement*>, public virtual AST_commented_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_statement_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
};

class AST_switch_case_list : public virtual List<AST_switch_case*>, public virtual AST_commented_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_switch_case_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_switch_case_list* transform(Tree_transform* transform);
	virtual AST_switch_case_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_switch_case_list* post_transform(Tree_transform* transform);
};

class AST_catch_list : public virtual List<AST_catch*>, public virtual AST_commented_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_catch_list* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual AST_catch_list* transform(Tree_transform* transform);
	virtual AST_catch_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_catch_list* post_transform(Tree_transform* transform);
};

class AST_interface_def : public virtual AST_commented_node
{
public:
	Token_interface_name* interface_name;
	Token_interface_name_list* extends;
	AST_member_list* members;

public:
	AST_interface_def();
	AST_interface_def(Token_interface_name* interface_name, Token_interface_name_list* extends, AST_member_list* members);
	virtual bool deep_equals(Object* other);
	virtual AST_interface_def* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_interface_def_list* transform(Tree_transform* transform);
	virtual AST_interface_def_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_interface_def_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_class_def : public virtual AST_commented_node
{
public:
	AST_class_mod* class_mod;
	Token_class_name* class_name;
	Token_class_name* extends;
	Token_interface_name_list* implements;
	AST_member_list* members;

public:
	AST_class_def();
	AST_class_def(AST_class_mod* class_mod, Token_class_name* class_name, Token_class_name* extends, Token_interface_name_list* implements, AST_member_list* members);
	AST_class_def(AST_class_mod* mod);
	AST_class_def(char* name);
	virtual bool deep_equals(Object* other);
	virtual AST_class_def* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_class_def_list* transform(Tree_transform* transform);
	virtual AST_class_def_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_class_def_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	void add_member(AST_member* member);
	AST_method* get_method(const char* name);
};

class AST_member : public virtual AST_commented_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_member* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_member_list* transform(Tree_transform* transform) = 0;
	virtual AST_member_list* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_member_list* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
};

class AST_statement : public virtual AST_commented_node
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_statement* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform) = 0;
	virtual AST_statement_list* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_statement_list* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
};

class AST_switch_case : public virtual AST_commented_node
{
public:
	AST_expr* expr;
	AST_statement_list* statements;

public:
	AST_switch_case();
	AST_switch_case(AST_expr* expr, AST_statement_list* statements);
	virtual bool deep_equals(Object* other);
	virtual AST_switch_case* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_switch_case_list* transform(Tree_transform* transform);
	virtual AST_switch_case_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_switch_case_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_catch : public virtual AST_commented_node
{
public:
	Token_class_name* class_name;
	Token_variable_name* variable_name;
	AST_statement_list* statements;

public:
	AST_catch();
	AST_catch(Token_class_name* class_name, Token_variable_name* variable_name, AST_statement_list* statements);
	virtual bool deep_equals(Object* other);
	virtual AST_catch* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_catch_list* transform(Tree_transform* transform);
	virtual AST_catch_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_catch_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_expr : public virtual AST_target, public virtual AST_node
{
public:

public:
	AST_expr();
	virtual bool deep_equals(Object* other);
	virtual AST_expr* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform) = 0;
	virtual AST_expr* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_expr* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
};

class AST_list_elements : public virtual AST_list_element
{
public:
	AST_list_element_list* list_elements;

public:
	AST_list_elements();
	AST_list_elements(AST_list_element_list* list_elements);
	virtual bool deep_equals(Object* other);
	virtual AST_list_elements* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_list_elements* transform(Tree_transform* transform);
	virtual AST_list_elements* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_list_elements* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_reflection : public virtual AST_variable_name, public virtual AST_method_name, public virtual AST_class_name
{
public:
	AST_expr* expr;

public:
	AST_reflection();
	AST_reflection(AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_reflection* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_reflection* transform(Tree_transform* transform);
	virtual AST_reflection* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_reflection* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class Token_interface_name : public virtual AST_identifier
{
public:
	String* value;

public:
	Token_interface_name();
	Token_interface_name(String* value);
	virtual bool deep_equals(Object* other);
	virtual Token_interface_name* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_value_as_string();
	virtual Token_interface_name* transform(Tree_transform* transform);
	virtual Token_interface_name* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual Token_interface_name* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class Token_class_name : public virtual AST_target, public virtual AST_class_name, public virtual AST_identifier
{
public:
	String* value;

public:
	Token_class_name();
	Token_class_name(String* value);
	virtual bool deep_equals(Object* other);
	virtual Token_class_name* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_value_as_string();
	virtual Token_class_name* transform(Tree_transform* transform);
	virtual Token_class_name* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual Token_class_name* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class Token_method_name : public virtual AST_method_name, public virtual AST_identifier
{
public:
	String* value;

public:
	Token_method_name();
	Token_method_name(String* value);
	virtual bool deep_equals(Object* other);
	virtual Token_method_name* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_value_as_string();
	virtual Token_method_name* transform(Tree_transform* transform);
	virtual Token_method_name* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual Token_method_name* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class Token_variable_name : public virtual AST_variable_name, public virtual AST_identifier
{
public:
	String* value;

public:
	Token_variable_name();
	Token_variable_name(String* value);
	virtual bool deep_equals(Object* other);
	virtual Token_variable_name* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_value_as_string();
	virtual Token_variable_name* transform(Tree_transform* transform);
	virtual Token_variable_name* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual Token_variable_name* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class Token_directive_name : public virtual AST_identifier
{
public:
	String* value;

public:
	Token_directive_name();
	Token_directive_name(String* value);
	virtual bool deep_equals(Object* other);
	virtual Token_directive_name* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_value_as_string();
	virtual Token_directive_name* transform(Tree_transform* transform);
	virtual Token_directive_name* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual Token_directive_name* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class Token_cast : public virtual AST_identifier
{
public:
	String* value;

public:
	Token_cast();
	Token_cast(String* value);
	virtual bool deep_equals(Object* other);
	virtual Token_cast* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_value_as_string();
	virtual Token_cast* transform(Tree_transform* transform);
	virtual Token_cast* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual Token_cast* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class Token_op : public virtual AST_identifier
{
public:
	String* value;

public:
	Token_op();
	Token_op(String* value);
	virtual bool deep_equals(Object* other);
	virtual Token_op* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_value_as_string();
	virtual Token_op* transform(Tree_transform* transform);
	virtual Token_op* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual Token_op* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class Token_constant_name : public virtual AST_identifier
{
public:
	String* value;

public:
	Token_constant_name();
	Token_constant_name(String* value);
	virtual bool deep_equals(Object* other);
	virtual Token_constant_name* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_value_as_string();
	virtual Token_constant_name* transform(Tree_transform* transform);
	virtual Token_constant_name* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual Token_constant_name* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_method : public virtual AST_member
{
public:
	AST_signature* signature;
	AST_statement_list* statements;

public:
	AST_method();
	AST_method(AST_signature* signature, AST_statement_list* statements);
	virtual bool deep_equals(Object* other);
	virtual AST_method* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_member_list* transform(Tree_transform* transform);
	virtual AST_member_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_member_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_attribute : public virtual AST_member
{
public:
	AST_attr_mod* attr_mod;
	Token_variable_name* variable_name;
	AST_expr* expr;

public:
	AST_attribute();
	AST_attribute(AST_attr_mod* attr_mod, Token_variable_name* variable_name, AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_attribute* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_member_list* transform(Tree_transform* transform);
	virtual AST_member_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_member_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_if : public virtual AST_statement
{
public:
	AST_expr* expr;
	AST_statement_list* iftrue;
	AST_statement_list* iffalse;

public:
	AST_if();
	AST_if(AST_expr* expr, AST_statement_list* iftrue, AST_statement_list* iffalse);
	virtual bool deep_equals(Object* other);
	virtual AST_if* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	void init();
};

class AST_while : public virtual AST_statement
{
public:
	AST_expr* expr;
	AST_statement_list* statements;

public:
	AST_while();
	AST_while(AST_expr* expr, AST_statement_list* statements);
	virtual bool deep_equals(Object* other);
	virtual AST_while* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_do : public virtual AST_statement
{
public:
	AST_statement_list* statements;
	AST_expr* expr;

public:
	AST_do();
	AST_do(AST_statement_list* statements, AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_do* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_for : public virtual AST_statement
{
public:
	AST_expr* init;
	AST_expr* cond;
	AST_expr* incr;
	AST_statement_list* statements;

public:
	AST_for();
	AST_for(AST_expr* init, AST_expr* cond, AST_expr* incr, AST_statement_list* statements);
	virtual bool deep_equals(Object* other);
	virtual AST_for* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_foreach : public virtual AST_statement
{
public:
	AST_expr* expr;
	AST_variable* key;
	bool is_ref;
	AST_variable* val;
	AST_statement_list* statements;

public:
	AST_foreach();
	AST_foreach(AST_expr* expr, AST_variable* key, bool is_ref, AST_variable* val, AST_statement_list* statements);
	virtual bool deep_equals(Object* other);
	virtual AST_foreach* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_switch : public virtual AST_statement
{
public:
	AST_expr* expr;
	AST_switch_case_list* switch_cases;

public:
	AST_switch();
	AST_switch(AST_expr* expr, AST_switch_case_list* switch_cases);
	virtual bool deep_equals(Object* other);
	virtual AST_switch* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_break : public virtual AST_statement
{
public:
	AST_expr* expr;

public:
	AST_break();
	AST_break(AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_break* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_continue : public virtual AST_statement
{
public:
	AST_expr* expr;

public:
	AST_continue();
	AST_continue(AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_continue* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_return : public virtual AST_statement
{
public:
	AST_expr* expr;

public:
	AST_return();
	AST_return(AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_return* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_static_declaration : public virtual AST_statement
{
public:
	Token_variable_name* variable_name;
	AST_expr* expr;

public:
	AST_static_declaration();
	AST_static_declaration(Token_variable_name* variable_name, AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_static_declaration* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_unset : public virtual AST_statement
{
public:
	AST_variable* variable;

public:
	AST_unset();
	AST_unset(AST_variable* variable);
	virtual bool deep_equals(Object* other);
	virtual AST_unset* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_declare : public virtual AST_statement
{
public:
	AST_directive_list* directives;
	AST_statement_list* statements;

public:
	AST_declare();
	AST_declare(AST_directive_list* directives, AST_statement_list* statements);
	virtual bool deep_equals(Object* other);
	virtual AST_declare* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_try : public virtual AST_statement
{
public:
	AST_statement_list* statements;
	AST_catch_list* catches;

public:
	AST_try();
	AST_try(AST_statement_list* statements, AST_catch_list* catches);
	virtual bool deep_equals(Object* other);
	virtual AST_try* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_throw : public virtual AST_statement
{
public:
	AST_expr* expr;

public:
	AST_throw();
	AST_throw(AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_throw* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_eval_expr : public virtual AST_statement
{
public:
	AST_expr* expr;

public:
	AST_eval_expr();
	AST_eval_expr(AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_eval_expr* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_statement_list* transform(Tree_transform* transform);
	virtual AST_statement_list* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_statement_list* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_literal : public virtual AST_expr
{
public:

public:
	virtual bool deep_equals(Object* other);
	virtual AST_literal* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform) = 0;
	virtual AST_expr* pre_transform(Tree_transform* transform) = 0;
	virtual void transform_children(Tree_transform* transform) = 0;
	virtual AST_expr* post_transform(Tree_transform* transform) = 0;
	virtual void visit(Tree_visitor* visitor) = 0;
	virtual void pre_visit(Tree_visitor* visitor) = 0;
	virtual void visit_children(Tree_visitor* visitor) = 0;
	virtual void post_visit(Tree_visitor* visitor) = 0;
	virtual String* get_value_as_string() = 0;
	virtual String* get_source_rep() = 0;
};

class AST_assignment : public virtual AST_expr
{
public:
	AST_variable* variable;
	bool is_ref;
	AST_expr* expr;

public:
	AST_assignment();
	AST_assignment(AST_variable* variable, bool is_ref, AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_assignment* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	void init();
};

class AST_list_assignment : public virtual AST_expr
{
public:
	AST_list_elements* list_elements;
	AST_expr* expr;

public:
	AST_list_assignment();
	AST_list_assignment(AST_list_elements* list_elements, AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_list_assignment* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_cast : public virtual AST_expr
{
public:
	Token_cast* cast;
	AST_expr* expr;

public:
	AST_cast();
	AST_cast(Token_cast* cast, AST_expr* expr);
	AST_cast(char* cast, AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_cast* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_unary_op : public virtual AST_expr
{
public:
	Token_op* op;
	AST_expr* expr;

public:
	AST_unary_op();
	AST_unary_op(Token_op* op, AST_expr* expr);
	AST_unary_op(AST_expr* expr, char* op);
	virtual bool deep_equals(Object* other);
	virtual AST_unary_op* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_bin_op : public virtual AST_expr
{
public:
	AST_expr* left;
	Token_op* op;
	AST_expr* right;

public:
	AST_bin_op();
	AST_bin_op(AST_expr* left, Token_op* op, AST_expr* right);
	AST_bin_op(AST_expr* left, AST_expr* right, char* op);
	virtual bool deep_equals(Object* other);
	virtual AST_bin_op* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_conditional_expr : public virtual AST_expr
{
public:
	AST_expr* cond;
	AST_expr* iftrue;
	AST_expr* iffalse;

public:
	AST_conditional_expr();
	AST_conditional_expr(AST_expr* cond, AST_expr* iftrue, AST_expr* iffalse);
	virtual bool deep_equals(Object* other);
	virtual AST_conditional_expr* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_ignore_errors : public virtual AST_expr
{
public:
	AST_expr* expr;

public:
	AST_ignore_errors();
	AST_ignore_errors(AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_ignore_errors* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_constant : public virtual AST_expr
{
public:
	Token_class_name* class_name;
	Token_constant_name* constant_name;

public:
	AST_constant();
	AST_constant(Token_class_name* class_name, Token_constant_name* constant_name);
	AST_constant(char* class_name, Token_constant_name* constant_name);
	virtual bool deep_equals(Object* other);
	virtual AST_constant* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_instanceof : public virtual AST_expr
{
public:
	AST_expr* expr;
	AST_class_name* class_name;

public:
	AST_instanceof();
	AST_instanceof(AST_expr* expr, AST_class_name* class_name);
	virtual bool deep_equals(Object* other);
	virtual AST_instanceof* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_variable : public virtual AST_expr, public virtual AST_list_element
{
public:
	AST_target* target;
	AST_variable_name* variable_name;
	AST_expr_list* array_indices;
	AST_expr* string_index;

public:
	AST_variable();
	AST_variable(AST_target* target, AST_variable_name* variable_name, AST_expr_list* array_indices, AST_expr* string_index);
	AST_variable(AST_variable_name* name);
	virtual bool deep_equals(Object* other);
	virtual AST_variable* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_variable* transform(Tree_transform* transform);
	virtual AST_variable* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_variable* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	void init();
};

class AST_pre_op : public virtual AST_expr
{
public:
	Token_op* op;
	AST_variable* variable;

public:
	AST_pre_op();
	AST_pre_op(Token_op* op, AST_variable* variable);
	AST_pre_op(AST_variable* var, char* op);
	virtual bool deep_equals(Object* other);
	virtual AST_pre_op* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_post_op : public virtual AST_expr
{
public:
	AST_variable* variable;
	Token_op* op;

public:
	AST_post_op();
	AST_post_op(AST_variable* variable, Token_op* op);
	AST_post_op(AST_variable* var, char* op);
	virtual bool deep_equals(Object* other);
	virtual AST_post_op* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_array : public virtual AST_expr
{
public:
	AST_array_elem_list* array_elems;

public:
	AST_array();
	AST_array(AST_array_elem_list* array_elems);
	virtual bool deep_equals(Object* other);
	virtual AST_array* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_method_invocation : public virtual AST_expr
{
public:
	AST_target* target;
	AST_method_name* method_name;
	AST_actual_parameter_list* actual_parameters;

public:
	AST_method_invocation();
	AST_method_invocation(AST_target* target, AST_method_name* method_name, AST_actual_parameter_list* actual_parameters);
	AST_method_invocation(const char* name, AST_expr* arg);
	AST_method_invocation(Token_method_name* name, AST_expr* arg);
	AST_method_invocation(const char* target, const char* name, AST_expr* arg);
	virtual bool deep_equals(Object* other);
	virtual AST_method_invocation* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_new : public virtual AST_expr
{
public:
	AST_class_name* class_name;
	AST_actual_parameter_list* actual_parameters;

public:
	AST_new();
	AST_new(AST_class_name* class_name, AST_actual_parameter_list* actual_parameters);
	virtual bool deep_equals(Object* other);
	virtual AST_new* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class AST_clone : public virtual AST_expr
{
public:
	AST_expr* expr;

public:
	AST_clone();
	AST_clone(AST_expr* expr);
	virtual bool deep_equals(Object* other);
	virtual AST_clone* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
};

class Token_int : public virtual AST_literal
{
public:
	int value;
	String* source_rep;

public:
	Token_int();
	Token_int(int value, String* source_rep);
	virtual bool deep_equals(Object* other);
	virtual Token_int* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_source_rep();
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual String* get_value_as_string();
};

class Token_real : public virtual AST_literal
{
public:
	double value;
	String* source_rep;

public:
	Token_real();
	Token_real(double value, String* source_rep);
	virtual bool deep_equals(Object* other);
	virtual Token_real* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_source_rep();
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual String* get_value_as_string();
};

class Token_string : public virtual AST_literal
{
public:
	String* value;
	String* source_rep;

public:
	Token_string();
	Token_string(String* value, String* source_rep);
	virtual bool deep_equals(Object* other);
	virtual Token_string* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_source_rep();
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual String* get_value_as_string();
};

class Token_bool : public virtual AST_literal
{
public:
	bool value;
	String* source_rep;

public:
	Token_bool();
	Token_bool(bool value, String* source_rep);
	virtual bool deep_equals(Object* other);
	virtual Token_bool* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_source_rep();
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual String* get_value_as_string();
};

class Token_null : public virtual AST_literal
{
public:
	String* source_rep;

public:
	Token_null();
	Token_null(String* source_rep);
	virtual bool deep_equals(Object* other);
	virtual Token_null* deep_clone(Object* partial_result = NULL);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
	virtual String* get_source_rep();
	virtual AST_expr* transform(Tree_transform* transform);
	virtual AST_expr* pre_transform(Tree_transform* transform);
	virtual void transform_children(Tree_transform* transform);
	virtual AST_expr* post_transform(Tree_transform* transform);
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual String* get_value_as_string();
};

class Wildcard : public virtual String, public virtual AST_interface_def_list, public virtual AST_class_def_list, public virtual Token_interface_name_list, public virtual AST_member_list, public virtual AST_statement_list, public virtual AST_formal_parameter_list, public virtual AST_switch_case_list, public virtual AST_directive_list, public virtual AST_catch_list, public virtual AST_list_element_list, public virtual AST_expr_list, public virtual AST_array_elem_list, public virtual AST_actual_parameter_list, public virtual AST_php_script, public virtual AST_interface_def, public virtual AST_class_def, public virtual AST_class_mod, public virtual AST_member, public virtual AST_method, public virtual AST_signature, public virtual AST_method_mod, public virtual AST_formal_parameter, public virtual AST_type, public virtual AST_attribute, public virtual AST_attr_mod, public virtual AST_statement, public virtual AST_if, public virtual AST_while, public virtual AST_do, public virtual AST_for, public virtual AST_foreach, public virtual AST_switch, public virtual AST_switch_case, public virtual AST_break, public virtual AST_continue, public virtual AST_return, public virtual AST_static_declaration, public virtual AST_unset, public virtual AST_declare, public virtual AST_directive, public virtual AST_try, public virtual AST_catch, public virtual AST_throw, public virtual AST_eval_expr, public virtual AST_expr, public virtual AST_literal, public virtual AST_assignment, public virtual AST_list_assignment, public virtual AST_list_elements, public virtual AST_list_element, public virtual AST_cast, public virtual AST_unary_op, public virtual AST_bin_op, public virtual AST_conditional_expr, public virtual AST_ignore_errors, public virtual AST_constant, public virtual AST_instanceof, public virtual AST_variable, public virtual AST_variable_name, public virtual AST_reflection, public virtual AST_target, public virtual AST_pre_op, public virtual AST_post_op, public virtual AST_array, public virtual AST_array_elem, public virtual AST_method_invocation, public virtual AST_method_name, public virtual AST_actual_parameter, public virtual AST_new, public virtual AST_class_name, public virtual AST_clone, public virtual AST_node, public virtual AST_commented_node, public virtual AST_identifier, public virtual Token_interface_name, public virtual Token_class_name, public virtual Token_method_name, public virtual Token_variable_name, public virtual Token_directive_name, public virtual Token_int, public virtual Token_real, public virtual Token_string, public virtual Token_bool, public virtual Token_null, public virtual Token_cast, public virtual Token_op, public virtual Token_constant_name
{
public:

public:
	virtual void visit(Tree_visitor* visitor);
	virtual void pre_visit(Tree_visitor* visitor);
	virtual void visit_children(Tree_visitor* visitor);
	virtual void post_visit(Tree_visitor* visitor);
	virtual Wildcard* transform(Tree_transform* transform);
	virtual Wildcard* pre_transform(Tree_transform* pre_transform);
	virtual void transform_children(Tree_transform* transform_children);
	virtual Wildcard* post_transform(Tree_transform* post_transform);
	virtual String* get_source_rep();
	virtual String* get_value_as_string();
	virtual Wildcard* deep_clone(Object* partial_result);
	virtual bool deep_equals(Object* pattern);
	virtual bool match(Object* pattern);
	virtual bool try_match(Object* pattern);
	virtual void replace_wildcards(Object* pattern);
};

extern Wildcard* WILDCARD;

#endif // _AST_H_
