1 |
/* Top level entry point of bison, |
/* Top level entry point of bison, |
2 |
Copyright 1984, 1986, 1989, 1992, 1995, 2000 |
Copyright 1984, 1986, 1989, 1992, 1995, 2000, 2001 |
3 |
Free Software Foundation, Inc. |
Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of Bison, the GNU Compiler Compiler. |
This file is part of Bison, the GNU Compiler Compiler. |
35 |
#include "conflicts.h" |
#include "conflicts.h" |
36 |
#include "print_graph.h" |
#include "print_graph.h" |
37 |
#include "muscle_tab.h" |
#include "muscle_tab.h" |
38 |
|
#include "symtab.h" |
39 |
|
#include "lex.h" |
40 |
|
|
41 |
/* The name this program was run with, for messages. */ |
/* The name this program was run with, for messages. */ |
42 |
char *program_name; |
char *program_name; |
83 |
lookahead is not enough to disambiguate the parsing. In file |
lookahead is not enough to disambiguate the parsing. In file |
84 |
conflicts. Also resolve s/r conflicts based on precedence |
conflicts. Also resolve s/r conflicts based on precedence |
85 |
declarations. */ |
declarations. */ |
86 |
initialize_conflicts (); |
solve_conflicts (); |
87 |
|
|
88 |
|
/* Output file names. */ |
89 |
|
compute_output_file_names (); |
90 |
|
|
91 |
|
/* Stop if there were errors, to avoid trashing previous output |
92 |
|
files. */ |
93 |
|
if (complain_message_count) |
94 |
|
exit (1); |
95 |
|
|
96 |
/* Print information about results, if requested. */ |
/* Print information about results, if requested. */ |
97 |
print_results (); |
print_results (); |
102 |
/* Output the tables and the parser to ftable. In file output. */ |
/* Output the tables and the parser to ftable. In file output. */ |
103 |
output (); |
output (); |
104 |
|
|
105 |
finalize_conflicts (); |
/* Free the symbol table data structure. */ |
106 |
|
free_symtab (); |
107 |
|
|
108 |
|
lex_free (); |
109 |
|
|
110 |
|
/* Close the input files. */ |
111 |
|
close_files (); |
112 |
|
|
113 |
|
free_conflicts (); |
114 |
free_nullable (); |
free_nullable (); |
115 |
free_derives (); |
free_derives (); |
116 |
|
|
117 |
if (!complain_message_count) |
output_files (); |
|
output_files (); |
|
118 |
|
|
119 |
exit (complain_message_count ? 1 : 0); |
exit (complain_message_count ? 1 : 0); |
120 |
} |
} |