Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / cpp.ansi / LLlex.h
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5 /* $Id: LLlex.h,v 1.3 1994/06/24 11:36:24 ceriel Exp $ */
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 /* the structure of a token:    */
14 struct token    {
15         int tok_symb;           /* the token itself */
16         union   {
17                 char *tok_str;
18                 struct {
19                         int tok_unsigned;
20                         arith tok_val;          /* for INTEGER */
21                 } tok_int;
22         } tok_data;
23 };
24
25 #include "file_info.h"
26
27 #define tk_symb tok_symb
28 #define tk_str  tok_data.tok_str
29 #define tk_val  tok_data.tok_int.tok_val
30 #define tk_unsigned tok_data.tok_int.tok_unsigned
31
32 extern struct token dot;
33
34 extern int ReplaceMacros;       /* "LLlex.c"    */
35 extern int AccDefined;          /* "LLlex.c"    */
36 extern int Unstacked;           /* "LLlex.c"    */
37 extern int UnknownIdIsZero;     /* "LLlex.c"    */
38 extern int AccFileSpecifier;    /* "LLlex.c"    */
39
40 extern int NoUnstack;           /* buffer.c     */
41
42 extern int err_occurred;        /* "error.c"    */
43
44 #define DOT     dot.tk_symb
45
46 #define EOF     (-1)