1 |
/* Type definitions for nondeterministic finite state machine for Bison. |
/* Type definitions for nondeterministic finite state machine for Bison. |
2 |
|
|
3 |
Copyright (C) 2001, 2002 Free Software Foundation, Inc. |
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of Bison, the GNU Compiler Compiler. |
This file is part of Bison, the GNU Compiler Compiler. |
6 |
|
|
49 |
} |
} |
50 |
|
|
51 |
|
|
52 |
/*-------------------------------------------------------------------. |
/*-------------------------------------------------------. |
53 |
| Return the state such these TRANSITIONS contain a shift/goto to it | |
| Return the state such that SHIFTS contain a shift/goto | |
54 |
| on S. Abort if none found. | |
| to it on SYM. Abort if none found. | |
55 |
`-------------------------------------------------------------------*/ |
`-------------------------------------------------------*/ |
56 |
|
|
57 |
state * |
state * |
58 |
transitions_to (transitions *shifts, symbol_number s) |
transitions_to (transitions *shifts, symbol_number sym) |
59 |
{ |
{ |
60 |
int j; |
int j; |
61 |
for (j = 0; j < shifts->num; j++) |
for (j = 0; j < shifts->num; j++) |
62 |
if (TRANSITION_SYMBOL (shifts, j) == s) |
if (TRANSITION_SYMBOL (shifts, j) == sym) |
63 |
return shifts->states[j]; |
return shifts->states[j]; |
64 |
abort (); |
abort (); |
65 |
} |
} |