main.c File Reference

#include <sys/types.h>
#include <signal.h>
#include "defs.h"

Include dependency graph for main.c:

Go to the source code of this file.

Functions

char * mktemp ()
char * getenv ()
 done (int k)
void onintr (int signo)
 set_signals ()
 usage ()
 getargs (int argc, argv)
char * allocate (unsigned n)
 create_file_names ()
 open_files ()
int main (int argc, argv)

Variables

char dflag
char lflag
char rflag
char tflag
char vflag
char * symbol_prefix
char * file_prefix = "y"
char * myname = "yacc"
char * temp_form = "yacc.XXXXXXX"
int lineno
int outline
char * action_file_name
char * code_file_name
char * defines_file_name
char * input_file_name = ""
char * output_file_name
char * text_file_name
char * union_file_name
char * verbose_file_name
FILEaction_file
FILEcode_file
FILEdefines_file
FILEinput_file
FILEoutput_file
FILEtext_file
FILEunion_file
FILEverbose_file
int nitems
int nrules
int nsyms
int ntokens
int nvars
int start_symbol
char ** symbol_name
short * symbol_value
short * symbol_prec
char * symbol_assoc
short * ritem
short * rlhs
short * rrhs
short * rprec
char * rassoc
short ** derives
char * nullable


Function Documentation

char* allocate unsigned  n  ) 
 

Definition at line 213 of file main.c.

References CALLOC, no_space(), NULL, and p.

create_file_names  ) 
 

Definition at line 228 of file main.c.

References action_file_name, code_file_name, CODE_SUFFIX, defines_file_name, DEFINES_SUFFIX, dflag, file_prefix, getenv(), i, MALLOC, mktemp(), no_space(), output_file_name, OUTPUT_SUFFIX, rflag, strcpy(), strlen(), temp_form, text_file_name, tmpdir, union_file_name, verbose_file_name, VERBOSE_SUFFIX, and vflag.

Referenced by open_files().

done int  k  ) 
 

Definition at line 65 of file main.c.

References action_file, action_file_name, exit(), fclose(), text_file, text_file_name, union_file, union_file_name, and unlink.

getargs int  argc,
argv 
 

Definition at line 107 of file main.c.

References dflag, file_prefix, i, input_file, lflag, myname, rflag, s, stdin, symbol_prefix, tflag, usage, and vflag.

Referenced by main().

char* getenv  ) 
 

int main int  argc,
argv 
 

Definition at line 363 of file main.c.

References done, getargs(), lalr(), lr0(), make_parser(), open_files(), output, reader(), set_signals(), and verbose.

char* mktemp  ) 
 

void onintr int  signo  ) 
 

Definition at line 76 of file main.c.

References done.

Referenced by main(), onintr(), set_signals(), and waitfor().

open_files  ) 
 

Definition at line 311 of file main.c.

References action_file, action_file_name, code_file, code_file_name, create_file_names(), defines_file, defines_file_name, dflag, fopen(), input_file, input_file_name, open_error(), output_file, output_file_name, rflag, text_file, text_file_name, union_file, union_file_name, verbose_file, verbose_file_name, and vflag.

Referenced by main().

set_signals  ) 
 

Definition at line 83 of file main.c.

References onintr(), SIG_IGN, SIGHUP, SIGINT, signal(), and SIGTERM.

Referenced by main().

usage void   ) 
 

Definition at line 100 of file main.c.

References exit(), fprintf(), myname, and stderr.


Variable Documentation

FILE* action_file
 

Definition at line 28 of file main.c.

Referenced by copy_action(), done(), open_files(), and output_semantic_actions().

char* action_file_name
 

Definition at line 19 of file main.c.

Referenced by create_file_names(), done(), open_files(), and output_semantic_actions().

FILE* code_file
 

Definition at line 30 of file main.c.

Referenced by open_files(), output_debug(), output_defines(), output_prefix(), output_semantic_actions(), output_stored_text(), output_stype(), output_table(), output_trailing_text(), and write_section().

char* code_file_name
 

Definition at line 20 of file main.c.

Referenced by create_file_names(), open_files(), output_semantic_actions(), output_stored_text(), and output_trailing_text().

FILE* defines_file
 

Definition at line 31 of file main.c.

Referenced by open_files(), and output_defines().

char* defines_file_name
 

Definition at line 21 of file main.c.

Referenced by create_file_names(), and open_files().

short** derives
 

Definition at line 58 of file main.c.

Referenced by build_relations(), free_derives(), initialize_states(), set_derives(), and set_EFF().

char dflag
 

Definition at line 5 of file main.c.

char* file_prefix = "y"
 

Definition at line 12 of file main.c.

Referenced by create_file_names(), and getargs().

FILE* input_file
 

Definition at line 32 of file main.c.

Referenced by get_line(), getargs(), main(), open_files(), and output_trailing_text().

char* input_file_name = ""
 

Definition at line 22 of file main.c.

Referenced by copy_action(), copy_text(), copy_union(), default_action_warning(), dollar_error(), dollar_warning(), illegal_character(), illegal_tag(), no_grammar(), open_files(), output_trailing_text(), over_unionized(), prec_redeclared(), reprec_warning(), restarted_warning(), retyped_warning(), revalued_warning(), syntax_error(), terminal_lhs(), terminal_start(), tokenized_start(), unexpected_EOF(), unknown_rhs(), unterminated_action(), unterminated_comment(), unterminated_string(), unterminated_text(), unterminated_union(), untyped_lhs(), untyped_rhs(), and used_reserved().

char lflag
 

Definition at line 6 of file main.c.

int lineno
 

Definition at line 16 of file main.c.

char* myname = "yacc"
 

Definition at line 13 of file main.c.

int nitems
 

Definition at line 41 of file main.c.

Referenced by add_symbol(), allocate_itemsets(), allocate_storage(), copy_action(), end_rule(), fts_build(), fts_open(), generate_states(), get_state(), initialize_grammar(), insert_empty_rule(), pack_grammar(), set_maxrhs(), set_nullable(), and show_ritems().

int nrules
 

Definition at line 42 of file main.c.

Referenced by allocate_storage(), closure(), copy_action(), end_rule(), finalize_closure(), generate_states(), initialize_grammar(), insert_empty_rule(), log_unused(), mark_symbol(), output_rule_data(), pack_grammar(), print_grammar(), read_grammar(), set_derives(), set_first_derives(), show_rrhs(), start_rule(), unused_rules(), and verbose().

int nsyms
 

Definition at line 43 of file main.c.

Referenced by allocate_itemsets(), allocate_storage(), goto_actions(), new_itemsets(), pack_symbols(), set_derives(), set_EFF(), and set_first_derives().

int ntokens
 

Definition at line 44 of file main.c.

Referenced by add_reductions(), finalize_closure(), lalr(), output_actions(), output_debug(), output_defines(), pack_symbols(), set_first_derives(), set_goto_map(), token_actions(), and verbose().

char* nullable
 

Definition at line 59 of file main.c.

Referenced by free_nullable(), and set_nullable().

int nvars
 

Definition at line 45 of file main.c.

Referenced by output_actions(), set_derives(), set_EFF(), set_first_derives(), set_goto_map(), and verbose().

int outline
 

Definition at line 17 of file main.c.

FILE* output_file
 

Definition at line 33 of file main.c.

char* output_file_name
 

Definition at line 23 of file main.c.

Referenced by create_file_names(), and open_files().

char* rassoc
 

Definition at line 57 of file main.c.

Referenced by expand_rules(), initialize_grammar(), insert_empty_rule(), mark_symbol(), pack_grammar(), and start_rule().

char rflag
 

Definition at line 7 of file main.c.

short* ritem
 

Definition at line 53 of file main.c.

Referenced by allocate_itemsets(), build_relations(), closure(), find_final_state(), log_unused(), new_itemsets(), pack_grammar(), print_core(), save_reductions(), set_EFF(), set_maxrhs(), set_nullable(), show_cores(), and show_ritems().

short* rlhs
 

Definition at line 54 of file main.c.

Referenced by log_unused(), pack_grammar(), print_core(), print_grammar(), set_derives(), and show_cores().

short* rprec
 

Definition at line 56 of file main.c.

Referenced by expand_rules(), initialize_grammar(), insert_empty_rule(), mark_symbol(), pack_grammar(), and start_rule().

short* rrhs
 

Definition at line 55 of file main.c.

Referenced by build_relations(), initialize_states(), log_unused(), pack_grammar(), print_core(), print_nulls(), set_EFF(), show_cores(), and show_rrhs().

int start_symbol
 

Definition at line 47 of file main.c.

Referenced by free_derives(), goto_actions(), initialize_states(), output_rule_data(), pack_grammar(), set_derives(), set_EFF(), and set_first_derives().

char* symbol_assoc
 

Definition at line 51 of file main.c.

Referenced by get_shifts().

char** symbol_name
 

Definition at line 48 of file main.c.

Referenced by log_unused(), output_debug(), output_defines(), print_core(), print_gotos(), print_grammar(), and show_cores().

short* symbol_prec
 

Definition at line 50 of file main.c.

Referenced by get_shifts().

char* symbol_prefix
 

Definition at line 11 of file main.c.

Referenced by getargs(), goto_actions(), output_base(), output_check(), output_debug(), output_prefix(), output_rule_data(), output_table(), and output_yydefred().

short* symbol_value
 

Definition at line 49 of file main.c.

Referenced by output_debug(), and output_rule_data().

char* temp_form = "yacc.XXXXXXX"
 

Definition at line 14 of file main.c.

Referenced by create_file_names().

FILE* text_file
 

Definition at line 34 of file main.c.

Referenced by copy_text(), copy_union(), done(), open_files(), and output_stored_text().

char* text_file_name
 

Definition at line 24 of file main.c.

Referenced by create_file_names(), done(), open_files(), and output_stored_text().

char tflag
 

Definition at line 8 of file main.c.

FILE* union_file
 

Definition at line 36 of file main.c.

Referenced by copy_union(), done(), and open_files().

char* union_file_name
 

Definition at line 25 of file main.c.

Referenced by create_file_names(), done(), and open_files().

FILE* verbose_file
 

Definition at line 39 of file main.c.

Referenced by log_conflicts(), log_unused(), open_files(), print_actions(), print_core(), print_gotos(), print_grammar(), print_state(), and verbose().

char* verbose_file_name
 

Definition at line 26 of file main.c.

Referenced by create_file_names(), and open_files().

char vflag
 

Definition at line 9 of file main.c.


Generated on Fri Apr 14 22:58:44 2006 for minix by  doxygen 1.4.6