1 |
/* Data definitions for internal representation of Bison's input. |
/* Data definitions for internal representation of Bison's input. |
2 |
|
|
3 |
Copyright (C) 1984, 1986, 1989, 1992, 2001, 2002 |
Copyright (C) 1984, 1986, 1989, 1992, 2001, 2002, 2003 |
4 |
Free Software Foundation, Inc. |
Free Software Foundation, Inc. |
5 |
|
|
6 |
This file is part of Bison, the GNU Compiler Compiler. |
This file is part of Bison, the GNU Compiler Compiler. |
107 |
# include "location.h" |
# include "location.h" |
108 |
# include "symtab.h" |
# include "symtab.h" |
109 |
|
|
110 |
# define ISTOKEN(s) ((s) < ntokens) |
# define ISTOKEN(i) ((i) < ntokens) |
111 |
# define ISVAR(s) ((s) >= ntokens) |
# define ISVAR(i) ((i) >= ntokens) |
112 |
|
|
113 |
extern int nsyms; |
extern int nsyms; |
114 |
extern int ntokens; |
extern int ntokens; |
127 |
sometimes have to perform the converse transformation. */ |
sometimes have to perform the converse transformation. */ |
128 |
|
|
129 |
static inline item_number |
static inline item_number |
130 |
symbol_number_as_item_number (symbol_number s) |
symbol_number_as_item_number (symbol_number sym) |
131 |
{ |
{ |
132 |
return s; |
return sym; |
133 |
} |
} |
134 |
|
|
135 |
static inline symbol_number |
static inline symbol_number |
138 |
return i; |
return i; |
139 |
} |
} |
140 |
|
|
|
extern symbol_number start_symbol; |
|
|
|
|
141 |
/* Rule numbers. */ |
/* Rule numbers. */ |
142 |
typedef short rule_number; |
typedef short rule_number; |
143 |
extern rule_number nrules; |
extern rule_number nrules; |