Commit cd692f23 authored by Thomas G. Lockhart's avatar Thomas G. Lockhart

llow more variations on valid floating point numbers (e.g. ".1", "1e6").

Reintroduce fixes for unary minus parsing with leading spaces.
parent f4f0e9d6
/* 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.19 1998/05/04 02:01:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.20 1998/05/09 23:27:39 thomas Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
...@@ -286,44 +286,46 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); ...@@ -286,44 +286,46 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
#define YY_NUM_RULES 41 #define YY_NUM_RULES 41
#define YY_END_OF_BUFFER 42 #define YY_END_OF_BUFFER 42
static yyconst short int yy_acclist[168] = static yyconst short int yy_acclist[177] =
{ 0, { 0,
10, 10, 6, 6, 24, 24, 9, 9, 25, 25, 10, 10, 6, 6, 24, 24, 9, 9, 25, 25,
18, 18, 42, 40, 41, 39, 40, 41, 39, 41, 18, 18, 42, 40, 41, 39, 40, 41, 39, 41,
31, 40, 41, 22, 40, 41, 29, 31, 40, 41, 31, 40, 41, 22, 40, 41, 29, 31, 40, 41,
15, 40, 41, 29, 40, 41, 29, 31, 40, 41, 15, 40, 41, 29, 40, 41, 29, 31, 40, 41,
29, 31, 40, 41, 29, 31, 40, 41, 36, 40, 29, 31, 40, 41, 29, 40, 41, 29, 31, 40,
41,16418, 29, 31, 40, 41, 38, 40, 41,16417, 41, 36, 40, 41,16418, 29, 31, 40, 41, 38,
38, 40, 41,16417, 38, 40, 41,16417, 10, 41, 40, 41,16417, 38, 40, 41,16417, 38, 40, 41,
8, 41, 3, 6, 41, 3, 6, 41, 3, 41, 16417, 10, 41, 8, 41, 3, 6, 41, 3, 6,
6, 41, 24, 41, 23, 41, 9, 41, 14, 41, 41, 3, 41, 6, 41, 24, 41, 23, 41, 9,
41, 25, 41, 26, 41, 18, 41, 16, 41, 41, 41, 14, 41, 41, 25, 41, 26, 41, 18, 41,
31, 31, 31, 32, 31, 31, 36,16418, 4, 31, 16, 41, 41, 31, 31, 31, 32, 31, 31, 36,
31, 27, 31, 38,16417, 7, 13, 10, 6, 6, 16418, 37,16419, 4, 31, 31, 37,16419, 27, 31,
5, 24, 9, 25, 18, 17, 20, 19, 20, 30, 38,16417, 7, 13, 10, 6, 6, 5, 24, 9,
28, 30, 28, 30, 32, 28, 1, 31, 31, 28, 25, 18, 17, 20, 19, 20, 30, 28, 30, 28,
30, 4, 31, 4, 31, 4, 31, 8226, 37,16419, 30, 32, 28, 1, 31, 31, 28, 30, 4, 31,
8225, 12, 5, 11, 21, 30, 2, 4, 31, 30, 4, 31, 4, 31, 8226, 37,16419, 37,16419, 8225,
2, 2, 2, 8227, 37,16419, 2 12, 5, 11, 21, 30, 8227, 37,16419, 2, 4,
31, 30, 2, 2, 2, 2
} ; } ;
static yyconst short int yy_accept[128] = static yyconst short int yy_accept[135] =
{ 0, { 0,
1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 16, 19, 21, 24, 9, 10, 11, 12, 13, 14, 16, 19, 21, 24,
27, 31, 34, 37, 41, 45, 49, 53, 57, 61, 27, 31, 34, 37, 41, 45, 48, 52, 56, 60,
65, 69, 71, 73, 76, 79, 81, 83, 85, 87, 64, 68, 72, 74, 76, 79, 82, 84, 86, 88,
89, 91, 92, 94, 96, 98, 100, 101, 102, 103, 90, 92, 94, 95, 97, 99, 101, 103, 104, 105,
104, 105, 105, 106, 107, 109, 111, 112, 112, 112, 106, 106, 107, 108, 108, 109, 110, 110, 112, 114,
112, 114, 114, 114, 116, 117, 118, 119, 119, 119, 116, 117, 117, 117, 119, 119, 121, 121, 121, 123,
120, 121, 121, 121, 122, 123, 124, 124, 124, 125, 124, 125, 126, 126, 126, 127, 128, 128, 128, 129,
126, 126, 126, 127, 128, 130, 131, 133, 136, 137, 130, 131, 131, 131, 132, 133, 133, 133, 134, 135,
137, 138, 139, 140, 142, 142, 144, 146, 148, 149, 137, 138, 140, 143, 144, 144, 145, 146, 147, 149,
151, 152, 152, 152, 153, 154, 154, 154, 155, 155, 149, 149, 149, 149, 151, 153, 155, 156, 158, 158,
155, 156, 157, 157, 160, 161, 161, 161, 161, 162, 160, 161, 161, 161, 162, 163, 163, 163, 164, 164,
163, 164, 165, 165, 167, 168, 168 164, 165, 166, 167, 167, 169, 169, 172, 173, 174,
175, 176, 177, 177
} ; } ;
static yyconst int yy_ec[256] = static yyconst int yy_ec[256] =
...@@ -365,152 +367,158 @@ static yyconst int yy_meta[22] = ...@@ -365,152 +367,158 @@ static yyconst int yy_meta[22] =
12 12
} ; } ;
static yyconst short int yy_base[146] = static yyconst short int yy_base[153] =
{ 0, { 0,
0, 0, 332, 325, 18, 31, 325, 324, 321, 320, 0, 0, 368, 361, 18, 31, 350, 343, 339, 338,
46, 48, 18, 31, 326, 435, 435, 435, 309, 435, 46, 48, 18, 31, 344, 451, 451, 451, 332, 451,
12, 435, 308, 213, 42, 49, 61, 21, 63, 74, 58, 451, 51, 12, 44, 71, 23, 84, 327, 64,
209, 0, 52, 0, 82, 58, 0, 0, 435, 0, 102, 329, 0, 61, 0, 110, 67, 0, 0, 451,
66, 435, 76, 435, 0, 80, 206, 198, 88, 31, 0, 68, 451, 75, 451, 0, 81, 328, 247, 78,
188, 82, 179, 102, 0, 120, 113, 135, 0, 175, 91, 31, 242, 67, 234, 126, 228, 0, 146, 162,
169, 137, 0, 149, 435, 435, 0, 87, 140, 0, 85, 104, 0, 226, 140, 222, 150, 0, 211, 451,
0, 71, 132, 142, 0, 0, 147, 150, 152, 0, 451, 0, 98, 115, 0, 0, 99, 174, 153, 0,
156, 158, 435, 435, 435, 435, 435, 114, 435, 162, 0, 108, 156, 167, 0, 177, 179, 451, 451, 451,
435, 175, 120, 0, 92, 188, 57, 150, 435, 203, 451, 451, 153, 451, 183, 451, 196, 162, 0, 211,
435, 180, 193, 435, 167, 205, 208, 435, 216, 218, 0, 174, 155, 219, 111, 189, 451, 0, 77, 196,
435, 0, 154, 224, 52, 226, 0, 220, 230, 233, 451, 214, 217, 451, 188, 224, 234, 451, 236, 242,
238, 435, 16, 224, 242, 435, 245, 257, 269, 281, 451, 0, 451, 54, 51, 195, 244, 21, 248, 250,
293, 305, 314, 322, 333, 345, 354, 363, 375, 387, 252, 258, 451, 261, 273, 285, 297, 309, 321, 330,
398, 410, 415, 419, 423 338, 349, 361, 370, 379, 391, 403, 414, 426, 431,
435, 439
} ; } ;
static yyconst short int yy_def[146] = static yyconst short int yy_def[153] =
{ 0, { 0,
126, 1, 127, 127, 128, 128, 129, 129, 130, 130, 133, 1, 134, 134, 135, 135, 136, 136, 137, 137,
131, 131, 132, 132, 126, 126, 126, 126, 133, 126, 138, 138, 139, 139, 133, 133, 133, 133, 140, 133,
133, 126, 126, 133, 133, 133, 126, 133, 134, 134, 140, 133, 133, 21, 21, 133, 24, 133, 24, 141,
30, 135, 126, 136, 136, 137, 35, 138, 126, 139, 141, 31, 142, 133, 143, 143, 144, 36, 145, 133,
126, 126, 126, 126, 140, 126, 141, 133, 133, 49, 146, 133, 133, 133, 133, 147, 133, 148, 140, 140,
126, 126, 50, 126, 27, 142, 54, 126, 143, 126, 133, 50, 133, 133, 52, 133, 133, 28, 133, 149,
133, 126, 144, 30, 126, 126, 135, 126, 126, 136, 56, 133, 150, 59, 133, 140, 133, 151, 31, 133,
35, 137, 137, 137, 138, 139, 126, 126, 126, 140, 133, 142, 133, 133, 143, 36, 144, 144, 144, 145,
126, 126, 126, 126, 126, 126, 126, 126, 126, 54, 146, 133, 133, 133, 147, 133, 133, 133, 133, 133,
126, 90, 92, 90, 142, 142, 96, 96, 126, 126, 133, 133, 133, 133, 56, 133, 95, 97, 95, 133,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 152, 133, 149, 149, 104, 104, 133, 64, 133, 64,
126, 90, 142, 96, 142, 126, 145, 126, 142, 142, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
126, 126, 126, 100, 126, 0, 126, 126, 126, 126, 133, 95, 133, 133, 110, 149, 104, 149, 149, 149,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 133, 133, 0, 133, 133, 133, 133, 133, 133, 133,
126, 126, 126, 126, 126 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133
} ; } ;
static yyconst short int yy_nxt[457] = static yyconst short int yy_nxt[473] =
{ 0, { 0,
16, 17, 18, 19, 20, 21, 22, 23, 24, 24, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24,
25, 23, 26, 27, 28, 24, 29, 30, 29, 31, 25, 26, 27, 28, 29, 24, 30, 31, 30, 32,
16, 35, 50, 35, 46, 51, 36, 35, 35, 124, 16, 36, 55, 36, 47, 133, 37, 36, 36, 126,
37, 53, 35, 35, 35, 61, 35, 46, 47, 36, 38, 60, 36, 36, 36, 61, 36, 47, 48, 37,
35, 35, 87, 37, 88, 35, 35, 43, 43, 43, 36, 36, 92, 38, 93, 36, 36, 44, 44, 44,
43, 47, 54, 68, 69, 55, 44, 56, 44, 53, 44, 48, 51, 51, 56, 57, 45, 58, 45, 51,
113, 57, 58, 58, 62, 62, 72, 77, 78, 114, 51, 54, 73, 74, 125, 67, 67, 125, 52, 82,
74, 59, 60, 63, 55, 62, 62, 79, 79, 72, 83, 53, 51, 51, 68, 77, 84, 84, 94, 79,
65, 81, 82, 74, 63, 71, 83, 71, 68, 69, 94, 54, 86, 87, 59, 62, 62, 88, 50, 91,
72, 71, 71, 89, 71, 89, 71, 71, 49, 86, 110, 91, 51, 51, 63, 64, 95, 58, 95, 73,
113, 86, 90, 90, 91, 92, 90, 92, 90, 90, 74, 54, 65, 67, 67, 62, 62, 77, 70, 82,
92, 92, 93, 94, 92, 94, 92, 92, 90, 90, 83, 79, 68, 76, 63, 76, 112, 113, 77, 76,
90, 90, 90, 96, 90, 96, 90, 51, 97, 96, 76, 114, 76, 127, 76, 76, 95, 95, 96, 97,
98, 112, 96, 112, 96, 96, 58, 58, 62, 62, 95, 97, 95, 95, 97, 97, 98, 99, 97, 99,
72, 102, 103, 105, 105, 59, 104, 63, 77, 78, 97, 97, 95, 95, 95, 95, 95, 100, 100, 109,
72, 106, 107, 79, 79, 126, 108, 81, 82, 109, 109, 67, 67, 110, 115, 115, 101, 116, 117, 59,
110, 115, 113, 115, 111, 90, 119, 90, 105, 105, 68, 77, 118, 126, 102, 104, 53, 104, 84, 84,
90, 90, 90, 90, 90, 90, 90, 90, 92, 49, 105, 104, 106, 122, 104, 122, 104, 104, 86, 87,
92, 102, 103, 92, 92, 93, 104, 92, 100, 92, 119, 120, 77, 124, 124, 121, 95, 125, 95, 115,
92, 96, 87, 96, 102, 103, 97, 96, 98, 104, 115, 95, 95, 95, 95, 95, 95, 95, 95, 97,
96, 51, 96, 96, 116, 116, 106, 107, 49, 106, 128, 97, 128, 126, 97, 97, 98, 129, 97, 110,
107, 108, 85, 117, 108, 66, 100, 109, 110, 109, 97, 97, 100, 100, 133, 112, 113, 133, 112, 113,
110, 118, 111, 53, 111, 120, 121, 116, 116, 123, 114, 101, 104, 114, 104, 116, 117, 105, 104, 106,
123, 120, 121, 124, 120, 121, 117, 124, 113, 125, 118, 104, 50, 104, 104, 116, 117, 119, 120, 108,
121, 113, 126, 125, 121, 32, 32, 32, 32, 32, 118, 59, 121, 119, 120, 130, 131, 92, 121, 130,
32, 32, 32, 32, 32, 32, 32, 34, 34, 34, 131, 130, 131, 132, 131, 53, 126, 50, 126, 132,
34, 34, 34, 34, 34, 34, 34, 34, 34, 38, 131, 33, 33, 33, 33, 33, 33, 33, 33, 33,
38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 33, 33, 33, 35, 35, 35, 35, 35, 35, 35,
38, 40, 40, 40, 40, 40, 40, 40, 40, 40, 35, 35, 35, 35, 35, 39, 39, 39, 39, 39,
40, 40, 40, 42, 42, 42, 42, 42, 42, 42, 39, 39, 39, 39, 39, 39, 39, 41, 41, 41,
42, 42, 42, 42, 42, 45, 45, 45, 45, 45, 41, 41, 41, 41, 41, 41, 41, 41, 41, 43,
45, 45, 45, 45, 45, 45, 45, 48, 52, 49, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
48, 48, 48, 64, 64, 126, 41, 41, 39, 39, 43, 46, 46, 46, 46, 46, 46, 46, 46, 46,
64, 33, 64, 67, 67, 67, 67, 67, 33, 67, 46, 46, 46, 49, 90, 71, 49, 49, 49, 69,
67, 67, 67, 67, 67, 70, 70, 70, 70, 70, 69, 66, 50, 133, 42, 42, 69, 40, 69, 72,
70, 126, 70, 70, 70, 70, 70, 73, 126, 126, 72, 72, 72, 72, 40, 72, 72, 72, 72, 72,
73, 73, 73, 75, 75, 75, 75, 126, 75, 75, 72, 75, 75, 75, 75, 75, 75, 34, 75, 75,
75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 75, 75, 75, 78, 34, 133, 78, 78, 78, 80,
126, 76, 76, 76, 76, 76, 76, 80, 80, 80, 80, 80, 80, 133, 80, 80, 80, 80, 80, 80,
80, 80, 126, 80, 80, 80, 80, 80, 84, 84, 80, 81, 81, 81, 81, 81, 133, 81, 81, 81,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 81, 81, 81, 85, 85, 85, 85, 85, 133, 85,
95, 95, 126, 95, 95, 95, 95, 95, 95, 95, 85, 85, 85, 85, 89, 89, 89, 89, 89, 89,
95, 95, 99, 99, 99, 99, 101, 101, 101, 101, 89, 89, 89, 89, 89, 89, 103, 103, 133, 103,
122, 122, 122, 122, 15, 126, 126, 126, 126, 126, 103, 103, 103, 103, 103, 103, 103, 103, 107, 107,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 107, 107, 111, 111, 111, 111, 123, 123, 123, 123,
126, 126, 126, 126, 126, 126 15, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133
} ; } ;
static yyconst short int yy_chk[457] = static yyconst short int yy_chk[473] =
{ 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, 5, 21, 5, 13, 21, 5, 5, 5, 123, 1, 5, 24, 5, 13, 24, 5, 5, 5, 128,
5, 28, 5, 5, 6, 28, 6, 14, 13, 6, 5, 27, 5, 5, 6, 27, 6, 14, 13, 6,
6, 6, 50, 6, 50, 6, 6, 11, 11, 12, 6, 6, 52, 6, 52, 6, 6, 11, 11, 12,
12, 14, 25, 33, 33, 25, 11, 26, 12, 26, 12, 14, 23, 23, 25, 25, 11, 25, 12, 21,
115, 26, 27, 27, 29, 29, 36, 41, 41, 97, 21, 23, 34, 34, 125, 30, 30, 124, 21, 42,
36, 27, 27, 29, 27, 30, 30, 43, 43, 72, 42, 21, 26, 26, 30, 37, 44, 44, 54, 37,
30, 46, 46, 72, 30, 35, 46, 35, 68, 68, 54, 26, 47, 47, 26, 28, 28, 47, 50, 50,
35, 35, 35, 52, 35, 52, 35, 35, 49, 49, 109, 50, 51, 51, 28, 28, 61, 28, 61, 73,
95, 49, 54, 54, 54, 54, 54, 54, 54, 54, 73, 51, 28, 31, 31, 62, 62, 77, 31, 82,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 82, 77, 31, 36, 62, 36, 74, 74, 36, 36,
54, 54, 54, 56, 57, 56, 57, 88, 56, 56, 36, 74, 36, 105, 36, 36, 56, 56, 56, 56,
56, 93, 56, 93, 56, 56, 58, 58, 62, 62, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
73, 69, 69, 74, 74, 58, 69, 62, 77, 77, 56, 56, 56, 56, 56, 56, 56, 59, 59, 65,
74, 78, 78, 79, 79, 64, 78, 81, 81, 82, 65, 67, 67, 65, 79, 79, 59, 83, 83, 59,
82, 98, 113, 98, 82, 90, 113, 90, 105, 105, 67, 79, 83, 103, 59, 60, 93, 60, 84, 84,
90, 90, 90, 90, 90, 90, 90, 90, 92, 61, 60, 60, 60, 98, 60, 98, 60, 60, 86, 86,
92, 102, 102, 92, 92, 92, 102, 92, 60, 92, 87, 87, 78, 102, 102, 87, 95, 102, 95, 115,
92, 96, 53, 96, 103, 103, 96, 96, 96, 103, 115, 95, 95, 95, 95, 95, 95, 95, 95, 97,
96, 51, 96, 96, 100, 100, 106, 106, 48, 107, 106, 97, 106, 126, 97, 97, 97, 126, 97, 110,
107, 106, 47, 100, 107, 31, 100, 109, 109, 110, 97, 97, 100, 100, 110, 112, 112, 69, 113, 113,
110, 100, 109, 24, 110, 114, 114, 116, 116, 118, 112, 100, 104, 113, 104, 116, 116, 104, 104, 104,
118, 119, 119, 118, 120, 120, 116, 124, 119, 121, 116, 104, 66, 104, 104, 117, 117, 119, 119, 64,
121, 120, 124, 125, 125, 127, 127, 127, 127, 127, 117, 57, 119, 120, 120, 127, 127, 55, 120, 129,
127, 127, 127, 127, 127, 127, 127, 128, 128, 128, 129, 130, 130, 131, 131, 53, 129, 49, 130, 132,
128, 128, 128, 128, 128, 128, 128, 128, 128, 129, 132, 134, 134, 134, 134, 134, 134, 134, 134, 134,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 134, 134, 134, 135, 135, 135, 135, 135, 135, 135,
129, 130, 130, 130, 130, 130, 130, 130, 130, 130,
130, 130, 130, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 132, 132, 132, 132, 132,
132, 132, 132, 132, 132, 132, 132, 133, 23, 19,
133, 133, 133, 134, 134, 15, 10, 9, 8, 7,
134, 4, 134, 135, 135, 135, 135, 135, 3, 135,
135, 135, 135, 135, 135, 136, 136, 136, 136, 136, 135, 135, 135, 135, 135, 136, 136, 136, 136, 136,
136, 0, 136, 136, 136, 136, 136, 137, 0, 0, 136, 136, 136, 136, 136, 136, 136, 137, 137, 137,
137, 137, 137, 138, 138, 138, 138, 0, 138, 138,
138, 138, 138, 138, 138, 139, 139, 139, 139, 139, 137, 137, 137, 137, 137, 137, 137, 137, 137, 138,
0, 139, 139, 139, 139, 139, 139, 140, 140, 140, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
140, 140, 0, 140, 140, 140, 140, 140, 141, 141, 138, 139, 139, 139, 139, 139, 139, 139, 139, 139,
139, 139, 139, 140, 48, 32, 140, 140, 140, 141,
141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 29, 19, 15, 10, 9, 141, 8, 141, 142,
142, 142, 0, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 7, 142, 142, 142, 142, 142,
142, 142, 143, 143, 143, 143, 144, 144, 144, 144, 142, 143, 143, 143, 143, 143, 143, 4, 143, 143,
145, 145, 145, 145, 126, 126, 126, 126, 126, 126, 143, 143, 143, 144, 3, 0, 144, 144, 144, 145,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 145, 145, 145, 0, 145, 145, 145, 145, 145, 145,
126, 126, 126, 126, 126, 126 145, 146, 146, 146, 146, 146, 0, 146, 146, 146,
146, 146, 146, 147, 147, 147, 147, 147, 0, 147,
147, 147, 147, 147, 148, 148, 148, 148, 148, 148,
148, 148, 148, 148, 148, 148, 149, 149, 0, 149,
149, 149, 149, 149, 149, 149, 149, 149, 150, 150,
150, 150, 151, 151, 151, 151, 152, 152, 152, 152,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133
} ; } ;
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;
...@@ -547,7 +555,7 @@ char *yytext; ...@@ -547,7 +555,7 @@ char *yytext;
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.19 1998/05/04 02:01:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.20 1998/05/09 23:27:39 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -647,6 +655,9 @@ char literal[MAX_PARSE_BUFFER]; ...@@ -647,6 +655,9 @@ char literal[MAX_PARSE_BUFFER];
/* Comments /* Comments
* Ignored by the scanner and parser. * Ignored by the scanner and parser.
*/ */
/*
real [\-]?{digit}+\.{digit}+([Ee][-+]?{digit}+)?
*/
/* 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.
* So, put comments here. tgl - 1997-09-08 * So, put comments here. tgl - 1997-09-08
...@@ -659,7 +670,7 @@ char literal[MAX_PARSE_BUFFER]; ...@@ -659,7 +670,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 663 "lex.yy.c" #line 674 "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.
...@@ -810,9 +821,9 @@ YY_DECL ...@@ -810,9 +821,9 @@ YY_DECL
register char *yy_cp, *yy_bp; register char *yy_cp, *yy_bp;
register int yy_act; register int yy_act;
#line 178 "scan.l" #line 179 "scan.l"
#line 816 "lex.yy.c" #line 827 "lex.yy.c"
if ( yy_init ) if ( yy_init )
{ {
...@@ -860,14 +871,14 @@ yy_match: ...@@ -860,14 +871,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 >= 127 ) if ( yy_current_state >= 134 )
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] != 435 ); while ( yy_base[yy_current_state] != 451 );
yy_find_action: yy_find_action:
yy_current_state = *--yy_state_ptr; yy_current_state = *--yy_state_ptr;
...@@ -918,34 +929,34 @@ do_action: /* This label is used only to access EOF actions. */ ...@@ -918,34 +929,34 @@ 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 179 "scan.l" #line 180 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 2: case 2:
YY_RULE_SETUP YY_RULE_SETUP
#line 181 "scan.l" #line 182 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 3: case 3:
#line 184 "scan.l" #line 185 "scan.l"
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 184 "scan.l" #line 185 "scan.l"
{ BEGIN(xc); } { BEGIN(xc); }
YY_BREAK YY_BREAK
case 5: case 5:
YY_RULE_SETUP YY_RULE_SETUP
#line 186 "scan.l" #line 187 "scan.l"
{ BEGIN(INITIAL); } { BEGIN(INITIAL); }
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
#line 188 "scan.l" #line 189 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 7: case 7:
YY_RULE_SETUP YY_RULE_SETUP
#line 190 "scan.l" #line 191 "scan.l"
{ {
BEGIN(xb); BEGIN(xb);
llen = 0; llen = 0;
...@@ -954,7 +965,7 @@ YY_RULE_SETUP ...@@ -954,7 +965,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 8: case 8:
YY_RULE_SETUP YY_RULE_SETUP
#line 195 "scan.l" #line 196 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -967,10 +978,10 @@ YY_RULE_SETUP ...@@ -967,10 +978,10 @@ YY_RULE_SETUP
} }
YY_BREAK YY_BREAK
case 9: case 9:
#line 206 "scan.l" #line 207 "scan.l"
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 206 "scan.l" #line 207 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -979,16 +990,16 @@ YY_RULE_SETUP ...@@ -979,16 +990,16 @@ YY_RULE_SETUP
} }
YY_BREAK YY_BREAK
case 11: case 11:
#line 213 "scan.l" #line 214 "scan.l"
case 12: case 12:
YY_RULE_SETUP YY_RULE_SETUP
#line 213 "scan.l" #line 214 "scan.l"
{ {
} }
YY_BREAK YY_BREAK
case 13: case 13:
YY_RULE_SETUP YY_RULE_SETUP
#line 216 "scan.l" #line 217 "scan.l"
{ {
BEGIN(xh); BEGIN(xh);
llen = 0; llen = 0;
...@@ -997,7 +1008,7 @@ YY_RULE_SETUP ...@@ -997,7 +1008,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 14: case 14:
YY_RULE_SETUP YY_RULE_SETUP
#line 221 "scan.l" #line 222 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -1011,7 +1022,7 @@ YY_RULE_SETUP ...@@ -1011,7 +1022,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 15: case 15:
YY_RULE_SETUP YY_RULE_SETUP
#line 232 "scan.l" #line 233 "scan.l"
{ {
BEGIN(xq); BEGIN(xq);
llen = 0; llen = 0;
...@@ -1020,7 +1031,7 @@ YY_RULE_SETUP ...@@ -1020,7 +1031,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 16: case 16:
YY_RULE_SETUP YY_RULE_SETUP
#line 237 "scan.l" #line 238 "scan.l"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
yylval.str = pstrdup(scanstr(literal)); yylval.str = pstrdup(scanstr(literal));
...@@ -1028,10 +1039,10 @@ YY_RULE_SETUP ...@@ -1028,10 +1039,10 @@ YY_RULE_SETUP
} }
YY_BREAK YY_BREAK
case 17: case 17:
#line 243 "scan.l" #line 244 "scan.l"
case 18: case 18:
YY_RULE_SETUP YY_RULE_SETUP
#line 243 "scan.l" #line 244 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -1041,7 +1052,7 @@ YY_RULE_SETUP ...@@ -1041,7 +1052,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 19: case 19:
YY_RULE_SETUP YY_RULE_SETUP
#line 249 "scan.l" #line 250 "scan.l"
{ {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -1052,7 +1063,7 @@ YY_RULE_SETUP ...@@ -1052,7 +1063,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 20: case 20:
YY_RULE_SETUP YY_RULE_SETUP
#line 257 "scan.l" #line 258 "scan.l"
{ {
if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -1062,13 +1073,13 @@ YY_RULE_SETUP ...@@ -1062,13 +1073,13 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 21: case 21:
YY_RULE_SETUP YY_RULE_SETUP
#line 263 "scan.l" #line 264 "scan.l"
{ {
} }
YY_BREAK YY_BREAK
case 22: case 22:
YY_RULE_SETUP YY_RULE_SETUP
#line 267 "scan.l" #line 268 "scan.l"
{ {
BEGIN(xd); BEGIN(xd);
llen = 0; llen = 0;
...@@ -1077,7 +1088,7 @@ YY_RULE_SETUP ...@@ -1077,7 +1088,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 23: case 23:
YY_RULE_SETUP YY_RULE_SETUP
#line 272 "scan.l" #line 273 "scan.l"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
yylval.str = pstrdup(literal); yylval.str = pstrdup(literal);
...@@ -1086,7 +1097,7 @@ YY_RULE_SETUP ...@@ -1086,7 +1097,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 24: case 24:
YY_RULE_SETUP YY_RULE_SETUP
#line 277 "scan.l" #line 278 "scan.l"
{ {
if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1)) if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER); elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
...@@ -1096,12 +1107,12 @@ YY_RULE_SETUP ...@@ -1096,12 +1107,12 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 25: case 25:
YY_RULE_SETUP YY_RULE_SETUP
#line 285 "scan.l" #line 286 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 26: case 26:
YY_RULE_SETUP YY_RULE_SETUP
#line 286 "scan.l" #line 287 "scan.l"
{ {
BEGIN(INITIAL); BEGIN(INITIAL);
return (yytext[0]); return (yytext[0]);
...@@ -1109,7 +1120,7 @@ YY_RULE_SETUP ...@@ -1109,7 +1120,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 27: case 27:
YY_RULE_SETUP YY_RULE_SETUP
#line 292 "scan.l" #line 293 "scan.l"
{ return TYPECAST; } { return TYPECAST; }
YY_BREAK YY_BREAK
case 28: case 28:
...@@ -1117,14 +1128,15 @@ case 28: ...@@ -1117,14 +1128,15 @@ case 28:
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 294 "scan.l" #line 295 "scan.l"
{ {
BEGIN(xm);
return (yytext[0]); return (yytext[0]);
} }
YY_BREAK YY_BREAK
case 29: case 29:
YY_RULE_SETUP YY_RULE_SETUP
#line 297 "scan.l" #line 299 "scan.l"
{ return (yytext[0]); } { return (yytext[0]); }
YY_BREAK YY_BREAK
case 30: case 30:
...@@ -1132,7 +1144,7 @@ case 30: ...@@ -1132,7 +1144,7 @@ case 30:
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 298 "scan.l" #line 300 "scan.l"
{ {
yylval.str = pstrdup((char*)yytext); yylval.str = pstrdup((char*)yytext);
return (Op); return (Op);
...@@ -1140,7 +1152,7 @@ YY_RULE_SETUP ...@@ -1140,7 +1152,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 31: case 31:
YY_RULE_SETUP YY_RULE_SETUP
#line 302 "scan.l" #line 304 "scan.l"
{ {
if (strcmp((char*)yytext,"!=") == 0) if (strcmp((char*)yytext,"!=") == 0)
yylval.str = pstrdup("<>"); /* compatability */ yylval.str = pstrdup("<>"); /* compatability */
...@@ -1151,7 +1163,7 @@ YY_RULE_SETUP ...@@ -1151,7 +1163,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 32: case 32:
YY_RULE_SETUP YY_RULE_SETUP
#line 309 "scan.l" #line 311 "scan.l"
{ {
yylval.ival = atoi((char*)&yytext[1]); yylval.ival = atoi((char*)&yytext[1]);
return (PARAM); return (PARAM);
...@@ -1159,7 +1171,7 @@ YY_RULE_SETUP ...@@ -1159,7 +1171,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 33: case 33:
YY_RULE_SETUP YY_RULE_SETUP
#line 314 "scan.l" #line 317 "scan.l"
{ {
int i; int i;
ScanKeyword *keyword; ScanKeyword *keyword;
...@@ -1182,7 +1194,7 @@ YY_RULE_SETUP ...@@ -1182,7 +1194,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 34: case 34:
YY_RULE_SETUP YY_RULE_SETUP
#line 333 "scan.l" #line 336 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -1204,7 +1216,7 @@ YY_RULE_SETUP ...@@ -1204,7 +1216,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 35: case 35:
YY_RULE_SETUP YY_RULE_SETUP
#line 351 "scan.l" #line 354 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -1219,7 +1231,7 @@ YY_RULE_SETUP ...@@ -1219,7 +1231,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 36: case 36:
YY_RULE_SETUP YY_RULE_SETUP
#line 362 "scan.l" #line 365 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -1240,7 +1252,7 @@ YY_RULE_SETUP ...@@ -1240,7 +1252,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 37: case 37:
YY_RULE_SETUP YY_RULE_SETUP
#line 379 "scan.l" #line 382 "scan.l"
{ {
char* endptr; char* endptr;
...@@ -1254,7 +1266,7 @@ YY_RULE_SETUP ...@@ -1254,7 +1266,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 38: case 38:
YY_RULE_SETUP YY_RULE_SETUP
#line 389 "scan.l" #line 394 "scan.l"
{ {
int i; int i;
ScanKeyword *keyword; ScanKeyword *keyword;
...@@ -1276,20 +1288,20 @@ YY_RULE_SETUP ...@@ -1276,20 +1288,20 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 39: case 39:
YY_RULE_SETUP YY_RULE_SETUP
#line 407 "scan.l" #line 412 "scan.l"
{ /* ignore */ } { /* ignore */ }
YY_BREAK YY_BREAK
case 40: case 40:
YY_RULE_SETUP YY_RULE_SETUP
#line 409 "scan.l" #line 414 "scan.l"
{ return (yytext[0]); } { return (yytext[0]); }
YY_BREAK YY_BREAK
case 41: case 41:
YY_RULE_SETUP YY_RULE_SETUP
#line 411 "scan.l" #line 416 "scan.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 1293 "lex.yy.c" #line 1305 "lex.yy.c"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(xb): case YY_STATE_EOF(xb):
case YY_STATE_EOF(xc): case YY_STATE_EOF(xc):
...@@ -1584,7 +1596,7 @@ static yy_state_type yy_get_previous_state() ...@@ -1584,7 +1596,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 >= 127 ) if ( yy_current_state >= 134 )
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];
...@@ -1614,11 +1626,11 @@ yy_state_type yy_current_state; ...@@ -1614,11 +1626,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 >= 127 ) if ( yy_current_state >= 134 )
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 == 126); yy_is_jam = (yy_current_state == 133);
if ( ! yy_is_jam ) if ( ! yy_is_jam )
*yy_state_ptr++ = yy_current_state; *yy_state_ptr++ = yy_current_state;
...@@ -2175,7 +2187,7 @@ int main() ...@@ -2175,7 +2187,7 @@ int main()
return 0; return 0;
} }
#endif #endif
#line 411 "scan.l" #line 416 "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