Pristine Ack-5.5
[Ack-5.5.git] / util / LLgen / src / extern.h
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 /*
7  *  L L G E N
8  *
9  *  An Extended LL(1) Parser Generator
10  *
11  *  Author : Ceriel J.H. Jacobs
12  */
13
14 /*
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
18  */
19
20 # define LTEXTSZ        256     /* Size of longest token */
21
22 /*
23  * options for the identifier search routine
24  */
25
26 # define ENTERING       1
27 # define BOTH           2
28
29 /*
30  * Now for some declarations
31  */
32
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 */
39 #ifdef NON_CORRECTING
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 */
43 #endif
44 extern int      linecount;      /* line number */
45 extern int      assval;         /* to create difference between literals
46                                  * and other terminals
47                                  */
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
56                                  * were read
57                                  */
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
65                                  * in the sets.
66                                  */
67 extern int      ntprint;        /* ntprint = 1 if they must be printed too in
68                                  * the LL.output file (-x option)
69                                  */
70 # ifndef NDEBUG
71 extern int      debug;
72 # endif /* not NDEBUG */
73 extern p_file   files,pfile;    /* pointers to file structure.
74                                  * "files" points to the start of the
75                                  * list */
76 extern p_file   maxfiles;
77 extern string   LLgenid;        /* LLgen identification string */
78 extern t_token  lextoken;       /* the current token */
79 extern int      nerrors;
80 extern string   rec_file, incl_file;
81 #ifdef NON_CORRECTING
82 extern string   nc_rec_file, nc_incl_file;
83 #endif
84 extern int      low_percentage, high_percentage;
85 extern int      min_cases_for_jmptable;
86 extern int      jmptable_option;
87 extern int      ansi_c;
88 #ifdef NON_CORRECTING
89 extern int      non_corr;
90 extern int      subpars_sim;
91 extern p_gram   illegal_gram;
92 #endif
93 extern int      strip_grammar;
94 extern int      in_production;