25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
567B

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <vslc.h>
  4. node_t *root; // Syntax tree
  5. tlhash_t *global_names; // Symbol table
  6. char **string_list; // List of strings in the source
  7. size_t n_string_list = 8; // Initial string list capacity (grow on demand)
  8. size_t stringc = 0; // Initial string count
  9. int
  10. main ( int argc, char **argv )
  11. {
  12. yyparse();
  13. simplify_tree ( &root, root );
  14. node_print ( root, 0 );
  15. create_symbol_table();
  16. print_symbol_table();
  17. destroy_subtree ( root );
  18. destroy_symbol_table();
  19. }