stage3/stage3.cc
changeset 560 13b5b7faa3d7
parent 559 a3b8925e640c
child 564 dabffc3086dc
equal deleted inserted replaced
559:a3b8925e640c 560:13b5b7faa3d7
    37 #include "flow_control_analysis.hh"
    37 #include "flow_control_analysis.hh"
    38 #include "fill_candidate_datatypes.hh"
    38 #include "fill_candidate_datatypes.hh"
    39 #include "narrow_candidate_datatypes.hh"
    39 #include "narrow_candidate_datatypes.hh"
    40 #include "print_datatypes_error.hh"
    40 #include "print_datatypes_error.hh"
    41 #include "lvalue_check.hh"
    41 #include "lvalue_check.hh"
    42 #include "range_check.hh"
    42 #include "array_range_check.hh"
    43 
    43 
    44 
    44 
    45 static int flow_control_analysis(symbol_c *tree_root){
    45 static int flow_control_analysis(symbol_c *tree_root){
    46   flow_control_analysis_c flow_control_analysis(tree_root);
    46   flow_control_analysis_c flow_control_analysis(tree_root);
    47   tree_root->accept(flow_control_analysis);
    47   tree_root->accept(flow_control_analysis);
    71 	tree_root->accept(lvalue_check);
    71 	tree_root->accept(lvalue_check);
    72 	return lvalue_check.get_error_count();
    72 	return lvalue_check.get_error_count();
    73 }
    73 }
    74 
    74 
    75 static int range_check(symbol_c *tree_root){
    75 static int range_check(symbol_c *tree_root){
    76 	range_check_c range_check(tree_root);
    76 	array_range_check_c array_range_check(tree_root);
    77 	tree_root->accept(range_check);
    77 	tree_root->accept(array_range_check);
    78 	return range_check.get_error_count();
    78 	return array_range_check.get_error_count();
    79 }
    79 }
    80 
    80 
    81 
    81 
    82 int stage3(symbol_c *tree_root){
    82 int stage3(symbol_c *tree_root){
    83 	int error_count = 0;
    83 	int error_count = 0;