1
0
Fork 0

fix issue in regex

This commit is contained in:
Jan Steemann 2015-05-08 17:45:00 +02:00
parent 5ad7dea0c8
commit dd51747a3d
4 changed files with 58 additions and 56 deletions

View File

@ -436,7 +436,7 @@ static yyconst flex_int32_t yy_ec[256] =
27, 28, 5, 5, 5, 5, 5, 29, 5, 30,
5, 5, 5, 31, 32, 33, 34, 5, 5, 5,
1, 1, 35, 1, 36, 1, 1, 1, 1, 1,
5, 5, 35, 5, 36, 5, 5, 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,
@ -463,11 +463,11 @@ static yyconst flex_int32_t yy_meta[37] =
static yyconst flex_int16_t yy_base[47] =
{ 0,
0, 0, 119, 131, 35, 38, 42, 35, 131, 40,
41, 131, 35, 35, 39, 131, 131, 131, 131, 60,
48, 78, 131, 93, 61, 79, 48, 86, 89, 56,
57, 53, 131, 96, 71, 98, 83, 88, 97, 103,
131, 131, 131, 131, 91, 64
0, 0, 114, 126, 35, 38, 42, 35, 126, 40,
41, 126, 35, 35, 39, 126, 126, 126, 126, 60,
48, 72, 126, 89, 50, 70, 72, 79, 83, 42,
70, 67, 126, 91, 93, 96, 80, 92, 96, 98,
126, 126, 126, 126, 78, 75
} ;
static yyconst flex_int16_t yy_def[47] =
@ -479,48 +479,48 @@ static yyconst flex_int16_t yy_def[47] =
44, 44, 44, 0, 44, 44
} ;
static yyconst flex_int16_t yy_nxt[168] =
static yyconst flex_int16_t yy_nxt[163] =
{ 0,
4, 5, 6, 5, 4, 7, 8, 9, 8, 4,
10, 11, 12, 4, 4, 13, 4, 14, 4, 4,
15, 4, 16, 4, 17, 4, 4, 13, 4, 14,
4, 4, 15, 4, 18, 19, 20, 20, 20, 20,
20, 20, 21, 21, 21, 25, 26, 23, 30, 27,
27, 29, 29, 33, 28, 28, 31, 32, 34, 34,
30, 20, 20, 20, 21, 24, 28, 28, 31, 32,
27, 24, 37, 38, 39, 28, 21, 21, 21, 21,
21, 36, 36, 23, 37, 38, 39, 28, 27, 29,
29, 22, 35, 28, 35, 44, 36, 36, 27, 29,
27, 29, 29, 33, 28, 28, 31, 32, 37, 27,
30, 20, 20, 20, 28, 24, 28, 28, 31, 32,
37, 24, 21, 21, 21, 21, 28, 23, 22, 27,
29, 29, 34, 34, 28, 35, 38, 35, 39, 36,
36, 44, 27, 29, 29, 24, 28, 28, 38, 40,
29, 24, 40, 28, 41, 28, 34, 34, 36, 36,
28, 42, 21, 21, 40, 28, 41, 43, 44, 44,
44, 44, 28, 42, 44, 44, 44, 44, 44, 43,
3, 44, 44, 44, 44, 44, 44, 44, 44, 44,
39, 34, 34, 36, 36, 28, 36, 36, 41, 28,
42, 40, 43, 44, 44, 44, 44, 28, 44, 44,
41, 44, 42, 44, 43, 3, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44
} ;
static yyconst flex_int16_t yy_chk[168] =
static yyconst flex_int16_t yy_chk[163] =
{ 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, 5, 5, 5, 6,
6, 6, 7, 7, 7, 8, 8, 7, 13, 10,
11, 11, 11, 21, 10, 11, 14, 15, 27, 27,
13, 20, 20, 20, 46, 7, 10, 11, 14, 15,
25, 21, 30, 31, 32, 25, 7, 7, 22, 22,
22, 35, 35, 22, 30, 31, 32, 25, 26, 26,
26, 45, 28, 26, 28, 24, 28, 28, 29, 29,
11, 11, 11, 21, 10, 11, 14, 15, 30, 25,
13, 20, 20, 20, 25, 7, 10, 11, 14, 15,
30, 21, 22, 22, 22, 46, 25, 22, 45, 26,
26, 26, 27, 27, 26, 28, 31, 28, 32, 28,
28, 24, 29, 29, 29, 22, 26, 29, 31, 37,
29, 22, 37, 29, 38, 26, 34, 34, 36, 36,
34, 39, 22, 22, 37, 29, 38, 40, 3, 0,
0, 0, 34, 39, 0, 0, 0, 0, 0, 40,
32, 34, 34, 35, 35, 34, 36, 36, 38, 29,
39, 37, 40, 3, 0, 0, 0, 34, 0, 0,
38, 0, 39, 0, 40, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44
44, 44
} ;
/* The intent behind this definition is that it'll catch

View File

@ -110,7 +110,7 @@ struct jsonData {
* strings
* ----------------------------------------------------------------------------- */
\"[ !\x23-\x5b\x5d-x7f]*\" {
\"[ !\x23-\x5b\x5d-\x7f]*\" {
// performance optimisation for all-ASCII strings without escape characters
// this matches the ASCII chars with ordinal numbers 35 (x23) to 127 (x7f),
// plus space (32) and ! (33) but no quotation marks (34, x22) and backslashes (92, x5c)

View File

@ -429,7 +429,7 @@ static yyconst flex_int32_t yy_ec[256] =
27, 28, 5, 5, 5, 5, 5, 29, 5, 30,
5, 5, 5, 31, 32, 33, 34, 5, 5, 5,
1, 1, 35, 1, 36, 1, 1, 1, 1, 1,
5, 5, 35, 5, 36, 5, 5, 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,
@ -456,11 +456,11 @@ static yyconst flex_int32_t yy_meta[37] =
static yyconst flex_int16_t yy_base[47] =
{ 0,
0, 0, 119, 131, 35, 38, 42, 35, 131, 40,
41, 131, 35, 35, 39, 131, 131, 131, 131, 60,
48, 78, 131, 93, 61, 79, 48, 86, 89, 56,
57, 53, 131, 96, 71, 98, 83, 88, 97, 103,
131, 131, 131, 131, 91, 64
0, 0, 114, 126, 35, 38, 42, 35, 126, 40,
41, 126, 35, 35, 39, 126, 126, 126, 126, 60,
48, 72, 126, 89, 50, 70, 72, 79, 83, 42,
70, 67, 126, 91, 93, 96, 80, 92, 96, 98,
126, 126, 126, 126, 78, 75
} ;
static yyconst flex_int16_t yy_def[47] =
@ -472,48 +472,48 @@ static yyconst flex_int16_t yy_def[47] =
44, 44, 44, 0, 44, 44
} ;
static yyconst flex_int16_t yy_nxt[168] =
static yyconst flex_int16_t yy_nxt[163] =
{ 0,
4, 5, 6, 5, 4, 7, 8, 9, 8, 4,
10, 11, 12, 4, 4, 13, 4, 14, 4, 4,
15, 4, 16, 4, 17, 4, 4, 13, 4, 14,
4, 4, 15, 4, 18, 19, 20, 20, 20, 20,
20, 20, 21, 21, 21, 25, 26, 23, 30, 27,
27, 29, 29, 33, 28, 28, 31, 32, 34, 34,
30, 20, 20, 20, 21, 24, 28, 28, 31, 32,
27, 24, 37, 38, 39, 28, 21, 21, 21, 21,
21, 36, 36, 23, 37, 38, 39, 28, 27, 29,
29, 22, 35, 28, 35, 44, 36, 36, 27, 29,
27, 29, 29, 33, 28, 28, 31, 32, 37, 27,
30, 20, 20, 20, 28, 24, 28, 28, 31, 32,
37, 24, 21, 21, 21, 21, 28, 23, 22, 27,
29, 29, 34, 34, 28, 35, 38, 35, 39, 36,
36, 44, 27, 29, 29, 24, 28, 28, 38, 40,
29, 24, 40, 28, 41, 28, 34, 34, 36, 36,
28, 42, 21, 21, 40, 28, 41, 43, 44, 44,
44, 44, 28, 42, 44, 44, 44, 44, 44, 43,
3, 44, 44, 44, 44, 44, 44, 44, 44, 44,
39, 34, 34, 36, 36, 28, 36, 36, 41, 28,
42, 40, 43, 44, 44, 44, 44, 28, 44, 44,
41, 44, 42, 44, 43, 3, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44
} ;
static yyconst flex_int16_t yy_chk[168] =
static yyconst flex_int16_t yy_chk[163] =
{ 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, 5, 5, 5, 6,
6, 6, 7, 7, 7, 8, 8, 7, 13, 10,
11, 11, 11, 21, 10, 11, 14, 15, 27, 27,
13, 20, 20, 20, 46, 7, 10, 11, 14, 15,
25, 21, 30, 31, 32, 25, 7, 7, 22, 22,
22, 35, 35, 22, 30, 31, 32, 25, 26, 26,
26, 45, 28, 26, 28, 24, 28, 28, 29, 29,
11, 11, 11, 21, 10, 11, 14, 15, 30, 25,
13, 20, 20, 20, 25, 7, 10, 11, 14, 15,
30, 21, 22, 22, 22, 46, 25, 22, 45, 26,
26, 26, 27, 27, 26, 28, 31, 28, 32, 28,
28, 24, 29, 29, 29, 22, 26, 29, 31, 37,
29, 22, 37, 29, 38, 26, 34, 34, 36, 36,
34, 39, 22, 22, 37, 29, 38, 40, 3, 0,
0, 0, 34, 39, 0, 0, 0, 0, 0, 40,
32, 34, 34, 35, 35, 34, 36, 36, 38, 29,
39, 37, 40, 3, 0, 0, 0, 34, 0, 0,
38, 0, 39, 0, 40, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44
44, 44
} ;
/* The intent behind this definition is that it'll catch
@ -2177,6 +2177,7 @@ static v8::Handle<v8::Value> ParseObject (v8::Isolate* isolate,
if (c == STRING_CONSTANT) {
// utf-8 attribute name
std::cout << "utf8 attribute name: " << std::string(yytext + 1, yyleng - 2) << "\n";
size_t outLength;
char* name = TRI_UnescapeUtf8StringZ(yyextra._memoryZone, yytext + 1, yyleng - 2, &outLength);

View File

@ -101,7 +101,7 @@ struct jsonData {
* strings
* ----------------------------------------------------------------------------- */
\"[ !\x23-\x5b\x5d-x7f]*\" {
\"[ !\x23-\x5b\x5d-\x7f]*\" {
// performance optimisation for all-ASCII strings without escape characters
// this matches the ASCII chars with ordinal numbers 35 (x23) to 127 (x7f),
// plus space (32) and ! (33) but no quotation marks (34, x22) and backslashes (92, x5c)
@ -259,6 +259,7 @@ static v8::Handle<v8::Value> ParseObject (v8::Isolate* isolate,
if (c == STRING_CONSTANT) {
// utf-8 attribute name
std::cout << "utf8 attribute name: " << std::string(yytext + 1, yyleng - 2) << "\n";
size_t outLength;
char* name = TRI_UnescapeUtf8StringZ(yyextra._memoryZone, yytext + 1, yyleng - 2, &outLength);