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 3.11 1994/06/24 12:01:40 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
14 #include "file_info.h"
17 /* the structure of a token: */
19 int tok_symb; /* the token itself */
20 char *tok_file; /* the file it (probably) comes from */
21 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 struct { /* for INTEGER */
29 int tok_fund; /* INT or LONG */
38 #define tk_symb tok_symb
39 #define tk_file tok_file
40 #define tk_line tok_line
41 #define tk_idf tok_data.tok_idf
42 #define tk_bts tok_data.tok_string.tok_bts
43 #define tk_len tok_data.tok_string.tok_len
44 #define tk_fund tok_data.tok_integer.tok_fund
45 #define tk_ival tok_data.tok_integer.tok_ival
47 #define tk_fval tok_data.tok_fval
50 extern struct token dot, ahead, aside;
51 extern int token_nmb; /* number of the ahead token */
52 extern int tk_nmb_at_last_syn_err; /* token number at last syntax error */
55 extern int ReplaceMacros; /* "LLlex.c" */
56 extern int AccDefined; /* "LLlex.c" */
57 extern int Unstacked; /* "LLlex.c" */
58 extern int UnknownIdIsZero; /* "LLlex.c" */
60 extern int EoiForNewline; /* "LLlex.c" */
61 extern int AccFileSpecifier; /* "LLlex.c" */
62 extern int SkipEscNewline; /* "LLlex.c" */
63 extern int File_Inserted; /* "LLlex.c" */
65 extern int NoUnstack; /* buffer.c */
67 extern int err_occurred; /* "error.c" */
69 #define DOT dot.tk_symb
70 #define AHEAD ahead.tk_symb
71 #define ASIDE aside.tk_symb