/* [rexp_lim.c] Scanner table for 'rexp' */ #include "scn_io.h" #include "scn_imp.h" /* scanner group 'rexp' */ static long rexpStaEdg[36] = /* first edge per state */ { 0, 28, 29, 30, 33, 35, 36, 49, 62, 63, 66, 75, 76, 100, 101, 125, 134, 139, 144, 149, 154, 161, 166, 171, 180, 185, 190, 193, 198, 203, 208, 213, 218, 223, 228, 233 }; static short rexpStaFin[35] = /* finite token per state */ { 0, 2, 3, 2, 4, 1, 0, 0, 5, 5, 8, 7, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0 }; static wc_char rexpEdgeC[233] = /* lowest character per edge */ { /*State*/ /* 0 */ 126, 123, 94, 93, 92, 91, 64, 63, 58, 48, 47, 46, 45, 44, 40, 39, 35, 34, 33, 32, 27, 26, 14, 13, 12, 11, 10, 0, /* 1 */ 0, /* 2 */ 0, /* 3 */ 11, 10, 0, /* 4 */ 256, 0, /* 5 */ 0, /* 6 */ 255, 128, 127, 97, 96, 93, 92, 40, 39, 35, 34, 32, 0, /* 7 */ 255, 128, 127, 97, 96, 93, 92, 40, 39, 35, 34, 32, 0, /* 8 */ 0, /* 9 */ 47, 46, 0, /* 10 */ 58, 48, 33, 32, 14, 13, 11, 10, 0, /* 11 */ 0, /* 12 */ 121, 120, 117, 116, 115, 114, 113, 112, 111, 110, 103, 97, 96, 93, 92, 89, 88, 58, 48, 40, 39, 35, 34, 0, /* 13 */ 0, /* 14 */ 121, 120, 117, 116, 115, 114, 113, 112, 111, 110, 103, 97, 96, 93, 92, 89, 88, 58, 48, 40, 39, 35, 34, 0, /* 15 */ 45, 44, 33, 32, 14, 13, 11, 10, 0, /* 16 */ 103, 97, 58, 48, 0, /* 17 */ 103, 97, 58, 48, 0, /* 18 */ 103, 97, 58, 48, 0, /* 19 */ 103, 97, 58, 48, 0, /* 20 */ 33, 32, 14, 13, 11, 10, 0, /* 21 */ 103, 97, 58, 48, 0, /* 22 */ 103, 97, 58, 48, 0, /* 23 */ 58, 48, 33, 32, 14, 13, 11, 10, 0, /* 24 */ 103, 97, 58, 48, 0, /* 25 */ 103, 97, 58, 48, 0, /* 26 */ 58, 48, 0, /* 27 */ 103, 97, 58, 48, 0, /* 28 */ 103, 97, 58, 48, 0, /* 29 */ 103, 97, 58, 48, 0, /* 30 */ 103, 97, 58, 48, 0, /* 31 */ 103, 97, 58, 48, 0, /* 32 */ 103, 97, 58, 48, 0, /* 33 */ 103, 97, 58, 48, 0, /* 34 */ 103, 97, 58, 48, 0 }; static long rexpEdgeS[233] = /* follow (state+1) per edge */ { /*State*/ /* 0 */ 0, 9, 0, 9, 0, 9, 0, 9, 0, 11, 0, 10, 9, 0, 9, 8, 0, 7, 0, 6, 0, 5, 0, 4, 3, 0, 2, 0, /* 1 */ 0, /* 2 */ 0, /* 3 */ 0, 2, 0, /* 4 */ 0, 5, /* 5 */ 0, /* 6 */ 0, 7, 0, 7, 0, 7, 13, 7, 0, 7, 12, 7, 0, /* 7 */ 0, 8, 0, 8, 0, 8, 15, 8, 14, 8, 0, 8, 0, /* 8 */ 0, /* 9 */ 0, 9, 0, /* 10 */ 0, 11, 0, 16, 0, 16, 0, 16, 0, /* 11 */ 0, /* 12 */ 0, 18, 0, 7, 0, 7, 0, 7, 0, 7, 0, 17, 7, 0, 7, 0, 18, 0, 17, 0, 7, 0, 7, 0, /* 13 */ 0, /* 14 */ 0, 20, 0, 8, 0, 8, 0, 8, 0, 8, 0, 19, 8, 0, 8, 0, 20, 0, 19, 0, 8, 0, 8, 0, /* 15 */ 0, 21, 0, 16, 0, 16, 0, 16, 0, /* 16 */ 0, 7, 0, 7, 0, /* 17 */ 0, 22, 0, 22, 0, /* 18 */ 0, 8, 0, 8, 0, /* 19 */ 0, 23, 0, 23, 0, /* 20 */ 0, 24, 0, 24, 0, 24, 0, /* 21 */ 0, 25, 0, 25, 0, /* 22 */ 0, 26, 0, 26, 0, /* 23 */ 0, 27, 0, 24, 0, 24, 0, 24, 0, /* 24 */ 0, 28, 0, 28, 0, /* 25 */ 0, 29, 0, 29, 0, /* 26 */ 0, 27, 0, /* 27 */ 0, 30, 0, 30, 0, /* 28 */ 0, 31, 0, 31, 0, /* 29 */ 0, 32, 0, 32, 0, /* 30 */ 0, 33, 0, 33, 0, /* 31 */ 0, 34, 0, 34, 0, /* 32 */ 0, 35, 0, 35, 0, /* 33 */ 0, 17, 0, 17, 0, /* 34 */ 0, 19, 0, 19, 0 }; static string rexpTokens[9] = /* token -> string */ { "[other]", "Space", "Line", "Page", "Etx", "Opr", "Set", "Seq", "OprEx" }; static byte rexpFlags[9] = /* token -> newid */ { 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }; static ConcreteImp(scn_t) rexpScanner = /* the scanner structure */ { "rexp", /* Name */ 35, /* States */ 9, /* Tokens */ rexpStaEdg, rexpStaFin, rexpEdgeC, rexpEdgeS, rexpTokens, rexpFlags, 0, /* Groups */ (scn_t*)NULL, (short*)NULL, 0, /* Dyck */ (short*)NULL, (scn_t*)NULL }; void Scn_get_rexp(Scn_T *scn) /* simulates a Scn_get */ { *scn = Scn_copy(Scn_ADT(&rexpScanner)); }