ack/util/LLgen/src/global.c

70 lines
1.2 KiB
C
Raw Normal View History

/* Copyright (c) 1991 by the Vrije Universiteit, Amsterdam, the Netherlands.
* All rights reserved.
1984-10-08 14:14:53 +00:00
*/
/*
* L L G E N
*
* An Extended LL(1) Parser Generator
*
* Author : Ceriel J.H. Jacobs
*/
/*
* global.c
* Contains declarations visible in several other source files
*/
# include "types.h"
# include "extern.h"
1984-10-08 14:14:53 +00:00
# include "io.h"
1984-10-08 17:11:03 +00:00
# ifndef NORCSID
1994-06-24 11:31:16 +00:00
static string rcsid4 = "$Id$";
1984-10-08 17:11:03 +00:00
# endif
1984-10-08 14:14:53 +00:00
char ltext[LTEXTSZ];
p_nont nonterms;
p_nont maxnt;
1984-10-08 14:14:53 +00:00
int nnonterms;
p_token tokens;
p_token maxt;
int ntokens;
1987-05-12 18:23:09 +00:00
int nterms, nalts;
int norder, torder;
1984-10-08 14:14:53 +00:00
p_start start;
int linecount;
int assval;
FILE *fout;
FILE *fpars;
FILE *finput;
FILE *fact;
char f_pars[] = PARSERFILE;
char f_temp[] = ACTFILE;
char f_out[20];
1984-10-08 14:14:53 +00:00
string f_input;
char f_include[20];
char f_rec[20];
1984-10-08 14:14:53 +00:00
string e_noopen = "Cannot open %s";
int verbose;
1987-11-27 11:04:07 +00:00
int wflag;
1984-10-08 14:14:53 +00:00
string lexical;
string prefix;
string onerror;
1984-10-08 14:14:53 +00:00
int ntneeded;
int ntprint;
# ifndef NDEBUG
int debug;
#endif /* not NDEBUG */
1984-10-08 14:14:53 +00:00
p_file files;
p_file maxfiles;
1984-10-08 14:14:53 +00:00
p_file pfile;
string LLgenid = "/* LLgen generated code from source %s */\n";
t_token lextoken;
int nerrors;
string rec_file, incl_file;
1988-06-22 16:23:36 +00:00
int low_percentage = 10, high_percentage = 30;
int min_cases_for_jmptable = 8;
int jmptable_option;
1991-11-26 15:38:41 +00:00
int ansi_c = 0;