Commit 6df96266 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

Update generated source for scan.l.

parent 3d4d1e14
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.1 1997/11/14 15:50:22 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.2 1997/11/17 16:33:21 thomas Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
...@@ -284,42 +284,47 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); ...@@ -284,42 +284,47 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
*yy_cp = '\0'; \ *yy_cp = '\0'; \
yy_c_buf_p = yy_cp; yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 33 #define YY_NUM_RULES 41
#define YY_END_OF_BUFFER 34 #define YY_END_OF_BUFFER 42
static yyconst short int yy_acclist[149] = static yyconst short int yy_acclist[173] =
{ 0, { 0,
6, 6, 16, 16, 10, 10, 17, 17, 34, 32, 10, 10, 6, 6, 24, 24, 9, 9, 18, 18,
33, 31, 32, 33, 31, 33, 24, 32, 33, 14, 25, 25, 42, 40, 41, 39, 40, 41, 39, 41,
32, 33, 22, 24, 32, 33, 7, 32, 33, 22, 32, 40, 41, 22, 40, 41, 30, 32, 40, 41,
32, 33, 22, 24, 32, 33, 22, 24, 32, 33, 15, 40, 41, 30, 40, 41, 30, 32, 40, 41,
22, 24, 32, 33, 28, 32, 33,16410, 22, 24, 30, 32, 40, 41, 30, 32, 40, 41, 36, 40,
32, 33, 30, 32, 33, 30, 32, 33, 3, 6, 41,16418, 30, 32, 40, 41, 38, 40, 41, 38,
33, 3, 6, 33, 3, 33, 6, 33, 16, 33, 40, 41, 38, 40, 41, 38, 40, 41, 10, 41,
15, 33, 10, 33, 8, 33, 33, 33, 17, 33, 8, 41, 3, 6, 41, 3, 6, 41, 3, 41,
18, 33, 24, 24, 24, 25, 24, 24, 28,16410, 6, 41, 24, 41, 23, 41, 9, 41, 14, 41,
4, 24, 24, 20, 24, 30, 30, 6, 6, 5, 18, 41, 16, 41, 41, 41, 25, 41, 26, 41,
16, 10, 9, 12, 11, 12, 17, 23, 21, 23, 32, 32, 32, 33, 32, 32, 36,16418, 4, 32,
21, 23, 25, 21, 1, 24, 24, 21, 23, 4, 32, 28, 32, 38, 7, 38, 13, 10, 6, 6,
24, 4, 24, 4, 24, 8218, 29,16411, 30, 5, 5, 24, 9, 18, 17, 20, 19, 20, 25, 31,
13, 23, 2, 4, 24, 23, 30, 2, 2, 2, 29, 31, 29, 31, 33, 29, 1, 32, 32, 29,
8219, 29,16411, 19, 30, 2, 19, 30 31, 4, 32, 4, 32, 4, 32, 8226, 37,16419,
38, 12, 5, 11, 21, 31, 2, 4, 32, 31,
38, 2, 2, 2, 8227, 37,16419, 27, 38, 2,
27, 38
} ; } ;
static yyconst short int yy_accept[107] = static yyconst short int yy_accept[131] =
{ 0, { 0,
1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 12, 15, 17, 20, 23, 27, 30, 33, 9, 10, 11, 12, 13, 14, 16, 19, 21, 24,
37, 41, 45, 49, 53, 56, 59, 62, 65, 67, 27, 31, 34, 37, 41, 45, 49, 53, 57, 60,
69, 71, 73, 75, 77, 78, 79, 81, 83, 84, 63, 66, 69, 71, 73, 76, 79, 81, 83, 85,
85, 86, 87, 87, 88, 89, 91, 93, 94, 94, 87, 89, 91, 93, 95, 96, 97, 99, 101, 102,
94, 94, 96, 97, 98, 99, 100, 100, 100, 101, 103, 104, 105, 105, 106, 107, 109, 111, 112, 112,
102, 103, 103, 103, 104, 105, 107, 108, 109, 111, 112, 112, 114, 115, 116, 117, 118, 119, 119, 119,
114, 115, 115, 116, 117, 118, 120, 120, 122, 124, 120, 121, 121, 121, 122, 123, 124, 124, 124, 125,
126, 127, 129, 130, 131, 131, 131, 132, 133, 133, 125, 125, 126, 127, 129, 130, 131, 133, 136, 137,
136, 137, 137, 137, 137, 138, 139, 140, 141, 142, 137, 138, 139, 140, 142, 142, 144, 146, 148, 149,
142, 144, 146, 147, 149, 149 151, 152, 152, 152, 153, 154, 154, 154, 155, 155,
155, 156, 157, 157, 160, 161, 161, 161, 161, 162,
163, 164, 165, 166, 166, 168, 170, 171, 173, 173
} ; } ;
static yyconst int yy_ec[256] = static yyconst int yy_ec[256] =
...@@ -330,13 +335,13 @@ static yyconst int yy_ec[256] = ...@@ -330,13 +335,13 @@ static yyconst int yy_ec[256] =
1, 2, 4, 5, 4, 6, 4, 4, 7, 8, 1, 2, 4, 5, 4, 6, 4, 4, 7, 8,
8, 9, 10, 8, 11, 12, 13, 14, 14, 14, 8, 9, 10, 8, 11, 12, 13, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 15, 8, 16, 14, 14, 14, 14, 14, 14, 14, 15, 8, 16,
16, 16, 4, 4, 17, 17, 17, 17, 18, 17, 16, 16, 4, 4, 17, 18, 17, 17, 19, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 19, 17, 17, 17, 17, 17, 20, 17, 17, 17, 20, 17, 17, 17, 17, 21, 22, 17,
8, 21, 8, 4, 22, 4, 17, 17, 17, 17, 8, 23, 8, 4, 24, 4, 17, 18, 17, 17,
18, 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 21,
17, 17, 1, 16, 1, 4, 1, 17, 17, 17, 17, 17, 1, 16, 1, 4, 1, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
...@@ -354,131 +359,153 @@ static yyconst int yy_ec[256] = ...@@ -354,131 +359,153 @@ static yyconst int yy_ec[256] =
17, 17, 17, 17, 17 17, 17, 17, 17, 17
} ; } ;
static yyconst int yy_meta[23] = static yyconst int yy_meta[25] =
{ 0, { 0,
1, 1, 2, 3, 4, 3, 5, 1, 6, 7, 1, 1, 2, 3, 4, 3, 5, 1, 6, 7,
7, 8, 3, 9, 3, 3, 10, 9, 10, 10, 7, 8, 3, 9, 3, 3, 10, 10, 9, 10,
5, 10 10, 10, 11, 10
} ; } ;
static yyconst short int yy_base[122] = static yyconst short int yy_base[150] =
{ 0, { 0,
0, 0, 19, 32, 273, 267, 19, 30, 47, 50, 0, 0, 395, 394, 21, 34, 376, 358, 345, 333,
271, 325, 325, 325, 254, 325, 13, 325, 244, 243, 19, 28, 50, 52, 334, 403, 403, 403, 322, 403,
43, 51, 63, 44, 0, 188, 0, 74, 54, 0, 45, 403, 315, 303, 46, 53, 65, 18, 0, 298,
0, 325, 0, 66, 191, 325, 68, 325, 184, 80, 282, 193, 0, 67, 0, 76, 62, 0, 0, 403,
19, 174, 32, 172, 94, 0, 113, 67, 128, 0, 0, 70, 0, 81, 190, 403, 91, 403, 182, 84,
163, 151, 0, 136, 0, 0, 63, 136, 118, 0, 27, 172, 34, 153, 98, 0, 119, 112, 134, 0,
0, 130, 133, 325, 325, 325, 135, 325, 325, 120, 147, 144, 0, 403, 129, 403, 0, 136, 139, 0,
325, 137, 325, 150, 74, 0, 116, 163, 105, 130, 0, 65, 131, 141, 0, 0, 145, 149, 0, 151,
325, 178, 71, 155, 168, 180, 325, 0, 155, 182, 155, 403, 403, 403, 157, 403, 403, 113, 403, 159,
73, 188, 0, 183, 42, 198, 200, 202, 325, 25, 403, 119, 152, 0, 88, 172, 77, 165, 403, 187,
192, 0, 209, 0, 325, 212, 222, 232, 242, 250, 57, 189, 192, 403, 200, 202, 205, 403, 208, 211,
249, 259, 267, 274, 284, 294, 304, 308, 311, 312, 403, 0, 171, 214, 56, 217, 0, 211, 44, 221,
314 224, 229, 403, 14, 215, 0, 233, 0, 403, 236,
247, 258, 269, 280, 291, 300, 299, 309, 320, 329,
336, 347, 358, 368, 379, 384, 387, 388, 390
} ; } ;
static yyconst short int yy_def[122] = static yyconst short int yy_def[150] =
{ 0, { 0,
105, 1, 106, 106, 107, 107, 108, 108, 109, 109, 129, 1, 130, 130, 131, 131, 132, 132, 133, 133,
105, 105, 105, 105, 110, 105, 110, 105, 105, 110, 134, 134, 135, 135, 129, 129, 129, 129, 136, 129,
110, 110, 105, 110, 111, 111, 112, 112, 113, 28, 136, 129, 129, 136, 136, 136, 129, 136, 137, 137,
114, 105, 115, 105, 116, 105, 105, 105, 110, 110, 137, 137, 138, 129, 139, 139, 140, 36, 141, 129,
40, 105, 105, 41, 105, 23, 117, 45, 105, 118, 142, 129, 143, 129, 144, 129, 129, 129, 136, 136,
105, 110, 111, 111, 112, 28, 113, 113, 113, 114, 50, 129, 129, 51, 129, 27, 145, 55, 129, 146,
115, 105, 105, 105, 105, 105, 105, 105, 105, 105, 129, 136, 137, 129, 137, 129, 138, 129, 129, 139,
105, 45, 105, 72, 74, 72, 117, 117, 78, 78, 36, 140, 140, 140, 141, 142, 129, 129, 143, 129,
105, 105, 111, 105, 105, 105, 105, 72, 117, 78, 129, 129, 129, 129, 129, 129, 129, 129, 129, 55,
117, 105, 119, 105, 120, 117, 117, 105, 105, 105, 129, 55, 55, 90, 145, 145, 96, 96, 129, 129,
82, 121, 105, 121, 0, 105, 105, 105, 105, 105, 137, 129, 129, 129, 129, 129, 129, 129, 129, 129,
105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 129, 90, 145, 96, 145, 129, 147, 129, 148, 145,
105 145, 129, 129, 129, 100, 149, 129, 149, 0, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129
} ; } ;
static yyconst short int yy_nxt[348] = static yyconst short int yy_nxt[428] =
{ 0, { 0,
12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24,
21, 19, 22, 23, 24, 20, 25, 25, 26, 25, 25, 23, 26, 27, 28, 24, 29, 30, 29, 31,
12, 25, 28, 41, 28, 34, 42, 29, 28, 28, 32, 29, 16, 29, 36, 44, 36, 125, 54, 37,
69, 30, 70, 28, 28, 28, 34, 28, 101, 35, 36, 36, 62, 38, 44, 36, 36, 36, 87, 36,
29, 28, 28, 71, 30, 71, 28, 28, 37, 37, 88, 45, 37, 36, 36, 89, 38, 89, 36, 36,
35, 37, 37, 45, 44, 53, 46, 38, 52, 47, 45, 47, 47, 47, 47, 51, 55, 63, 52, 56,
38, 44, 57, 48, 49, 49, 59, 62, 63, 67, 48, 57, 48, 54, 113, 58, 59, 59, 68, 69,
67, 57, 64, 50, 51, 59, 46, 56, 72, 56, 72, 77, 78, 72, 74, 60, 61, 74, 56, 71,
72, 89, 57, 56, 56, 88, 56, 88, 56, 56, 119, 71, 80, 81, 72, 71, 71, 82, 71, 114,
40, 68, 95, 68, 72, 72, 73, 74, 72, 74, 71, 71, 85, 85, 50, 86, 113, 86, 90, 90,
72, 72, 74, 74, 75, 76, 74, 76, 74, 74, 91, 92, 90, 92, 90, 90, 92, 92, 93, 94,
72, 72, 72, 72, 72, 72, 78, 90, 78, 84, 92, 94, 92, 92, 90, 90, 90, 90, 90, 90,
84, 79, 78, 80, 89, 78, 57, 78, 78, 49, 90, 90, 96, 90, 96, 90, 52, 97, 96, 98,
49, 62, 63, 42, 85, 86, 67, 67, 50, 87, 90, 96, 90, 96, 96, 59, 59, 68, 69, 72,
72, 91, 72, 91, 57, 72, 72, 72, 72, 72, 102, 103, 105, 105, 60, 104, 77, 78, 101, 72,
72, 72, 72, 74, 83, 74, 84, 84, 74, 74, 106, 107, 80, 81, 50, 108, 109, 110, 85, 85,
75, 40, 74, 89, 74, 74, 78, 96, 78, 85, 100, 111, 90, 112, 90, 112, 87, 90, 90, 90,
86, 79, 78, 80, 87, 78, 82, 78, 78, 92, 90, 90, 90, 90, 90, 96, 115, 96, 115, 113,
92, 85, 86, 97, 98, 69, 87, 42, 93, 92, 97, 96, 98, 120, 96, 52, 96, 96, 116, 116,
92, 82, 100, 100, 40, 94, 101, 66, 93, 97, 102, 103, 50, 102, 103, 104, 84, 117, 104, 66,
98, 97, 98, 103, 98, 101, 89, 54, 89, 105, 100, 105, 105, 106, 107, 118, 106, 107, 108, 109,
103, 98, 27, 27, 27, 27, 27, 27, 27, 27, 110, 108, 109, 110, 111, 121, 122, 111, 116, 116,
27, 27, 31, 31, 31, 31, 31, 31, 31, 31, 124, 124, 121, 122, 125, 121, 122, 117, 125, 113,
31, 31, 33, 33, 33, 33, 33, 33, 33, 33, 127, 122, 113, 129, 127, 122, 33, 33, 33, 33,
33, 33, 36, 36, 36, 36, 36, 36, 36, 36, 33, 33, 33, 33, 33, 33, 33, 35, 35, 35,
36, 36, 39, 44, 43, 39, 39, 53, 53, 55, 35, 35, 35, 35, 35, 35, 35, 35, 39, 39,
55, 55, 55, 55, 40, 55, 55, 55, 55, 58, 39, 39, 39, 39, 39, 39, 39, 39, 39, 41,
105, 32, 58, 58, 60, 60, 60, 32, 60, 60, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
60, 60, 60, 60, 61, 61, 61, 61, 105, 61, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
61, 61, 61, 61, 65, 65, 65, 65, 65, 65, 43, 46, 46, 46, 46, 46, 46, 46, 46, 46,
65, 65, 65, 65, 77, 105, 77, 77, 77, 77, 46, 46, 49, 65, 64, 49, 49, 63, 63, 67,
77, 77, 77, 77, 81, 81, 81, 99, 99, 99, 67, 67, 67, 54, 67, 67, 67, 67, 67, 67,
102, 102, 104, 104, 11, 105, 105, 105, 105, 105, 70, 70, 70, 70, 70, 53, 70, 70, 70, 70,
105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 70, 73, 50, 129, 73, 73, 75, 75, 75, 42,
105, 105, 105, 105, 105, 105, 105 75, 75, 75, 75, 75, 75, 75, 76, 76, 76,
76, 42, 76, 76, 76, 76, 76, 76, 79, 79,
79, 79, 40, 79, 79, 79, 79, 79, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83, 83, 95,
40, 95, 95, 95, 95, 95, 95, 95, 95, 95,
99, 99, 99, 123, 123, 123, 126, 126, 128, 128,
34, 34, 15, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129
} ; } ;
static yyconst short int yy_chk[348] = static yyconst short int yy_chk[428] =
{ 0, { 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 3, 17, 3, 7, 17, 3, 3, 3, 1, 1, 1, 1, 5, 11, 5, 124, 28, 5,
41, 3, 41, 3, 3, 4, 8, 4, 100, 7, 5, 5, 28, 5, 12, 5, 5, 6, 51, 6,
4, 4, 4, 43, 4, 43, 4, 4, 9, 9, 51, 11, 6, 6, 6, 53, 6, 53, 6, 6,
8, 10, 10, 21, 24, 95, 21, 9, 24, 22, 12, 13, 13, 14, 14, 21, 25, 119, 21, 25,
10, 22, 29, 22, 23, 23, 29, 34, 34, 37, 13, 26, 14, 26, 115, 26, 27, 27, 34, 34,
37, 57, 34, 23, 23, 57, 23, 28, 48, 28, 37, 42, 42, 72, 37, 27, 27, 72, 27, 36,
48, 91, 28, 28, 28, 75, 28, 75, 28, 28, 101, 36, 44, 44, 36, 36, 36, 44, 36, 97,
40, 40, 83, 40, 45, 45, 45, 45, 45, 45, 36, 36, 47, 47, 50, 50, 95, 50, 55, 55,
45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
45, 45, 45, 45, 45, 45, 47, 79, 47, 59, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
59, 47, 47, 47, 77, 47, 59, 47, 47, 49, 55, 55, 57, 58, 57, 58, 88, 57, 57, 57,
49, 62, 62, 70, 63, 63, 67, 67, 49, 63, 92, 57, 92, 57, 57, 59, 59, 68, 68, 73,
72, 80, 72, 80, 58, 72, 72, 72, 72, 72, 69, 69, 74, 74, 59, 69, 77, 77, 65, 74,
72, 72, 72, 74, 54, 74, 84, 84, 74, 74, 78, 78, 80, 80, 62, 78, 81, 81, 85, 85,
74, 52, 74, 89, 74, 74, 78, 89, 78, 85, 61, 81, 90, 93, 90, 93, 54, 90, 90, 90,
85, 78, 78, 78, 85, 78, 51, 78, 78, 82, 90, 90, 90, 90, 90, 96, 98, 96, 98, 113,
82, 86, 86, 90, 90, 44, 86, 42, 82, 92, 96, 96, 96, 113, 96, 52, 96, 96, 100, 100,
92, 82, 94, 94, 39, 82, 94, 35, 92, 96, 102, 102, 49, 103, 103, 102, 45, 100, 103, 32,
96, 97, 97, 98, 98, 101, 96, 26, 97, 101, 100, 105, 105, 106, 106, 100, 107, 107, 106, 109,
103, 103, 106, 106, 106, 106, 106, 106, 106, 106, 109, 107, 110, 110, 109, 114, 114, 110, 116, 116,
106, 106, 107, 107, 107, 107, 107, 107, 107, 107, 118, 118, 120, 120, 118, 121, 121, 116, 125, 120,
107, 107, 108, 108, 108, 108, 108, 108, 108, 108, 122, 122, 121, 125, 127, 127, 130, 130, 130, 130,
108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 130, 130, 130, 130, 130, 130, 130, 131, 131, 131,
109, 109, 110, 20, 19, 110, 110, 111, 111, 112, 131, 131, 131, 131, 131, 131, 131, 131, 132, 132,
112, 112, 112, 112, 15, 112, 112, 112, 112, 113, 132, 132, 132, 132, 132, 132, 132, 132, 132, 133,
11, 6, 113, 113, 114, 114, 114, 5, 114, 114, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
114, 114, 114, 114, 115, 115, 115, 115, 0, 115, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
115, 115, 115, 115, 116, 116, 116, 116, 116, 116, 134, 135, 135, 135, 135, 135, 135, 135, 135, 135,
116, 116, 116, 116, 117, 0, 117, 117, 117, 117, 135, 135, 136, 31, 30, 136, 136, 137, 137, 138,
117, 117, 117, 117, 118, 118, 118, 119, 119, 119, 138, 138, 138, 24, 138, 138, 138, 138, 138, 138,
120, 120, 121, 121, 105, 105, 105, 105, 105, 105, 139, 139, 139, 139, 139, 23, 139, 139, 139, 139,
105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 139, 140, 19, 15, 140, 140, 141, 141, 141, 10,
105, 105, 105, 105, 105, 105, 105 141, 141, 141, 141, 141, 141, 141, 142, 142, 142,
142, 9, 142, 142, 142, 142, 142, 142, 143, 143,
143, 143, 8, 143, 143, 143, 143, 143, 144, 144,
144, 144, 144, 144, 144, 144, 144, 144, 144, 145,
7, 145, 145, 145, 145, 145, 145, 145, 145, 145,
146, 146, 146, 147, 147, 147, 148, 148, 149, 149,
4, 3, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129
} ; } ;
static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
...@@ -515,7 +542,7 @@ char *yytext; ...@@ -515,7 +542,7 @@ char *yytext;
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.1 1997/11/14 15:50:22 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.2 1997/11/17 16:33:21 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -577,6 +604,8 @@ char literal[MAX_PARSE_BUFFER]; ...@@ -577,6 +604,8 @@ char literal[MAX_PARSE_BUFFER];
* There are exclusive states for quoted strings, extended comments, * There are exclusive states for quoted strings, extended comments,
* and to eliminate parsing troubles for numeric strings. * and to eliminate parsing troubles for numeric strings.
* Exclusive states: * Exclusive states:
* <xb> binary numeric string - thomas 1997-11-16
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xc> extended C-style comments - tgl 1997-07-12 * <xc> extended C-style comments - tgl 1997-07-12
* <xq> quoted strings - tgl 1997-07-30 * <xq> quoted strings - tgl 1997-07-30
* <xm> numeric strings with embedded minus sign - tgl 1997-09-05 * <xm> numeric strings with embedded minus sign - tgl 1997-09-05
...@@ -588,13 +617,17 @@ char literal[MAX_PARSE_BUFFER]; ...@@ -588,13 +617,17 @@ char literal[MAX_PARSE_BUFFER];
* Be sure to match _any_ candidate comment, including those with appended * Be sure to match _any_ candidate comment, including those with appended
* operator-like symbols. - thomas 1997-07-14 * operator-like symbols. - thomas 1997-07-14
*/ */
#define xc 1 #define xb 1
#define xc 2
#define xd 2 #define xd 3
#define xq 3 #define xh 4
#define xm 4 #define xq 5
#define xm 6
/* DO NOT PUT ANY COMMENTS IN THE FOLLOWING SECTION. /* DO NOT PUT ANY COMMENTS IN THE FOLLOWING SECTION.
* AT&T lex does not properly handle C-style comments in this second lex block. * AT&T lex does not properly handle C-style comments in this second lex block.
...@@ -608,7 +641,7 @@ char literal[MAX_PARSE_BUFFER]; ...@@ -608,7 +641,7 @@ char literal[MAX_PARSE_BUFFER];
* Other embedded escaped characters are matched explicitly and the leading * Other embedded escaped characters are matched explicitly and the leading
* backslash is dropped from the string. - thomas 1997-09-24 * backslash is dropped from the string. - thomas 1997-09-24
*/ */
#line 612 "lex.yy.c" #line 645 "lex.yy.c"
/* Macros after this point can all be overridden by user definitions in /* Macros after this point can all be overridden by user definitions in
* section 1. * section 1.
...@@ -759,9 +792,9 @@ YY_DECL ...@@ -759,9 +792,9 @@ YY_DECL
register char *yy_cp, *yy_bp; register char *yy_cp, *yy_bp;
register int yy_act; register int yy_act;
#line 153 "scan.l" #line 167 "scan.l"
#line 765 "lex.yy.c" #line 798 "lex.yy.c"
if ( yy_init ) if ( yy_init )
{ {
...@@ -809,14 +842,14 @@ yy_match: ...@@ -809,14 +842,14 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 106 ) if ( yy_current_state >= 130 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state; *yy_state_ptr++ = yy_current_state;
++yy_cp; ++yy_cp;
} }
while ( yy_base[yy_current_state] != 325 ); while ( yy_base[yy_current_state] != 403 );
yy_find_action: yy_find_action:
yy_current_state = *--yy_state_ptr; yy_current_state = *--yy_state_ptr;
...@@ -867,54 +900,59 @@ do_action: /* This label is used only to access EOF actions. */ ...@@ -867,54 +900,59 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */ { /* beginning of action switch */
case 1: case 1:
YY_RULE_SETUP YY_RULE_SETUP
#line 154 "scan.l" #line 168 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 2: case 2:
YY_RULE_SETUP YY_RULE_SETUP
#line 156 "scan.l" #line 170 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 3: case 3:
#line 159 "scan.l" #line 173 "scan.l"
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 159 "scan.l" #line 173 "scan.l"
{ BEGIN(xc); } { BEGIN(xc); }
YY_BREAK YY_BREAK
case 5: case 5:
YY_RULE_SETUP YY_RULE_SETUP
#line 161 "scan.l" #line 175 "scan.l"
{ BEGIN(INITIAL); } { BEGIN(INITIAL); }
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
#line 163 "scan.l" #line 177 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 7: case 7:
YY_RULE_SETUP YY_RULE_SETUP
#line 165 "scan.l" #line 179 "scan.l"
{ {
BEGIN(xq); BEGIN(xb);
llen = 0; llen = 0;
*literal = '\0'; *literal = '\0';
} }
YY_BREAK YY_BREAK
case 8: case 8:
YY_RULE_SETUP YY_RULE_SETUP
#line 170 "scan.l" #line 184 "scan.l"
{ {
char* endptr;
BEGIN(INITIAL); BEGIN(INITIAL);
yylval.str = pstrdup(scanstr(literal)); errno = 0;
return (SCONST); yylval.ival = strtol((char *)literal,&endptr,2);
if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad binary integer input '%s'",literal);
return (ICONST);
} }
YY_BREAK YY_BREAK
case 9: case 9:
#line 176 "scan.l" #line 195 "scan.l"
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 176 "scan.l" #line 195 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -923,8 +961,69 @@ YY_RULE_SETUP ...@@ -923,8 +961,69 @@ YY_RULE_SETUP
} }
YY_BREAK YY_BREAK
case 11: case 11:
#line 202 "scan.l"
case 12:
YY_RULE_SETUP
#line 202 "scan.l"
{
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 205 "scan.l"
{
BEGIN(xh);
llen = 0;
*literal = '\0';
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 210 "scan.l"
{
char* endptr;
BEGIN(INITIAL);
errno = 0;
yylval.ival = strtol((char *)literal,&endptr,16);
if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad hexadecimal integer input '%s'",literal);
return (ICONST);
}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 221 "scan.l"
{
BEGIN(xq);
llen = 0;
*literal = '\0';
}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 226 "scan.l"
{
BEGIN(INITIAL);
yylval.str = pstrdup(scanstr(literal));
return (SCONST);
}
YY_BREAK
case 17:
#line 232 "scan.l"
case 18:
YY_RULE_SETUP
#line 232 "scan.l"
{
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
memcpy(literal+llen, yytext, yyleng+1);
llen += yyleng;
}
YY_BREAK
case 19:
YY_RULE_SETUP YY_RULE_SETUP
#line 182 "scan.l" #line 238 "scan.l"
{ {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -933,9 +1032,9 @@ YY_RULE_SETUP ...@@ -933,9 +1032,9 @@ YY_RULE_SETUP
llen += yyleng; llen += yyleng;
} }
YY_BREAK YY_BREAK
case 12: case 20:
YY_RULE_SETUP YY_RULE_SETUP
#line 190 "scan.l" #line 246 "scan.l"
{ {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -943,33 +1042,33 @@ YY_RULE_SETUP ...@@ -943,33 +1042,33 @@ YY_RULE_SETUP
llen += yyleng; llen += yyleng;
} }
YY_BREAK YY_BREAK
case 13: case 21:
YY_RULE_SETUP YY_RULE_SETUP
#line 196 "scan.l" #line 252 "scan.l"
{ {
} }
YY_BREAK YY_BREAK
case 14: case 22:
YY_RULE_SETUP YY_RULE_SETUP
#line 200 "scan.l" #line 256 "scan.l"
{ {
BEGIN(xd); BEGIN(xd);
llen = 0; llen = 0;
*literal = '\0'; *literal = '\0';
} }
YY_BREAK YY_BREAK
case 15: case 23:
YY_RULE_SETUP YY_RULE_SETUP
#line 205 "scan.l" #line 261 "scan.l"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
yylval.str = pstrdup(literal); yylval.str = pstrdup(literal);
return (IDENT); return (IDENT);
} }
YY_BREAK YY_BREAK
case 16: case 24:
YY_RULE_SETUP YY_RULE_SETUP
#line 210 "scan.l" #line 266 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(WARN,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -977,61 +1076,61 @@ YY_RULE_SETUP ...@@ -977,61 +1076,61 @@ YY_RULE_SETUP
llen += yyleng; llen += yyleng;
} }
YY_BREAK YY_BREAK
case 17: case 25:
YY_RULE_SETUP YY_RULE_SETUP
#line 218 "scan.l" #line 274 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 18: case 26:
YY_RULE_SETUP YY_RULE_SETUP
#line 219 "scan.l" #line 275 "scan.l"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
return (yytext[0]); return (yytext[0]);
} }
YY_BREAK YY_BREAK
case 19: case 27:
YY_RULE_SETUP YY_RULE_SETUP
#line 225 "scan.l" #line 281 "scan.l"
{ {
yylval.str = pstrdup(SystemFunctionHandler((char *)yytext)); yylval.str = pstrdup(SystemFunctionHandler((char *)yytext));
return (SCONST); return (SCONST);
} }
YY_BREAK YY_BREAK
case 20: case 28:
YY_RULE_SETUP YY_RULE_SETUP
#line 230 "scan.l" #line 286 "scan.l"
{ return TYPECAST; } { return TYPECAST; }
YY_BREAK YY_BREAK
case 21: case 29:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 1; yy_c_buf_p = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 232 "scan.l" #line 288 "scan.l"
{ {
return (yytext[0]); return (yytext[0]);
} }
YY_BREAK YY_BREAK
case 22: case 30:
YY_RULE_SETUP YY_RULE_SETUP
#line 235 "scan.l" #line 291 "scan.l"
{ return (yytext[0]); } { return (yytext[0]); }
YY_BREAK YY_BREAK
case 23: case 31:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 2; yy_c_buf_p = yy_cp -= 2;
YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP YY_RULE_SETUP
#line 236 "scan.l" #line 292 "scan.l"
{ {
yylval.str = pstrdup((char*)yytext); yylval.str = pstrdup((char*)yytext);
return (Op); return (Op);
} }
YY_BREAK YY_BREAK
case 24: case 32:
YY_RULE_SETUP YY_RULE_SETUP
#line 240 "scan.l" #line 296 "scan.l"
{ {
if (strcmp((char*)yytext,"!=") == 0) if (strcmp((char*)yytext,"!=") == 0)
yylval.str = pstrdup("<>"); /* compatability */ yylval.str = pstrdup("<>"); /* compatability */
...@@ -1040,28 +1139,34 @@ YY_RULE_SETUP ...@@ -1040,28 +1139,34 @@ YY_RULE_SETUP
return (Op); return (Op);
} }
YY_BREAK YY_BREAK
case 25: case 33:
YY_RULE_SETUP YY_RULE_SETUP
#line 247 "scan.l" #line 303 "scan.l"
{ {
yylval.ival = atoi((char*)&yytext[1]); yylval.ival = atoi((char*)&yytext[1]);
return (PARAM); return (PARAM);
} }
YY_BREAK YY_BREAK
case 26: case 34:
YY_RULE_SETUP YY_RULE_SETUP
#line 252 "scan.l" #line 308 "scan.l"
{ {
char* endptr;
BEGIN(xm); BEGIN(xm);
yylval.ival = atoi((char*)yytext); errno = 0;
yylval.ival = strtol((char *)yytext,&endptr,10);
if (*endptr != '\0' || errno == ERANGE)
elog(WARN,"Bad integer input '%s'",yytext);
return (ICONST); return (ICONST);
} }
YY_BREAK YY_BREAK
case 27: case 35:
YY_RULE_SETUP YY_RULE_SETUP
#line 257 "scan.l" #line 318 "scan.l"
{ {
char* endptr; char* endptr;
BEGIN(xm); BEGIN(xm);
errno = 0; errno = 0;
yylval.dval = strtod(((char *)yytext),&endptr); yylval.dval = strtod(((char *)yytext),&endptr);
...@@ -1071,9 +1176,9 @@ YY_RULE_SETUP ...@@ -1071,9 +1176,9 @@ YY_RULE_SETUP
return (FCONST); return (FCONST);
} }
YY_BREAK YY_BREAK
case 28: case 36:
YY_RULE_SETUP YY_RULE_SETUP
#line 267 "scan.l" #line 329 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -1084,9 +1189,9 @@ YY_RULE_SETUP ...@@ -1084,9 +1189,9 @@ YY_RULE_SETUP
return (ICONST); return (ICONST);
} }
YY_BREAK YY_BREAK
case 29: case 37:
YY_RULE_SETUP YY_RULE_SETUP
#line 276 "scan.l" #line 338 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -1098,9 +1203,9 @@ YY_RULE_SETUP ...@@ -1098,9 +1203,9 @@ YY_RULE_SETUP
return (FCONST); return (FCONST);
} }
YY_BREAK YY_BREAK
case 30: case 38:
YY_RULE_SETUP YY_RULE_SETUP
#line 286 "scan.l" #line 348 "scan.l"
{ {
int i; int i;
ScanKeyword *keyword; ScanKeyword *keyword;
...@@ -1120,25 +1225,27 @@ YY_RULE_SETUP ...@@ -1120,25 +1225,27 @@ YY_RULE_SETUP
} }
} }
YY_BREAK YY_BREAK
case 31: case 39:
YY_RULE_SETUP YY_RULE_SETUP
#line 304 "scan.l" #line 366 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 32: case 40:
YY_RULE_SETUP YY_RULE_SETUP
#line 306 "scan.l" #line 368 "scan.l"
{ return (yytext[0]); } { return (yytext[0]); }
YY_BREAK YY_BREAK
case 33: case 41:
YY_RULE_SETUP YY_RULE_SETUP
#line 308 "scan.l" #line 370 "scan.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 1139 "lex.yy.c" #line 1244 "lex.yy.c"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(xb):
case YY_STATE_EOF(xc): case YY_STATE_EOF(xc):
case YY_STATE_EOF(xd): case YY_STATE_EOF(xd):
case YY_STATE_EOF(xh):
case YY_STATE_EOF(xq): case YY_STATE_EOF(xq):
case YY_STATE_EOF(xm): case YY_STATE_EOF(xm):
yyterminate(); yyterminate();
...@@ -1428,7 +1535,7 @@ static yy_state_type yy_get_previous_state() ...@@ -1428,7 +1535,7 @@ static yy_state_type yy_get_previous_state()
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 106 ) if ( yy_current_state >= 130 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
...@@ -1458,11 +1565,11 @@ yy_state_type yy_current_state; ...@@ -1458,11 +1565,11 @@ yy_state_type yy_current_state;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 106 ) if ( yy_current_state >= 130 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 105); yy_is_jam = (yy_current_state == 129);
if ( ! yy_is_jam ) if ( ! yy_is_jam )
*yy_state_ptr++ = yy_current_state; *yy_state_ptr++ = yy_current_state;
...@@ -2019,7 +2126,7 @@ int main() ...@@ -2019,7 +2126,7 @@ int main()
return 0; return 0;
} }
#endif #endif
#line 308 "scan.l" #line 370 "scan.l"
void yyerror(char message[]) void yyerror(char message[])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment