#include "triefa.h"
TrieState TrieStateTbl[34] = {
- {-1, 0, 0x42058}
- ,
- {-1, 5, 0x100}
- ,
- {-1, 6, 0x40}
- ,
- {-1, 7, 0x20000}
- ,
- {-1, 8, 0x1}
- ,
- {-1, 9, 0x8000}
- ,
- {-1, 10, 0x80}
- ,
- {T_digraph, 11, 0x0}
- ,
- {-1, 11, 0x8}
- ,
- {-1, 12, 0x40}
- ,
- {-1, 13, 0x10}
- ,
- {T_edge, 14, 0x0}
- ,
- {-1, 14, 0x20000}
- ,
- {-1, 15, 0x1}
- ,
- {-1, 16, 0x8000}
- ,
- {-1, 17, 0x80}
- ,
- {T_graph, 18, 0x0}
- ,
- {-1, 18, 0x4000}
- ,
- {-1, 19, 0x8}
- ,
- {-1, 20, 0x10}
- ,
- {T_node, 21, 0x0}
- ,
- {-1, 21, 0x180000}
- ,
- {-1, 23, 0x20000}
- ,
- {-1, 24, 0x100}
- ,
- {-1, 25, 0x4}
- ,
- {-1, 26, 0x80000}
- ,
- {T_strict, 27, 0x0}
- ,
- {-1, 27, 0x2}
- ,
- {-1, 28, 0x40}
- ,
- {-1, 29, 0x20000}
- ,
- {-1, 30, 0x1}
- ,
- {-1, 31, 0x8000}
- ,
- {-1, 32, 0x80}
- ,
- {T_subgraph, 33, 0x0}
- ,
+ { -1, 0, 0x42058 },
+ { -1, 5, 0x100 },
+ { -1, 6, 0x40 },
+ { -1, 7, 0x20000 },
+ { -1, 8, 0x1 },
+ { -1, 9, 0x8000 },
+ { -1, 10, 0x80 },
+ { T_digraph, 11, 0x0 },
+ { -1, 11, 0x8 },
+ { -1, 12, 0x40 },
+ { -1, 13, 0x10 },
+ { T_edge, 14, 0x0 },
+ { -1, 14, 0x20000 },
+ { -1, 15, 0x1 },
+ { -1, 16, 0x8000 },
+ { -1, 17, 0x80 },
+ { T_graph, 18, 0x0 },
+ { -1, 18, 0x4000 },
+ { -1, 19, 0x8 },
+ { -1, 20, 0x10 },
+ { T_node, 21, 0x0 },
+ { -1, 21, 0x180000 },
+ { -1, 23, 0x20000 },
+ { -1, 24, 0x100 },
+ { -1, 25, 0x4 },
+ { -1, 26, 0x80000 },
+ { T_strict, 27, 0x0 },
+ { -1, 27, 0x2 },
+ { -1, 28, 0x40 },
+ { -1, 29, 0x20000 },
+ { -1, 30, 0x1 },
+ { -1, 31, 0x8000 },
+ { -1, 32, 0x80 },
+ { T_subgraph, 33, 0x0 },
};
TrieTrans TrieTransTbl[33] = {
- /* State 0 */ {'s', 21}
- , {'e', 8}
- , {'g', 12}
- ,
- {'n', 17}
- , {'d', 1}
- ,
- /* State 1 */ {'i', 2}
- ,
- /* State 2 */ {'g', 3}
- ,
- /* State 3 */ {'r', 4}
- ,
- /* State 4 */ {'a', 5}
- ,
- /* State 5 */ {'p', 6}
- ,
- /* State 6 */ {'h', 7}
- ,
- /* State 8 */ {'d', 9}
- ,
- /* State 9 */ {'g', 10}
- ,
- /* State 10 */ {'e', 11}
- ,
- /* State 12 */ {'r', 13}
- ,
- /* State 13 */ {'a', 14}
- ,
- /* State 14 */ {'p', 15}
- ,
- /* State 15 */ {'h', 16}
- ,
- /* State 17 */ {'o', 18}
- ,
- /* State 18 */ {'d', 19}
- ,
- /* State 19 */ {'e', 20}
- ,
- /* State 21 */ {'t', 22}
- , {'u', 27}
- ,
- /* State 22 */ {'r', 23}
- ,
- /* State 23 */ {'i', 24}
- ,
- /* State 24 */ {'c', 25}
- ,
- /* State 25 */ {'t', 26}
- ,
- /* State 27 */ {'b', 28}
- ,
- /* State 28 */ {'g', 29}
- ,
- /* State 29 */ {'r', 30}
- ,
- /* State 30 */ {'a', 31}
- ,
- /* State 31 */ {'p', 32}
- ,
- /* State 32 */ {'h', 33}
- ,
+ /* State 0 */ { 's', 21 }, { 'e', 8 }, { 'g', 12 },
+ { 'n', 17 }, { 'd', 1 },
+ /* State 1 */ { 'i', 2 },
+ /* State 2 */ { 'g', 3 },
+ /* State 3 */ { 'r', 4 },
+ /* State 4 */ { 'a', 5 },
+ /* State 5 */ { 'p', 6 },
+ /* State 6 */ { 'h', 7 },
+ /* State 8 */ { 'd', 9 },
+ /* State 9 */ { 'g', 10 },
+ /* State 10 */ { 'e', 11 },
+ /* State 12 */ { 'r', 13 },
+ /* State 13 */ { 'a', 14 },
+ /* State 14 */ { 'p', 15 },
+ /* State 15 */ { 'h', 16 },
+ /* State 17 */ { 'o', 18 },
+ /* State 18 */ { 'd', 19 },
+ /* State 19 */ { 'e', 20 },
+ /* State 21 */ { 't', 22 }, { 'u', 27 },
+ /* State 22 */ { 'r', 23 },
+ /* State 23 */ { 'i', 24 },
+ /* State 24 */ { 'c', 25 },
+ /* State 25 */ { 't', 26 },
+ /* State 27 */ { 'b', 28 },
+ /* State 28 */ { 'g', 29 },
+ /* State 29 */ { 'r', 30 },
+ /* State 30 */ { 'a', 31 },
+ /* State 31 */ { 'p', 32 },
+ /* State 32 */ { 'h', 33 },
};
* AT&T Research, Florham Park NJ *
**********************************************************/
-/* File - TrieFA.ins.c
- *
- * This file contains code to be included in the scanner file using a
- * generated trie-based FA.
- */
+/* File - TrieFA.ins.c
+ This file contains code to be included in the scanner file using a
+ generated trie-based FA.
+*/
#include "triefa.h"
static short TFA_State;
-/* TFA_Init:
- *
- * Initialize the trie FA.
- */
+/* TFA_Init:
+ Initialize the trie FA.
+*/
#define TFA_Init() TFA_State = 0
-/* TFA_Advance:
- *
- * Advance to the next state (or -1) on the lowercase letter c.
- * This should be an inline routine, but the C++ implementation
- * isn't advanced enough so we use a macro.
- */
+/* TFA_Advance:
+ Advance to the next state (or -1) on the lowercase letter c.
+ This should be an inline routine, but the C++ implementation
+ isn't advanced enough so we use a macro.
+*/
#define TFA_Advance(C) { \
char c = C; \
if (TFA_State >= 0) { \
else \
TFA_State = -1; \
} \
- TFA_done:; \
-} /* end of TFA_Advance. */
+TFA_done:; \
+} /* end of TFA_Advance. */
-/* TFA_Definition:
- *
- * Return the definition (if any) associated with the current state.
- */
+/* TFA_Definition:
+ Return the definition (if any) associated with the current state.
+*/
#define TFA_Definition() \
((TFA_State < 0) ? -1 : TrieStateTbl[TFA_State].def)
extern "C" {
#endif
-/* File - TrieFA.h
- *
- * The data types for the generated trie-baseed finite automata.
- */
+/* File - TrieFA.h
+ The data types for the generated trie-baseed finite automata.
+*/
- struct TrieState { /* An entry in the FA state table */
- short def; /* If this state is an accepting state then */
- /* this is the definition, otherwise -1. */
- short trans_base; /* The base index into the transition table. */
- long mask; /* The transition mask. */
- };
+struct TrieState { /* An entry in the FA state table */
+ short def; /* If this state is an accepting state then */
+ /* this is the definition, otherwise -1. */
+ short trans_base; /* The base index into the transition table.*/
+ long mask; /* The transition mask. */
+};
- struct TrieTrans { /* An entry in the FA transition table. */
- short c; /* The transition character (lowercase). */
- short next_state; /* The next state. */
- };
+struct TrieTrans { /* An entry in the FA transition table. */
+ short c; /* The transition character (lowercase). */
+ short next_state; /* The next state. */
+};
- typedef struct TrieState TrieState;
- typedef struct TrieTrans TrieTrans;
+typedef struct TrieState TrieState;
+typedef struct TrieTrans TrieTrans;
- extern TrieState TrieStateTbl[];
- extern TrieTrans TrieTransTbl[];
+extern TrieState TrieStateTbl[];
+extern TrieTrans TrieTransTbl[];
#ifdef __cplusplus
}
#endif
+