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".
5 /* $Id: LLlex.h,v 1.6 1994/06/27 07:58:02 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 */
8 /* A token from the input stream is represented by an integer,
9 called a "symbol", but it may have other information associated
13 #include "file_info.h"
16 /* the structure of a token: */
18 int tok_symb; /* the token itself */
19 char *tok_file; /* the file it (probably) comes from */
20 unsigned int tok_line; /* the line it (probably) comes from */
23 struct idf *tok_idf; /* for IDENTIFIER & TYPE_IDENTIFIER */
24 struct { /* for STRING */
25 char *tok_bts; /* row of bytes */
26 int tok_len; /* length of row of bytes */
28 arith tok_ival; /* for INTEGER */
29 char *tok_fval; /* for FLOATING */
33 #define tk_symb tok_symb
34 #define tk_file tok_file
35 #define tk_line tok_line
36 #define tk_fund tok_fund
37 #define tk_idf tok_data.tok_idf
38 #define tk_bts tok_data.tok_string.tok_bts
39 #define tk_len tok_data.tok_string.tok_len
40 #define tk_ival tok_data.tok_ival
41 #define tk_fval tok_data.tok_fval
43 extern struct token dot, ahead, aside;
44 extern int token_nmb; /* number of the ahead token */
45 extern int tk_nmb_at_last_syn_err; /* token number at last syntax error */
48 extern int ReplaceMacros; /* "LLlex.c" */
49 extern int AccDefined; /* "LLlex.c" */
50 extern int Unstacked; /* "LLlex.c" */
51 extern int UnknownIdIsZero; /* "LLlex.c" */
53 extern int EoiForNewline; /* "LLlex.c" */
54 extern int AccFileSpecifier; /* "LLlex.c" */
55 extern int File_Inserted; /* "LLlex.c" */
57 extern int NoUnstack; /* buffer.c */
59 extern int err_occurred; /* "error.c" */
61 #define DOT dot.tk_symb
62 #define AHEAD ahead.tk_symb
63 #define ASIDE aside.tk_symb