|
Nearly CC
An educational compiler skeleton
|
Base class for AST visitors. More...
#include "ast_visitor.h"

Public Member Functions | |
| virtual void | visit (Node *n) |
| Visit given AST Node. More... | |
| virtual void | visit_unit (Node *n) |
Visit a Node with the AST_UNIT tag value. More... | |
| virtual void | visit_variable_declaration (Node *n) |
Visit a Node with the AST_VARIABLE_DECLARATION tag value. More... | |
| virtual void | visit_struct_type (Node *n) |
Visit a Node with the AST_STRUCT_TYPE tag value. More... | |
| virtual void | visit_union_type (Node *n) |
Visit a Node with the AST_UNION_TYPE tag value. More... | |
| virtual void | visit_basic_type (Node *n) |
Visit a Node with the AST_BASIC_TYPE tag value. More... | |
| virtual void | visit_declarator_list (Node *n) |
Visit a Node with the AST_DECLARATOR_LIST tag value. More... | |
| virtual void | visit_named_declarator (Node *n) |
Visit a Node with the AST_NAMED_DECLARATOR tag value. More... | |
| virtual void | visit_pointer_declarator (Node *n) |
Visit a Node with the AST_POINTER_DECLARATOR tag value. More... | |
| virtual void | visit_array_declarator (Node *n) |
Visit a Node with the AST_ARRAY_DECLARATOR tag value. More... | |
| virtual void | visit_function_definition (Node *n) |
Visit a Node with the AST_FUNCTION_DEFINITION tag value. More... | |
| virtual void | visit_function_declaration (Node *n) |
Visit a Node with the AST_FUNCTION_DECLARATION tag value. More... | |
| virtual void | visit_function_parameter_list (Node *n) |
Visit a Node with the AST_FUNCTION_PARAMETER_LIST tag value. More... | |
| virtual void | visit_function_parameter (Node *n) |
Visit a Node with the AST_FUNCTION_PARAMETER tag value. More... | |
| virtual void | visit_statement_list (Node *n) |
Visit a Node with the AST_STATEMENT_LIST tag value. More... | |
| virtual void | visit_empty_statement (Node *n) |
Visit a Node with the AST_EMPTY_STATEMENT tag value. More... | |
| virtual void | visit_expression_statement (Node *n) |
Visit a Node with the AST_EXPRESSION_STATEMENT tag value. More... | |
| virtual void | visit_return_statement (Node *n) |
Visit a Node with the AST_RETURN_STATEMENT tag value. More... | |
| virtual void | visit_return_expression_statement (Node *n) |
Visit a Node with the AST_RETURN_EXPRESSION_STATEMENT tag value. More... | |
| virtual void | visit_while_statement (Node *n) |
Visit a Node with the AST_WHILE_STATEMENT tag value. More... | |
| virtual void | visit_do_while_statement (Node *n) |
Visit a Node with the AST_DO_WHILE_STATEMENT tag value. More... | |
| virtual void | visit_for_statement (Node *n) |
Visit a Node with the AST_FOR_STATEMENT tag value. More... | |
| virtual void | visit_if_statement (Node *n) |
Visit a Node with the AST_IF_STATEMENT tag value. More... | |
| virtual void | visit_if_else_statement (Node *n) |
Visit a Node with the AST_IF_ELSE_STATEMENT tag value. More... | |
| virtual void | visit_struct_type_definition (Node *n) |
Visit a Node with the AST_STRUCT_TYPE_DEFINITION tag value. More... | |
| virtual void | visit_union_type_definition (Node *n) |
Visit a Node with the AST_UNION_TYPE_DEFINITION tag value. More... | |
| virtual void | visit_field_definition_list (Node *n) |
Visit a Node with the AST_FIELD_DEFINITION_LIST tag value. More... | |
| virtual void | visit_binary_expression (Node *n) |
Visit a Node with the AST_BINARY_EXPRESSION tag value. More... | |
| virtual void | visit_unary_expression (Node *n) |
Visit a Node with the AST_UNARY_EXPRESSION tag value. More... | |
| virtual void | visit_postfix_expression (Node *n) |
Visit a Node with the AST_POSTFIX_EXPRESSION tag value. More... | |
| virtual void | visit_conditional_expression (Node *n) |
Visit a Node with the AST_CONDITIONAL_EXPRESSION tag value. More... | |
| virtual void | visit_cast_expression (Node *n) |
Visit a Node with the AST_CAST_EXPRESSION tag value. More... | |
| virtual void | visit_function_call_expression (Node *n) |
Visit a Node with the AST_FUNCTION_CALL_EXPRESSION tag value. More... | |
| virtual void | visit_field_ref_expression (Node *n) |
Visit a Node with the AST_FIELD_REF_EXPRESSION tag value. More... | |
| virtual void | visit_indirect_field_ref_expression (Node *n) |
Visit a Node with the AST_INDIRECT_FIELD_REF_EXPRESSION tag value. More... | |
| virtual void | visit_array_element_ref_expression (Node *n) |
Visit a Node with the AST_ARRAY_ELEMENT_REF_EXPRESSION tag value. More... | |
| virtual void | visit_argument_expression_list (Node *n) |
Visit a Node with the AST_ARGUMENT_EXPRESSION_LIST tag value. More... | |
| virtual void | visit_variable_ref (Node *n) |
Visit a Node with the AST_VARIABLE_REF tag value. More... | |
| virtual void | visit_literal_value (Node *n) |
Visit a Node with the AST_LITERAL_VALUE tag value. More... | |
| virtual void | visit_implicit_conversion (Node *n) |
Visit a Node with the AST_IMPLICIT_CONVERSION tag value. More... | |
| virtual void | visit_children (Node *n) |
Call visit on each child Node of the given parent Node. More... | |
| virtual void | visit_token (Node *n) |
| This method is called if the Node being visited is a token (terminal symbol). More... | |
Base class for AST visitors.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Visit a Node with the AST_ARRAY_ELEMENT_REF_EXPRESSION tag value.
| n | a Node with the AST_ARRAY_ELEMENT_REF_EXPRESSION tag value |
Reimplemented in SemanticAnalysis, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_BASIC_TYPE tag value.
| n | a Node with the AST_BASIC_TYPE tag value |
Reimplemented in SemanticAnalysis.
|
virtual |
Visit a Node with the AST_BINARY_EXPRESSION tag value.
| n | a Node with the AST_BINARY_EXPRESSION tag value |
Reimplemented in SemanticAnalysis, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_CAST_EXPRESSION tag value.
| n | a Node with the AST_CAST_EXPRESSION tag value |
Reimplemented in SemanticAnalysis.
|
virtual |
|
virtual |
Visit a Node with the AST_CONDITIONAL_EXPRESSION tag value.
| n | a Node with the AST_CONDITIONAL_EXPRESSION tag value |
Reimplemented in SemanticAnalysis.
|
virtual |
Visit a Node with the AST_DECLARATOR_LIST tag value.
| n | a Node with the AST_DECLARATOR_LIST tag value |
Reimplemented in LocalStorageAllocation.
|
virtual |
Visit a Node with the AST_DO_WHILE_STATEMENT tag value.
| n | a Node with the AST_DO_WHILE_STATEMENT tag value |
Reimplemented in LoopVars, and HighLevelCodegen.
|
virtual |
|
virtual |
Visit a Node with the AST_EXPRESSION_STATEMENT tag value.
| n | a Node with the AST_EXPRESSION_STATEMENT tag value |
Reimplemented in HighLevelCodegen.
|
virtual |
|
virtual |
Visit a Node with the AST_FIELD_REF_EXPRESSION tag value.
| n | a Node with the AST_FIELD_REF_EXPRESSION tag value |
Reimplemented in SemanticAnalysis, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_FOR_STATEMENT tag value.
| n | a Node with the AST_FOR_STATEMENT tag value |
Reimplemented in LoopVars, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_FUNCTION_CALL_EXPRESSION tag value.
| n | a Node with the AST_FUNCTION_CALL_EXPRESSION tag value |
Reimplemented in SemanticAnalysis, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_FUNCTION_DECLARATION tag value.
| n | a Node with the AST_FUNCTION_DECLARATION tag value |
Reimplemented in SemanticAnalysis.
|
virtual |
Visit a Node with the AST_FUNCTION_DEFINITION tag value.
| n | a Node with the AST_FUNCTION_DEFINITION tag value |
Reimplemented in SemanticAnalysis, LocalStorageAllocation, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_FUNCTION_PARAMETER tag value.
| n | a Node with the AST_FUNCTION_PARAMETER tag value |
Reimplemented in SemanticAnalysis, and LocalStorageAllocation.
|
virtual |
|
virtual |
Visit a Node with the AST_IF_ELSE_STATEMENT tag value.
| n | a Node with the AST_IF_ELSE_STATEMENT tag value |
Reimplemented in HighLevelCodegen.
|
virtual |
Visit a Node with the AST_IF_STATEMENT tag value.
| n | a Node with the AST_IF_STATEMENT tag value |
Reimplemented in HighLevelCodegen.
|
virtual |
Visit a Node with the AST_IMPLICIT_CONVERSION tag value.
| n | a Node with the AST_IMPLICIT_CONVERSION tag value |
Reimplemented in HighLevelCodegen.
|
virtual |
Visit a Node with the AST_INDIRECT_FIELD_REF_EXPRESSION tag value.
| n | a Node with the AST_INDIRECT_FIELD_REF_EXPRESSION tag value |
Reimplemented in SemanticAnalysis, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_LITERAL_VALUE tag value.
| n | a Node with the AST_LITERAL_VALUE tag value |
Reimplemented in SemanticAnalysis, and HighLevelCodegen.
|
virtual |
|
virtual |
|
virtual |
Visit a Node with the AST_POSTFIX_EXPRESSION tag value.
| n | a Node with the AST_POSTFIX_EXPRESSION tag value |
Reimplemented in SemanticAnalysis.
|
virtual |
Visit a Node with the AST_RETURN_EXPRESSION_STATEMENT tag value.
| n | a Node with the AST_RETURN_EXPRESSION_STATEMENT tag value |
Reimplemented in SemanticAnalysis, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_RETURN_STATEMENT tag value.
| n | a Node with the AST_RETURN_STATEMENT tag value |
Reimplemented in HighLevelCodegen.
|
virtual |
Visit a Node with the AST_STATEMENT_LIST tag value.
| n | a Node with the AST_STATEMENT_LIST tag value |
Reimplemented in SemanticAnalysis, LocalStorageAllocation, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_STRUCT_TYPE tag value.
| n | a Node with the AST_STRUCT_TYPE tag value |
Reimplemented in SemanticAnalysis.
|
virtual |
Visit a Node with the AST_STRUCT_TYPE_DEFINITION tag value.
| n | a Node with the AST_STRUCT_TYPE_DEFINITION tag value |
Reimplemented in SemanticAnalysis, and LocalStorageAllocation.
|
virtual |
|
virtual |
Visit a Node with the AST_UNARY_EXPRESSION tag value.
| n | a Node with the AST_UNARY_EXPRESSION tag value |
Reimplemented in SemanticAnalysis, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_UNION_TYPE tag value.
| n | a Node with the AST_UNION_TYPE tag value |
Reimplemented in SemanticAnalysis.
|
virtual |
|
virtual |
|
virtual |
Visit a Node with the AST_VARIABLE_DECLARATION tag value.
| n | a Node with the AST_VARIABLE_DECLARATION tag value |
Reimplemented in SemanticAnalysis.
|
virtual |
Visit a Node with the AST_VARIABLE_REF tag value.
| n | a Node with the AST_VARIABLE_REF tag value |
Reimplemented in SemanticAnalysis, LoopVars, and HighLevelCodegen.
|
virtual |
Visit a Node with the AST_WHILE_STATEMENT tag value.
| n | a Node with the AST_WHILE_STATEMENT tag value |
Reimplemented in LoopVars, and HighLevelCodegen.