global.c 1.2 KB

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