global.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
  2. * For full copyright and restrictions on use see the file COPYING in the top
  3. * level of the LLgen tree.
  4. */
  5. /*
  6. * L L G E N
  7. *
  8. * An Extended LL(1) Parser Generator
  9. *
  10. * Author : Ceriel J.H. Jacobs
  11. */
  12. /*
  13. * global.c
  14. * Contains declarations visible in several other source files
  15. */
  16. # include "types.h"
  17. # include "extern.h"
  18. # include "io.h"
  19. # ifndef NORCSID
  20. static string rcsid4 = "$Id$";
  21. # endif
  22. char ltext[LTEXTSZ];
  23. p_nont nonterms;
  24. p_nont maxnt;
  25. int nnonterms;
  26. p_token tokens;
  27. p_token maxt;
  28. int ntokens;
  29. int nterms, nalts;
  30. int norder, torder;
  31. p_start start;
  32. int linecount;
  33. int assval;
  34. FILE *fout;
  35. FILE *fpars;
  36. FILE *finput;
  37. FILE *fact;
  38. char f_pars[] = PARSERFILE;
  39. char f_temp[] = ACTFILE;
  40. char f_out[20];
  41. string f_input;
  42. char f_include[20];
  43. char f_rec[20];
  44. string e_noopen = "Cannot open %s";
  45. int verbose;
  46. int wflag;
  47. string lexical;
  48. string prefix;
  49. string onerror;
  50. int ntneeded;
  51. int ntprint;
  52. # ifndef NDEBUG
  53. int debug;
  54. #endif /* not NDEBUG */
  55. p_file files;
  56. p_file maxfiles;
  57. p_file pfile;
  58. string LLgenid = "/* LLgen generated code from source %s */\n";
  59. t_token lextoken;
  60. int nerrors;
  61. string rec_file, incl_file;
  62. int low_percentage = 10, high_percentage = 30;
  63. int min_cases_for_jmptable = 8;
  64. int jmptable_option;
  65. int ansi_c = 0;
  66. int strip_grammar = 0;