Pristine Ack-5.5
[Ack-5.5.git] / util / cpp / LLlex.h
1 /* $Id: LLlex.h,v 1.5 1994/06/24 10:17:50 ceriel Exp $ */
2 /*
3  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4  * See the copyright notice in the ACK home directory, in the file "Copyright".
5  */
6 /* D E F I N I T I O N S   F O R   T H E   L E X I C A L   A N A L Y Z E R */
7
8 /*      A token from the input stream is represented by an integer,
9         called a "symbol", but it may have other information associated
10         to it.
11 */
12
13 #include <em_arith.h>
14
15 /* the structure of a token:    */
16 struct token    {
17         int tok_symb;           /* the token itself */
18         union {
19                 arith tok_val;          /* numeric values */
20                 char *tok_str;          /* string/filespecifier */
21         } tok_data;
22 };
23
24 #include "file_info.h"
25
26 #define tk_symb tok_symb
27 #define tk_val  tok_data.tok_val
28 #define tk_str  tok_data.tok_str
29
30 extern struct token dot;
31
32 extern int ReplaceMacros;       /* "LLlex.c"    */
33 extern int AccFileSpecifier;    /* "LLlex.c"    */
34 extern int AccDefined;          /* "LLlex.c"    */
35 extern int UnknownIdIsZero;     /* "LLlex.c"    */
36
37 extern int NoUnstack;           /* "input.c"    */
38 extern int Unstacked;           /* "input.c"    */
39
40 extern int err_occurred;        /* "error.c"    */
41
42 #define DOT     dot.tk_symb
43
44 #define EOF     (-1)