extern.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
  2. * For full copyright amd 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. * $Id$
  14. * Miscellanious constants and
  15. * some variables that are visible in more than one file
  16. */
  17. # define LTEXTSZ 256 /* Size of longest token */
  18. /*
  19. * options for the identifier search routine
  20. */
  21. # define ENTERING 1
  22. # define BOTH 2
  23. /*
  24. * Now for some declarations
  25. */
  26. extern char ltext[]; /* input buffer */
  27. extern int nnonterms; /* number of nonterminals */
  28. extern int ntokens; /* number of terminals */
  29. extern int nterms; /* number of terms */
  30. extern int nalts; /* number of alternatives */
  31. extern p_start start; /* will contain startsymbols */
  32. extern int linecount; /* line number */
  33. extern int assval; /* to create difference between literals
  34. * and other terminals
  35. */
  36. extern p_nont nonterms; /* the nonterminal array */
  37. extern p_nont maxnt; /* is filled up until here */
  38. extern p_token tokens; /* the token array */
  39. extern p_token maxt; /* is filled up until here */
  40. extern int norder, torder;
  41. /* order of nonterminals in the grammar,
  42. * important because actions are copied to
  43. * a temporary file in the order in which they
  44. * were read
  45. */
  46. extern string e_noopen; /* Error message string used often */
  47. extern int verbose; /* Level of verbosity */
  48. extern int wflag; /* warnings? */
  49. extern string lexical; /* name of lexical analyser */
  50. extern string prefix; /* prefix of externals */
  51. extern string onerror; /* name of user error handler */
  52. extern int ntneeded; /* ntneeded = 1 if nonterminals are included
  53. * in the sets.
  54. */
  55. extern int ntprint; /* ntprint = 1 if they must be printed too in
  56. * the LL.output file (-x option)
  57. */
  58. # ifndef NDEBUG
  59. extern int debug;
  60. # endif /* not NDEBUG */
  61. extern p_file files,pfile; /* pointers to file structure.
  62. * "files" points to the start of the
  63. * list */
  64. extern p_file maxfiles;
  65. extern string LLgenid; /* LLgen identification string */
  66. extern t_token lextoken; /* the current token */
  67. extern int nerrors;
  68. extern string rec_file, incl_file;
  69. extern int low_percentage, high_percentage;
  70. extern int min_cases_for_jmptable;
  71. extern int jmptable_option;
  72. extern int ansi_c;
  73. extern int strip_grammar;