summaryrefslogtreecommitdiff
path: root/ext/json/ext/parser/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/ext/parser/parser.c')
-rw-r--r--ext/json/ext/parser/parser.c97
1 files changed, 8 insertions, 89 deletions
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c
index afa2864..269c9ca 100644
--- a/ext/json/ext/parser/parser.c
+++ b/ext/json/ext/parser/parser.c
@@ -102,17 +102,10 @@ static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions,
-<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0
#line 106 "parser.c"
-static const int JSON_object_start = 1;
-static const int JSON_object_first_final = 27;
-static const int JSON_object_error = 0;
-=======
-#line 92 "parser.c"
enum {JSON_object_start = 1};
enum {JSON_object_first_final = 27};
enum {JSON_object_error = 0};
->>>>>>> Use enum
enum {JSON_object_en_main = 1};
@@ -487,17 +480,10 @@ case 26:
-<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0
#line 484 "parser.c"
-static const int JSON_value_start = 1;
-static const int JSON_value_first_final = 29;
-static const int JSON_value_error = 0;
-=======
-#line 470 "parser.c"
enum {JSON_value_start = 1};
enum {JSON_value_first_final = 29};
enum {JSON_value_error = 0};
->>>>>>> Use enum
enum {JSON_value_en_main = 1};
@@ -892,17 +878,10 @@ case 28:
}
-<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0
#line 882 "parser.c"
-static const int JSON_integer_start = 1;
-static const int JSON_integer_first_final = 3;
-static const int JSON_integer_error = 0;
-=======
-#line 868 "parser.c"
enum {JSON_integer_start = 1};
enum {JSON_integer_first_final = 3};
enum {JSON_integer_error = 0};
->>>>>>> Use enum
enum {JSON_integer_en_main = 1};
@@ -998,17 +977,10 @@ case 5:
}
-<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0
#line 981 "parser.c"
-static const int JSON_float_start = 1;
-static const int JSON_float_first_final = 8;
-static const int JSON_float_error = 0;
-=======
-#line 967 "parser.c"
enum {JSON_float_start = 1};
enum {JSON_float_first_final = 8};
enum {JSON_float_error = 0};
->>>>>>> Use enum
enum {JSON_float_en_main = 1};
@@ -1171,17 +1143,10 @@ case 7:
-<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0
#line 1147 "parser.c"
-static const int JSON_array_start = 1;
-static const int JSON_array_first_final = 17;
-static const int JSON_array_error = 0;
-=======
-#line 1133 "parser.c"
enum {JSON_array_start = 1};
enum {JSON_array_first_final = 17};
enum {JSON_array_error = 0};
->>>>>>> Use enum
enum {JSON_array_en_main = 1};
@@ -1510,17 +1475,10 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
}
-<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0
#line 1479 "parser.c"
-static const int JSON_string_start = 1;
-static const int JSON_string_first_final = 8;
-static const int JSON_string_error = 0;
-=======
-#line 1465 "parser.c"
enum {JSON_string_start = 1};
enum {JSON_string_first_final = 8};
enum {JSON_string_error = 0};
->>>>>>> Use enum
enum {JSON_string_en_main = 1};
@@ -1852,30 +1810,15 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
}
-<<<<<<< 949543418c0888d7deba00a93e08b7f56637ce9b
-<<<<<<< dad1dad53ad48946bf2a8de60b8fb419e1180bf0
-#line 1813 "parser.c"
-static const int JSON_start = 1;
-static const int JSON_first_final = 10;
-static const int JSON_error = 0;
-=======
-#line 1788 "parser.c"
-=======
-#line 1787 "parser.c"
->>>>>>> Remove unnecessary conversion
+#line 1814 "parser.c"
enum {JSON_start = 1};
enum {JSON_first_final = 10};
enum {JSON_error = 0};
->>>>>>> Use enum
enum {JSON_en_main = 1};
-<<<<<<< 949543418c0888d7deba00a93e08b7f56637ce9b
-#line 721 "parser.rl"
-=======
-#line 695 "parser.rl"
->>>>>>> Remove unnecessary conversion
+#line 722 "parser.rl"
/*
@@ -1892,28 +1835,16 @@ static VALUE cParser_parse(VALUE self)
GET_PARSER;
-<<<<<<< 949543418c0888d7deba00a93e08b7f56637ce9b
-#line 1838 "parser.c"
-=======
-#line 1812 "parser.c"
->>>>>>> Remove unnecessary conversion
+#line 1839 "parser.c"
{
cs = JSON_start;
}
-<<<<<<< 949543418c0888d7deba00a93e08b7f56637ce9b
-#line 737 "parser.rl"
+#line 738 "parser.rl"
p = json->source;
pe = p + json->len;
-#line 1847 "parser.c"
-=======
-#line 711 "parser.rl"
- p = json->source;
- pe = p + json->len;
-
-#line 1821 "parser.c"
->>>>>>> Remove unnecessary conversion
+#line 1848 "parser.c"
{
if ( p == pe )
goto _test_eof;
@@ -1947,11 +1878,7 @@ st0:
cs = 0;
goto _out;
tr2:
-<<<<<<< 949543418c0888d7deba00a93e08b7f56637ce9b
-#line 713 "parser.rl"
-=======
-#line 687 "parser.rl"
->>>>>>> Remove unnecessary conversion
+#line 714 "parser.rl"
{
char *np = JSON_parse_value(json, p, pe, &result);
if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;}
@@ -1961,11 +1888,7 @@ st10:
if ( ++p == pe )
goto _test_eof10;
case 10:
-<<<<<<< 949543418c0888d7deba00a93e08b7f56637ce9b
-#line 1891 "parser.c"
-=======
-#line 1865 "parser.c"
->>>>>>> Remove unnecessary conversion
+#line 1892 "parser.c"
switch( (*p) ) {
case 13: goto st10;
case 32: goto st10;
@@ -2054,11 +1977,7 @@ case 9:
_out: {}
}
-<<<<<<< 949543418c0888d7deba00a93e08b7f56637ce9b
-#line 740 "parser.rl"
-=======
-#line 714 "parser.rl"
->>>>>>> Remove unnecessary conversion
+#line 741 "parser.rl"
if (cs >= JSON_first_final && p == pe) {
return result;