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.
9 * An Extended LL(1) Parser Generator
11 * Author : Ceriel J.H. Jacobs
15 * $Id: extern.h,v 2.18 1997/02/21 11:27:47 ceriel Exp $
16 * Miscellanious constants and
17 * some variables that are visible in more than one file
20 # define LTEXTSZ 256 /* Size of longest token */
23 * options for the identifier search routine
30 * Now for some declarations
33 extern char ltext[]; /* input buffer */
34 extern int nnonterms; /* number of nonterminals */
35 extern int ntokens; /* number of terminals */
36 extern int nterms; /* number of terms */
37 extern int nalts; /* number of alternatives */
38 extern p_start start; /* will contain startsymbols */
40 extern int nsubstarts; /* number of subparserstarts */
41 extern p_set start_firsts; /* Will contain the union of first sets of
42 startsymbols when -n -s option is on */
44 extern int linecount; /* line number */
45 extern int assval; /* to create difference between literals
48 extern p_nont nonterms; /* the nonterminal array */
49 extern p_nont maxnt; /* is filled up until here */
50 extern p_token tokens; /* the token array */
51 extern p_token maxt; /* is filled up until here */
52 extern int norder, torder;
53 /* order of nonterminals in the grammar,
54 * important because actions are copied to
55 * a temporary file in the order in which they
58 extern string e_noopen; /* Error message string used often */
59 extern int verbose; /* Level of verbosity */
60 extern int wflag; /* warnings? */
61 extern string lexical; /* name of lexical analyser */
62 extern string prefix; /* prefix of externals */
63 extern string onerror; /* name of user error handler */
64 extern int ntneeded; /* ntneeded = 1 if nonterminals are included
67 extern int ntprint; /* ntprint = 1 if they must be printed too in
68 * the LL.output file (-x option)
72 # endif /* not NDEBUG */
73 extern p_file files,pfile; /* pointers to file structure.
74 * "files" points to the start of the
76 extern p_file maxfiles;
77 extern string LLgenid; /* LLgen identification string */
78 extern t_token lextoken; /* the current token */
80 extern string rec_file, incl_file;
82 extern string nc_rec_file, nc_incl_file;
84 extern int low_percentage, high_percentage;
85 extern int min_cases_for_jmptable;
86 extern int jmptable_option;
90 extern int subpars_sim;
91 extern p_gram illegal_gram;
93 extern int strip_grammar;
94 extern int in_production;