Fixed state
parent
d042cd00fb
commit
c857bb68e8
|
@ -6,19 +6,19 @@
|
||||||
|
|
||||||
/* Global state */
|
/* Global state */
|
||||||
|
|
||||||
node_t *root; // Syntax tree
|
node_t *root; // Syntax tree
|
||||||
tlhash_t *global_names; // Symbol table
|
tlhash_t *global_names; // Symbol table
|
||||||
char **string_list; // List of strings in the source
|
char **string_list; // List of strings in the source
|
||||||
size_t n_string_list = 8; // Initial string list capacity (grow on demand)
|
size_t n_string_list = 8; // Initial string list capacity (grow on demand)
|
||||||
size_t stringc = 0; // Initial string count
|
size_t stringc = 0; // Initial string count
|
||||||
|
|
||||||
/* Command line option parsing for the main function */
|
/* Command line option parsing for the main function */
|
||||||
static void options ( int argc, char **argv );
|
static void options ( int argc, char **argv );
|
||||||
bool
|
bool
|
||||||
print_full_tree = false,
|
print_full_tree = false,
|
||||||
print_simplified_tree = false,
|
print_simplified_tree = false,
|
||||||
print_symbol_table_contents = false,
|
print_symbol_table_contents = false,
|
||||||
new_print_style = true;
|
new_print_style = true;
|
||||||
|
|
||||||
|
|
||||||
/* Entry point */
|
/* Entry point */
|
||||||
|
@ -27,8 +27,8 @@ main ( int argc, char **argv )
|
||||||
{
|
{
|
||||||
options ( argc, argv );
|
options ( argc, argv );
|
||||||
|
|
||||||
yyparse(); // Generated from grammar/bison, constructs syntax tree
|
yyparse(); // Generated from grammar/bison, constructs syntax tree
|
||||||
yylex_destroy(); // Free heap used by flex
|
yylex_destroy(); // Free heap used by flex
|
||||||
|
|
||||||
if ( print_full_tree )
|
if ( print_full_tree )
|
||||||
print_syntax_tree ();
|
print_syntax_tree ();
|
||||||
|
@ -36,7 +36,7 @@ main ( int argc, char **argv )
|
||||||
if ( print_simplified_tree )
|
if ( print_simplified_tree )
|
||||||
print_syntax_tree ();
|
print_syntax_tree ();
|
||||||
|
|
||||||
create_symbol_table (); // In ir.c
|
create_symbol_table (); // In ir.c
|
||||||
if ( print_symbol_table_contents )
|
if ( print_symbol_table_contents )
|
||||||
print_symbol_table();
|
print_symbol_table();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue