|
Berkeley YACC
1993-03-03
Berkeley's version of Yet Another Compiler Compiler
|
Routines for handling errors and warnings and performing cleanup. More...
Files | |
| file | error.c |
| Routines to report various warnings and errors and maybe quit the program. | |
Functions | |
| fatal (char *msg) | |
| no_space () | |
| open_error (char *filename) | |
| unexpected_EOF () | |
| print_pos (char *st_line, char *st_cptr) | |
| syntax_error (int st_lineno, char *st_line, char *st_cptr) | |
| unterminated_comment (int c_lineno, char *c_line, char *c_cptr) | |
| unterminated_string (int s_lineno, char *s_line, char *s_cptr) | |
| unterminated_text (int t_lineno, char *t_line, char *t_cptr) | |
| unterminated_union (int u_lineno, char *u_line, char *u_cptr) | |
| over_unionized (char *u_cptr) | |
| illegal_tag (int t_lineno, char *t_line, char *t_cptr) | |
| illegal_character (char *c_cptr) | |
| used_reserved (char *s) | |
| tokenized_start (char *s) | |
| retyped_warning (char *s) | |
| reprec_warning (char *s) | |
| revalued_warning (char *s) | |
| terminal_start (char *s) | |
| restarted_warning () | |
| no_grammar () | |
| terminal_lhs (int s_lineno) | |
| prec_redeclared () | |
| unterminated_action (int a_lineno, char *a_line, char *a_cptr) | |
| dollar_warning (int a_lineno, int i) | |
| dollar_error (int a_lineno, char *a_line, char *a_cptr) | |
| untyped_lhs () | |
| untyped_rhs (int i, char *s) | |
| unknown_rhs (int i) | |
| default_action_warning () | |
| undefined_goal (char *s) | |
| undefined_symbol_warning (char *s) | |
| done (int k) | |
| Shutdown function. More... | |
| onintr () | |
| Signal handler callback. More... | |
| set_signals () | |
| Sets the appropriate signal handlers up. More... | |
Routines for handling errors and warnings and performing cleanup.
| default_action_warning | ( | ) |
Definition at line 311 of file error.c.
References input_file_name, lineno, and myname.
Referenced by end_rule().
Here is the caller graph for this function:| dollar_error | ( | int | a_lineno, |
| char * | a_line, | ||
| char * | a_cptr | ||
| ) |
Definition at line 272 of file error.c.
References done(), input_file_name, myname, and print_pos().
Referenced by copy_action().
Here is the call graph for this function:
Here is the caller graph for this function:| dollar_warning | ( | int | a_lineno, |
| int | i | ||
| ) |
Definition at line 263 of file error.c.
References input_file_name, and myname.
Referenced by copy_action().
Here is the caller graph for this function:| done | ( | int | k | ) |
Shutdown function.
This function deletes all temporary files still open and exits the program with the status code passed to it.
| [in] | k | The status code the program should exit with |
Definition at line 156 of file main.c.
References action_file, action_file_name, text_file, text_file_name, union_file, and union_file_name.
Referenced by build_relations(), dollar_error(), fatal(), illegal_character(), illegal_tag(), main(), no_grammar(), no_space(), onintr(), open_error(), over_unionized(), set_nullable(), syntax_error(), terminal_lhs(), terminal_start(), tokenized_start(), undefined_goal(), unexpected_EOF(), unknown_rhs(), unterminated_action(), unterminated_comment(), unterminated_string(), unterminated_text(), unterminated_union(), untyped_lhs(), untyped_rhs(), and used_reserved().
| fatal | ( | char * | msg | ) |
Definition at line 19 of file error.c.
References done(), and myname.
Referenced by new_state(), pack_vector(), and set_goto_map().
Here is the call graph for this function:
Here is the caller graph for this function:| illegal_character | ( | char * | c_cptr | ) |
Definition at line 159 of file error.c.
References done(), input_file_name, line, lineno, myname, and print_pos().
Referenced by get_literal().
Here is the call graph for this function:
Here is the caller graph for this function:| illegal_tag | ( | int | t_lineno, |
| char * | t_line, | ||
| char * | t_cptr | ||
| ) |
Definition at line 147 of file error.c.
References done(), input_file_name, myname, and print_pos().
Referenced by get_tag().
Here is the call graph for this function:
Here is the caller graph for this function:| no_grammar | ( | ) |
Definition at line 227 of file error.c.
References done(), input_file_name, lineno, and myname.
Referenced by advance_to_start().
Here is the call graph for this function:
Here is the caller graph for this function:| no_space | ( | ) |
Definition at line 27 of file error.c.
References done(), and myname.
Referenced by allocate(), cachec(), create_file_names(), create_symbol_table(), dup_line(), expand_items(), expand_rules(), get_line(), get_literal(), get_tag(), initialize_grammar(), initialize_states(), make_bucket(), output_debug(), pack_grammar(), pack_names(), pack_symbols(), pack_vector(), read_declarations(), set_nullable(), unused_rules(), and verbose().
Here is the call graph for this function:
Here is the caller graph for this function:| onintr | ( | ) |
Signal handler callback.
This function is executed whenever the program receives a shutdown signal (either SIGINT, SIGTERM, or SIGHUP). It just calls done(int) with code 1.
Definition at line 172 of file main.c.
References done().
Referenced by set_signals().
Here is the call graph for this function:
Here is the caller graph for this function:| open_error | ( | char * | filename | ) |
Definition at line 34 of file error.c.
References done(), and myname.
Referenced by open_files(), output_defines(), output_semantic_actions(), and output_stored_text().
Here is the call graph for this function:
Here is the caller graph for this function:| over_unionized | ( | char * | u_cptr | ) |
Definition at line 137 of file error.c.
References done(), input_file_name, line, lineno, myname, and print_pos().
Referenced by copy_union().
Here is the call graph for this function:
Here is the caller graph for this function:| prec_redeclared | ( | ) |
Definition at line 244 of file error.c.
References input_file_name, lineno, and myname.
Referenced by mark_symbol().
Here is the caller graph for this function:| print_pos | ( | char * | st_line, |
| char * | st_cptr | ||
| ) |
Definition at line 50 of file error.c.
Referenced by dollar_error(), illegal_character(), illegal_tag(), over_unionized(), syntax_error(), unterminated_action(), unterminated_comment(), unterminated_string(), unterminated_text(), and unterminated_union().
Here is the caller graph for this function:| reprec_warning | ( | char * | s | ) |
Definition at line 195 of file error.c.
References input_file_name, lineno, and myname.
Referenced by declare_tokens().
Here is the caller graph for this function:| restarted_warning | ( | ) |
Definition at line 220 of file error.c.
References input_file_name, lineno, and myname.
Referenced by declare_start().
Here is the caller graph for this function:| retyped_warning | ( | char * | s | ) |
Definition at line 187 of file error.c.
References input_file_name, lineno, and myname.
Referenced by declare_tokens(), and declare_types().
Here is the caller graph for this function:| revalued_warning | ( | char * | s | ) |
Definition at line 203 of file error.c.
References input_file_name, lineno, and myname.
Referenced by declare_tokens().
Here is the caller graph for this function:| set_signals | ( | ) |
Sets the appropriate signal handlers up.
This function is executed on startup and sets onintr() as callback for any shutdown signal (SIGINT, SIGTERM, SIGHUP).
Definition at line 185 of file main.c.
References onintr().
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:| syntax_error | ( | int | st_lineno, |
| char * | st_line, | ||
| char * | st_cptr | ||
| ) |
Definition at line 77 of file error.c.
References done(), input_file_name, myname, and print_pos().
Referenced by advance_to_start(), copy_ident(), declare_start(), declare_types(), keyword(), mark_symbol(), read_declarations(), and read_grammar().
Here is the call graph for this function:
Here is the caller graph for this function:| terminal_lhs | ( | int | s_lineno | ) |
Definition at line 235 of file error.c.
References done(), input_file_name, and myname.
Referenced by start_rule().
Here is the call graph for this function:
Here is the caller graph for this function:| terminal_start | ( | char * | s | ) |
Definition at line 211 of file error.c.
References done(), input_file_name, lineno, and myname.
Referenced by advance_to_start(), and declare_start().
Here is the call graph for this function:
Here is the caller graph for this function:| tokenized_start | ( | char * | s | ) |
Definition at line 178 of file error.c.
References done(), input_file_name, lineno, and myname.
Referenced by declare_tokens().
Here is the call graph for this function:
Here is the caller graph for this function:| undefined_goal | ( | char * | s | ) |
Definition at line 318 of file error.c.
References done(), and myname.
Referenced by check_symbols().
Here is the call graph for this function:
Here is the caller graph for this function:| undefined_symbol_warning | ( | char * | s | ) |
| unexpected_EOF | ( | ) |
Definition at line 42 of file error.c.
References done(), input_file_name, lineno, and myname.
Referenced by advance_to_start(), copy_ident(), declare_start(), declare_tokens(), declare_types(), get_tag(), and read_declarations().
Here is the call graph for this function:
Here is the caller graph for this function:| unknown_rhs | ( | int | i | ) |
Definition at line 302 of file error.c.
References done(), input_file_name, lineno, and myname.
Referenced by copy_action().
Here is the call graph for this function:
Here is the caller graph for this function:| unterminated_action | ( | int | a_lineno, |
| char * | a_line, | ||
| char * | a_cptr | ||
| ) |
Definition at line 251 of file error.c.
References done(), input_file_name, myname, and print_pos().
Referenced by copy_action().
Here is the call graph for this function:
Here is the caller graph for this function:| unterminated_comment | ( | int | c_lineno, |
| char * | c_line, | ||
| char * | c_cptr | ||
| ) |
Definition at line 89 of file error.c.
References done(), input_file_name, myname, and print_pos().
Referenced by copy_action(), copy_text(), copy_union(), and skip_comment().
Here is the call graph for this function:
Here is the caller graph for this function:| unterminated_string | ( | int | s_lineno, |
| char * | s_line, | ||
| char * | s_cptr | ||
| ) |
Definition at line 101 of file error.c.
References done(), input_file_name, myname, and print_pos().
Referenced by copy_action(), copy_text(), copy_union(), and get_literal().
Here is the call graph for this function:
Here is the caller graph for this function:| unterminated_text | ( | int | t_lineno, |
| char * | t_line, | ||
| char * | t_cptr | ||
| ) |
Definition at line 113 of file error.c.
References done(), input_file_name, myname, and print_pos().
Referenced by copy_text().
Here is the call graph for this function:
Here is the caller graph for this function:| unterminated_union | ( | int | u_lineno, |
| char * | u_line, | ||
| char * | u_cptr | ||
| ) |
Definition at line 125 of file error.c.
References done(), input_file_name, myname, and print_pos().
Referenced by copy_union().
Here is the call graph for this function:
Here is the caller graph for this function:| untyped_lhs | ( | ) |
Definition at line 284 of file error.c.
References done(), input_file_name, lineno, and myname.
Referenced by copy_action().
Here is the call graph for this function:
Here is the caller graph for this function:| untyped_rhs | ( | int | i, |
| char * | s | ||
| ) |
Definition at line 292 of file error.c.
References done(), input_file_name, lineno, and myname.
Referenced by copy_action().
Here is the call graph for this function:
Here is the caller graph for this function:| used_reserved | ( | char * | s | ) |
Definition at line 169 of file error.c.
References done(), input_file_name, lineno, and myname.
Referenced by get_name().
Here is the call graph for this function:
Here is the caller graph for this function: