From 5e25c2a259d2337d38b730d5dc22e7db67ea88cb Mon Sep 17 00:00:00 2001 From: Stephen Roantree Date: Wed, 24 Oct 2012 11:42:25 -0700 Subject: [PATCH 1/3] Implemented contains operator --- builtin.c | 16 + docs/content/3.manual/manual.yml | 28 +- jv.c | 60 + jv.h | 1 + lexer.gen.c | 301 +-- lexer.gen.h | 31 +- lexer.l | 1 + parser.gen.c | 1376 ++++++------ parser.gen.h | 57 +- parser.gen.info | 3618 ++++++++++++++++-------------- parser.y | 8 +- testdata | 25 + 12 files changed, 2965 insertions(+), 2557 deletions(-) diff --git a/builtin.c b/builtin.c index 3d726854..fb6f072c 100644 --- a/builtin.c +++ b/builtin.c @@ -161,6 +161,21 @@ static void f_greatereq(jv input[], jv output[]) { order_cmp(input, output, CMP_OP_GREATEREQ); } +static void f_contains(jv input[], jv output[]) { + jv_free(input[0]); + jv a = input[2]; + jv b = input[1]; + jv_kind akind = jv_get_kind(a); + + if (akind == jv_get_kind(b)) { + output[0] = jv_bool(jv_contains(a, b)); + } else { + output[0] = jv_invalid_with_msg(jv_string_fmt("Can only check containment of values of the same type.")); + jv_free(a); + jv_free(b); + } +} + static void f_tonumber(jv input[], jv output[]) { if (jv_get_kind(input[0]) == JV_KIND_NUMBER) { output[0] = input[0]; @@ -294,6 +309,7 @@ static struct cfunction function_list[] = { {f_greater, "_greater", CALL_BUILTIN_3_1}, {f_lesseq, "_lesseq", CALL_BUILTIN_3_1}, {f_greatereq, "_greatereq", CALL_BUILTIN_3_1}, + {f_contains, "_contains", CALL_BUILTIN_3_1}, {f_length, "length", CALL_BUILTIN_1_1}, {f_type, "type", CALL_BUILTIN_1_1}, {f_add, "add", CALL_BUILTIN_1_1}, diff --git a/docs/content/3.manual/manual.yml b/docs/content/3.manual/manual.yml index 6c107700..437afdff 100644 --- a/docs/content/3.manual/manual.yml +++ b/docs/content/3.manual/manual.yml @@ -522,7 +522,33 @@ sections: - program: '.[] == 1' input: '[1, 1.0, "1", "banana"]' output: ['[true, true, false, false]'] - + - title: `contains` + body: | + + The expression 'a contains b' will produce true if b is completely + contained within a. A string B is contained in a string A if B is a + substring of A. An array B is contained in an array A is all elements + in B are contained in any element in A. An object B is contained in + object A if all of the values in B are contained in the value in A with + the same key. All other types are assumed to be contained in each other + if they are equal. + + examples: + - program: '. == contains "bar"' + input: '"foobar"' + output: ['true'] + - program: '. contains ["baz", "bar"]' + input: '["foobar", "foobaz", "blarp"]' + output: ['true'] + - program: '. contains ["bazzzzz", "bar"]' + input: '["foobar", "foobaz", "blarp"]' + output: ['false'] + - program: '. contains {foo: 12, bar: [{barp: 12}]}' + input: '{foo: 12, bar:[1,2,{barp:12, blip:13}]}' + output: ['true'] + - program: '. contains {foo: 12, bar: [{barp: 15}]}' + input: '{foo: 12, bar:[1,2,{barp:12, blip:13}]}' + output: ['false'] - title: if-then-else body: | diff --git a/jv.c b/jv.c index 2d91366b..8515e7f4 100644 --- a/jv.c +++ b/jv.c @@ -250,6 +250,27 @@ static int jvp_array_equal(jv_complex* a, jv_complex* b) { return 1; } +static int jvp_array_contains(jv_complex* a, jv_complex* b) { + int r = 1; + for (int bi = 0; bi < jvp_array_length(b); bi++) { + int ri = 0; + jv* bval = jvp_array_read(b, bi); + for (int ai = 0; ai < jvp_array_length(a); ai++) { + jv aval = jv_copy(*jvp_array_read(a, ai)); + jv bval_copy = jv_copy(*bval); + if (jv_contains(aval, bval_copy)) { + ri = 1; + break; + } + } + if (!ri) { + r = 0; + break; + } + } + return r; +} + static jv_complex jvp_array_slice(jv_complex* a, int start, int end) { // FIXME: maybe slice should reallocate if the slice is small enough assert(start <= end); @@ -863,6 +884,27 @@ jv jv_object_merge(jv a, jv b) { return a; } +int jv_object_contains(jv a, jv b) { + assert(jv_get_kind(a) == JV_KIND_OBJECT); + assert(jv_get_kind(b) == JV_KIND_OBJECT); + int r = 1; + + for (int i=0; istring) continue; + jv* slota = jvp_object_read(&a.val.complex, slotb->string); + if (!(slota && jv_get_kind(slotb->value) == jv_get_kind(*slota) + && jv_contains(jv_copy(*slota), jv_copy(slotb->value)))) { + r = 0; + break; + } + } + + jv_free(a); + jv_free(b); + return r; +} + /* * Object iteration (internal helpers) */ @@ -977,3 +1019,21 @@ int jv_equal(jv a, jv b) { jv_free(b); return r; } + +int jv_contains(jv a, jv b) { + int r = 1; + if (jv_get_kind(a) != jv_get_kind(b)) { + r = 0; + } else if (jv_get_kind(a) == JV_KIND_OBJECT) { + r = jv_object_contains(jv_copy(a), jv_copy(b)); + } else if (jv_get_kind(a) == JV_KIND_ARRAY) { + r = jvp_array_contains(&a.val.complex, &b.val.complex); + } else if (jv_get_kind(a) == JV_KIND_STRING) { + r = strstr(jv_string_value(a), jv_string_value(b)) != 0; + } else { + r = jv_equal(jv_copy(a), jv_copy(b)); + } + jv_free(a); + jv_free(b); + return r; +} \ No newline at end of file diff --git a/jv.h b/jv.h index e67d614a..a77346c3 100644 --- a/jv.h +++ b/jv.h @@ -48,6 +48,7 @@ jv jv_copy(jv); void jv_free(jv); int jv_equal(jv, jv); +int jv_contains(jv, jv); jv jv_invalid(); jv jv_invalid_with_msg(jv); diff --git a/lexer.gen.c b/lexer.gen.c index dbaf0abc..c1458c69 100644 --- a/lexer.gen.c +++ b/lexer.gen.c @@ -9,7 +9,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -159,7 +159,15 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -171,11 +179,6 @@ typedef void* yyscan_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 @@ -198,6 +201,11 @@ typedef size_t yy_size_t; #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -215,7 +223,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -294,7 +302,7 @@ static void jq_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner YY_BUFFER_STATE jq_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE jq_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE jq_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); +YY_BUFFER_STATE jq_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *jq_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *jq_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -326,7 +334,7 @@ void jq_yyfree (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define jq_yywrap(yyscanner) 1 +#define jq_yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -350,8 +358,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 35 -#define YY_END_OF_BUFFER 36 +#define YY_NUM_RULES 36 +#define YY_END_OF_BUFFER 37 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -359,17 +367,19 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[88] = +static yyconst flex_int16_t yy_accept[96] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 36, 34, 33, 33, 34, 26, 1, 22, - 23, 24, 22, 22, 22, 22, 22, 25, 22, 22, - 22, 32, 32, 32, 32, 32, 32, 32, 22, 30, - 30, 28, 31, 33, 2, 1, 17, 15, 25, 16, - 0, 13, 18, 20, 3, 21, 32, 32, 4, 32, - 32, 32, 6, 11, 32, 14, 30, 29, 27, 29, - 0, 25, 19, 10, 5, 32, 32, 12, 32, 0, - 29, 9, 8, 7, 29, 29, 0 + 0, 0, 37, 35, 34, 34, 35, 27, 1, 23, + 24, 25, 23, 23, 23, 23, 23, 26, 23, 23, + 23, 33, 33, 33, 33, 33, 33, 33, 33, 23, + 31, 31, 29, 32, 34, 2, 1, 17, 15, 26, + 16, 0, 13, 18, 20, 3, 21, 33, 33, 4, + 33, 33, 33, 33, 6, 11, 33, 14, 31, 30, + 28, 30, 0, 26, 19, 10, 33, 5, 33, 33, + 12, 33, 0, 30, 33, 9, 8, 7, 30, 33, + 30, 33, 33, 22, 0 + } ; static yyconst flex_int32_t yy_ec[256] = @@ -383,11 +393,11 @@ static yyconst flex_int32_t yy_ec[256] = 21, 22, 1, 1, 23, 23, 23, 23, 24, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 25, 26, 27, 1, 28, 1, 29, 23, 23, 30, + 25, 26, 27, 1, 28, 1, 29, 23, 30, 31, - 31, 32, 23, 33, 34, 23, 23, 35, 23, 36, - 37, 23, 23, 38, 39, 40, 41, 23, 23, 23, - 23, 23, 42, 43, 44, 1, 1, 1, 1, 1, + 32, 33, 23, 34, 35, 23, 23, 36, 23, 37, + 38, 23, 23, 39, 40, 41, 42, 23, 23, 23, + 23, 23, 43, 44, 45, 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, @@ -404,91 +414,97 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[45] = +static yyconst flex_int32_t yy_meta[46] = { 0, 1, 1, 2, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 4, 4, 1, 5, 1, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 1, 1, 1 + 4, 4, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[97] = +static yyconst flex_int16_t yy_base[105] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 42, 43, 144, 145, 48, 50, 122, 145, 0, 145, - 145, 145, 121, 120, 39, 40, 42, 50, 119, 118, - 117, 0, 23, 91, 37, 88, 78, 77, 80, 0, - 0, 145, 38, 73, 145, 0, 145, 145, 63, 145, - 71, 79, 145, 145, 145, 145, 0, 69, 0, 66, - 27, 67, 0, 0, 65, 145, 0, 69, 145, 67, - 75, 74, 145, 0, 0, 58, 58, 0, 50, 61, - 58, 0, 0, 0, 56, 51, 145, 102, 108, 111, - 117, 123, 126, 128, 130, 132 + 43, 44, 152, 153, 49, 51, 130, 153, 0, 153, + 153, 153, 129, 128, 40, 41, 43, 51, 127, 126, + 125, 0, 23, 107, 112, 35, 110, 88, 91, 100, + 0, 0, 153, 39, 74, 153, 0, 153, 153, 63, + 153, 72, 94, 153, 153, 153, 153, 0, 75, 0, + 68, 71, 27, 72, 0, 0, 70, 153, 0, 75, + 153, 74, 82, 81, 153, 0, 56, 0, 63, 62, + 0, 56, 65, 66, 62, 0, 0, 0, 64, 53, + 59, 45, 39, 0, 153, 107, 113, 116, 122, 128, + 131, 133, 135, 137 } ; -static yyconst flex_int16_t yy_def[97] = +static yyconst flex_int16_t yy_def[105] = { 0, - 87, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 88, 88, 87, 87, 87, 87, 87, 87, 89, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 90, 90, 90, 90, 90, 90, 90, 87, 91, - 91, 87, 92, 87, 87, 89, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 90, 90, 90, 90, - 90, 90, 90, 90, 90, 87, 91, 87, 87, 93, - 87, 87, 87, 90, 90, 90, 90, 90, 90, 92, - 94, 90, 90, 90, 95, 96, 0, 87, 87, 87, - 87, 87, 87, 87, 87, 87 + 95, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 96, 96, 95, 95, 95, 95, 95, 95, 97, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 98, 98, 98, 98, 98, 98, 98, 98, 95, + 99, 99, 95, 100, 95, 95, 97, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 95, 99, 95, + 95, 101, 95, 95, 95, 98, 98, 98, 98, 98, + 98, 98, 100, 102, 98, 98, 98, 98, 103, 98, + 104, 98, 98, 98, 0, 95, 95, 95, 95, 95, + 95, 95, 95, 95 } ; -static yyconst flex_int16_t yy_nxt[190] = +static yyconst flex_int16_t yy_nxt[199] = { 0, 14, 15, 16, 14, 17, 18, 19, 20, 21, 22, 23, 24, 20, 25, 26, 27, 28, 20, 20, 29, 30, 31, 32, 32, 21, 14, 22, 32, 33, 34, - 35, 32, 32, 36, 32, 32, 37, 32, 32, 38, - 32, 21, 39, 22, 41, 41, 69, 42, 42, 44, - 44, 44, 44, 49, 49, 49, 49, 52, 58, 50, - 76, 59, 53, 51, 49, 77, 49, 43, 43, 87, - 51, 61, 62, 51, 44, 44, 80, 49, 70, 49, - 51, 80, 71, 80, 71, 84, 51, 72, 83, 82, - 72, 72, 80, 51, 80, 79, 78, 75, 74, 73, + 35, 36, 32, 32, 37, 32, 32, 38, 32, 32, + 39, 32, 21, 40, 22, 42, 42, 71, 43, 43, + 45, 45, 45, 45, 50, 50, 50, 50, 53, 59, + 51, 79, 60, 54, 52, 50, 80, 50, 44, 44, + 63, 64, 52, 95, 52, 45, 45, 50, 94, 50, + 72, 93, 52, 73, 83, 73, 52, 92, 74, 83, + 90, 83, 88, 87, 52, 86, 85, 74, 74, 83, + + 83, 82, 81, 78, 77, 76, 72, 41, 41, 41, + 41, 41, 41, 47, 75, 47, 47, 47, 47, 58, + 68, 58, 69, 69, 67, 69, 66, 69, 70, 70, + 70, 70, 70, 70, 84, 84, 89, 89, 91, 91, + 70, 70, 65, 62, 61, 57, 56, 55, 49, 48, + 46, 95, 13, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95 - 66, 70, 40, 40, 40, 40, 40, 40, 46, 65, - 46, 46, 46, 46, 57, 64, 57, 67, 67, 63, - 67, 60, 67, 68, 68, 68, 68, 68, 68, 81, - 81, 85, 85, 86, 86, 68, 68, 56, 55, 54, - 48, 47, 45, 87, 13, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87 } ; -static yyconst flex_int16_t yy_chk[190] = +static yyconst flex_int16_t yy_chk[199] = { 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, 1, 1, 11, 12, 43, 11, 12, 15, - 15, 16, 16, 25, 26, 25, 26, 27, 33, 25, - 61, 33, 27, 26, 28, 61, 28, 11, 12, 80, - 26, 35, 35, 28, 44, 44, 86, 49, 43, 49, - 28, 85, 51, 81, 51, 79, 49, 51, 77, 76, - 72, 71, 70, 49, 68, 65, 62, 60, 58, 52, + 1, 1, 1, 1, 1, 11, 12, 44, 11, 12, + 15, 15, 16, 16, 25, 26, 25, 26, 27, 33, + 25, 63, 33, 27, 26, 28, 63, 28, 11, 12, + 36, 36, 26, 83, 28, 45, 45, 50, 93, 50, + 44, 92, 28, 52, 91, 52, 50, 90, 52, 89, + 85, 84, 82, 80, 50, 79, 77, 74, 73, 72, + + 70, 67, 64, 62, 61, 59, 83, 96, 96, 96, + 96, 96, 96, 97, 53, 97, 97, 97, 97, 98, + 40, 98, 99, 99, 39, 99, 38, 99, 100, 100, + 100, 100, 100, 100, 101, 101, 102, 102, 103, 103, + 104, 104, 37, 35, 34, 31, 30, 29, 24, 23, + 17, 13, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95 - 39, 80, 88, 88, 88, 88, 88, 88, 89, 38, - 89, 89, 89, 89, 90, 37, 90, 91, 91, 36, - 91, 34, 91, 92, 92, 92, 92, 92, 92, 93, - 93, 94, 94, 95, 95, 96, 96, 31, 30, 29, - 24, 23, 17, 13, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87 } ; /* The intent behind this definition is that it'll catch @@ -522,7 +538,7 @@ struct lexer_param; static int enter(int opening, int state, yyscan_t yyscanner); static int try_exit(int closing, int state, yyscan_t yyscanner); #define YY_NO_INPUT 1 -#line 526 "lexer.gen.c" +#line 542 "lexer.gen.c" #define INITIAL 0 #define IN_PAREN 1 @@ -554,8 +570,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; + int yy_n_chars; + int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -612,7 +628,7 @@ FILE *jq_yyget_out (yyscan_t yyscanner ); void jq_yyset_out (FILE * out_str ,yyscan_t yyscanner ); -yy_size_t jq_yyget_leng (yyscan_t yyscanner ); +int jq_yyget_leng (yyscan_t yyscanner ); char *jq_yyget_text (yyscan_t yyscanner ); @@ -620,10 +636,6 @@ int jq_yyget_lineno (yyscan_t yyscanner ); void jq_yyset_lineno (int line_number ,yyscan_t yyscanner ); -int jq_yyget_column (yyscan_t yyscanner ); - -void jq_yyset_column (int column_no ,yyscan_t yyscanner ); - YYSTYPE * jq_yyget_lval (yyscan_t yyscanner ); void jq_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); @@ -670,7 +682,12 @@ static int input (yyscan_t yyscanner ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -777,7 +794,7 @@ YY_DECL #line 35 "lexer.l" -#line 781 "lexer.gen.c" +#line 798 "lexer.gen.c" yylval = yylval_param; @@ -834,13 +851,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 88 ) + if ( yy_current_state >= 96 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 145 ); + while ( yy_base[yy_current_state] != 153 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -972,57 +989,62 @@ YY_RULE_SETUP case 22: YY_RULE_SETUP #line 59 "lexer.l" -{ return yytext[0];} +{ return CONTAINS; } YY_BREAK case 23: YY_RULE_SETUP -#line 61 "lexer.l" +#line 60 "lexer.l" +{ return yytext[0];} + YY_BREAK +case 24: +YY_RULE_SETUP +#line 62 "lexer.l" { return enter(yytext[0], YY_START, yyscanner); } YY_BREAK -case 24: +case 25: YY_RULE_SETUP -#line 65 "lexer.l" +#line 66 "lexer.l" { return try_exit(yytext[0], YY_START, yyscanner); } YY_BREAK -case 25: +case 26: YY_RULE_SETUP -#line 70 "lexer.l" +#line 71 "lexer.l" { yylval->literal = jv_parse_sized(yytext, yyleng); return LITERAL; } YY_BREAK -case 26: +case 27: YY_RULE_SETUP -#line 74 "lexer.l" +#line 75 "lexer.l" { yy_push_state(IN_QQSTRING, yyscanner); return QQSTRING_START; } YY_BREAK -case 27: +case 28: YY_RULE_SETUP -#line 80 "lexer.l" +#line 81 "lexer.l" { return enter(QQSTRING_INTERP_START, YY_START, yyscanner); } YY_BREAK -case 28: +case 29: YY_RULE_SETUP -#line 83 "lexer.l" +#line 84 "lexer.l" { yy_pop_state(yyscanner); return QQSTRING_END; } YY_BREAK -case 29: -/* rule 29 can match eol */ +case 30: +/* rule 30 can match eol */ YY_RULE_SETUP -#line 87 "lexer.l" +#line 88 "lexer.l" { /* pass escapes to the json parser */ jv escapes = jv_string_fmt("\"%.*s\"", yyleng, yytext); @@ -1031,45 +1053,45 @@ YY_RULE_SETUP return QQSTRING_TEXT; } YY_BREAK -case 30: -/* rule 30 can match eol */ +case 31: +/* rule 31 can match eol */ YY_RULE_SETUP -#line 94 "lexer.l" +#line 95 "lexer.l" { yylval->literal = jv_string_sized(yytext, yyleng); return QQSTRING_TEXT; } YY_BREAK -case 31: +case 32: YY_RULE_SETUP -#line 98 "lexer.l" +#line 99 "lexer.l" { return INVALID_CHARACTER; } YY_BREAK -case 32: +case 33: YY_RULE_SETUP -#line 104 "lexer.l" +#line 105 "lexer.l" { yylval->literal = jv_string(yytext); return IDENT;} YY_BREAK -case 33: -/* rule 33 can match eol */ -YY_RULE_SETUP -#line 106 "lexer.l" -{} - YY_BREAK case 34: +/* rule 34 can match eol */ YY_RULE_SETUP -#line 108 "lexer.l" -{ return INVALID_CHARACTER; } +#line 107 "lexer.l" +{} YY_BREAK case 35: YY_RULE_SETUP -#line 110 "lexer.l" +#line 109 "lexer.l" +{ return INVALID_CHARACTER; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 111 "lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1073 "lexer.gen.c" +#line 1095 "lexer.gen.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(IN_PAREN): case YY_STATE_EOF(IN_BRACKET): @@ -1261,21 +1283,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1306,7 +1328,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); + yyg->yy_n_chars, (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -1368,7 +1390,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 88 ) + if ( yy_current_state >= 96 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1397,13 +1419,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 88 ) + if ( yy_current_state >= 96 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 87); + yy_is_jam = (yy_current_state == 95); - (void)yyg; return yy_is_jam ? 0 : yy_current_state; } @@ -1432,7 +1453,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -1596,6 +1617,10 @@ static void jq_yy_load_buffer_state (yyscan_t yyscanner) jq_yyfree((void *) b ,yyscanner ); } +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a jq_yyrestart() or at EOF. @@ -1712,7 +1737,7 @@ void jq_yypop_buffer_state (yyscan_t yyscanner) */ static void jq_yyensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; + int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -1810,7 +1835,7 @@ YY_BUFFER_STATE jq_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE jq_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE jq_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; @@ -1965,7 +1990,7 @@ FILE *jq_yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t jq_yyget_leng (yyscan_t yyscanner) +int jq_yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -2001,7 +2026,7 @@ void jq_yyset_lineno (int line_number , yyscan_t yyscanner) /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "jq_yyset_lineno called with no buffer" ); + yy_fatal_error( "jq_yyset_lineno called with no buffer" , yyscanner); yylineno = line_number; } @@ -2016,7 +2041,7 @@ void jq_yyset_column (int column_no , yyscan_t yyscanner) /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "jq_yyset_column called with no buffer" ); + yy_fatal_error( "jq_yyset_column called with no buffer" , yyscanner); yycolumn = column_no; } @@ -2252,7 +2277,7 @@ void jq_yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 110 "lexer.l" +#line 111 "lexer.l" /* perhaps these should be calls... */ diff --git a/lexer.gen.h b/lexer.gen.h index e22ddb29..9249586d 100644 --- a/lexer.gen.h +++ b/lexer.gen.h @@ -13,7 +13,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -132,7 +132,15 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE @@ -162,7 +170,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -206,7 +214,7 @@ void jq_yypop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE jq_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE jq_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE jq_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); +YY_BUFFER_STATE jq_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *jq_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *jq_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -214,7 +222,7 @@ void jq_yyfree (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define jq_yywrap(yyscanner) 1 +#define jq_yywrap(n) 1 #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -264,7 +272,7 @@ FILE *jq_yyget_out (yyscan_t yyscanner ); void jq_yyset_out (FILE * out_str ,yyscan_t yyscanner ); -yy_size_t jq_yyget_leng (yyscan_t yyscanner ); +int jq_yyget_leng (yyscan_t yyscanner ); char *jq_yyget_text (yyscan_t yyscanner ); @@ -272,10 +280,6 @@ int jq_yyget_lineno (yyscan_t yyscanner ); void jq_yyset_lineno (int line_number ,yyscan_t yyscanner ); -int jq_yyget_column (yyscan_t yyscanner ); - -void jq_yyset_column (int column_no ,yyscan_t yyscanner ); - YYSTYPE * jq_yyget_lval (yyscan_t yyscanner ); void jq_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); @@ -310,7 +314,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Number of entries by which start-condition stack grows. */ @@ -345,9 +354,9 @@ extern int jq_yylex \ #undef YY_DECL #endif -#line 110 "lexer.l" +#line 111 "lexer.l" -#line 352 "lexer.gen.h" +#line 361 "lexer.gen.h" #undef jq_yyIN_HEADER #endif /* jq_yyHEADER_H */ diff --git a/lexer.l b/lexer.l index e0bb2b7b..368d4989 100644 --- a/lexer.l +++ b/lexer.l @@ -56,6 +56,7 @@ struct lexer_param; "//=" { return SETDEFINEDOR; } "<=" { return LESSEQ; } ">=" { return GREATEREQ; } +"contains" { return CONTAINS; } "."|"="|";"|","|":"|"|"|"+"|"-"|"*"|"/"|"\$"|"<"|">" { return yytext[0];} "["|"{"|"(" { diff --git a/parser.gen.c b/parser.gen.c index 32a2a205..3c157f48 100644 --- a/parser.gen.c +++ b/parser.gen.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.6.2. */ +/* A Bison parser, made by GNU Bison 2.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.6.2" +#define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,11 +58,14 @@ /* Pull parsers. */ #define YYPULL 1 +/* Using locations. */ +#define YYLSP_NEEDED 1 /* Copy the first part of user declarations. */ -/* Line 336 of yacc.c */ + +/* Line 268 of yacc.c */ #line 1 "parser.y" #include @@ -72,16 +75,14 @@ struct lexer_param; -/* Line 336 of yacc.c */ -#line 77 "parser.gen.c" -# ifndef YY_NULL -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr -# else -# define YY_NULL 0 -# endif -# endif +/* Line 268 of yacc.c */ +#line 81 "parser.gen.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -91,19 +92,14 @@ struct lexer_param; # define YYERROR_VERBOSE 1 #endif -/* In a future release of Bison, this section will be replaced - by #include "parser.gen.h". */ -#ifndef YY_PARSER_GEN_H -# define YY_PARSER_GEN_H -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 #endif + /* "%code requires" blocks. */ -/* Line 350 of yacc.c */ + +/* Line 288 of yacc.c */ #line 9 "parser.y" #include "locfile.h" @@ -120,8 +116,9 @@ extern int yydebug; } while (0) -/* Line 350 of yacc.c */ -#line 125 "parser.gen.c" + +/* Line 288 of yacc.c */ +#line 122 "parser.gen.c" /* Tokens. */ #ifndef YYTOKENTYPE @@ -152,27 +149,31 @@ extern int yydebug; SETDEFINEDOR = 278, LESSEQ = 279, GREATEREQ = 280, - QQSTRING_START = 281, - QQSTRING_TEXT = 282, - QQSTRING_INTERP_START = 283, - QQSTRING_INTERP_END = 284, - QQSTRING_END = 285 + CONTAINS = 281, + QQSTRING_START = 282, + QQSTRING_TEXT = 283, + QQSTRING_INTERP_START = 284, + QQSTRING_INTERP_END = 285, + QQSTRING_END = 286 }; #endif + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { -/* Line 350 of yacc.c */ + +/* Line 293 of yacc.c */ #line 27 "parser.y" jv literal; block blk; -/* Line 350 of yacc.c */ -#line 176 "parser.gen.c" + +/* Line 293 of yacc.c */ +#line 177 "parser.gen.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -193,25 +194,10 @@ typedef struct YYLTYPE #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (block* answer, int* errors, struct locfile* locations, struct lexer_param* lexer_param_ptr); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - -#endif /* !YY_PARSER_GEN_H */ - /* Copy the second part of user declarations. */ -/* Line 353 of yacc.c */ -#line 89 "parser.y" + +/* Line 343 of yacc.c */ +#line 90 "parser.y" #include "lexer.gen.h" struct lexer_param { @@ -278,6 +264,7 @@ static block gen_binop(block a, block b, int op) { case '>': funcname = "_greater"; break; case LESSEQ: funcname = "_lesseq"; break; case GREATEREQ: funcname = "_greatereq"; break; + case CONTAINS: funcname = "_contains"; break; } assert(funcname); @@ -303,8 +290,9 @@ static block gen_update(block a, block op, int optype) { } -/* Line 353 of yacc.c */ -#line 308 "parser.gen.c" + +/* Line 343 of yacc.c */ +#line 296 "parser.gen.c" #ifdef short # undef short @@ -410,7 +398,6 @@ YYID (yyi) # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -504,20 +491,20 @@ union yyalloc #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do +/* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ while (YYID (0)) # endif # endif @@ -526,20 +513,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 35 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 831 +#define YYLAST 854 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 50 +#define YYNTOKENS 51 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 12 /* YYNRULES -- Number of rules. */ -#define YYNRULES 69 +#define YYNRULES 70 /* YYNRULES -- Number of states. */ -#define YYNSTATES 149 +#define YYNSTATES 151 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 285 +#define YYMAXUTOK 286 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -550,16 +537,16 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 41, 2, 2, 2, - 43, 44, 39, 37, 33, 38, 45, 40, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 42, 31, - 35, 34, 36, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 42, 2, 2, 2, + 44, 45, 40, 38, 34, 39, 46, 41, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 43, 32, + 36, 35, 37, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 46, 2, 47, 2, 2, 2, 2, 2, 2, + 2, 47, 2, 48, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 48, 32, 49, 2, 2, 2, 2, + 2, 2, 2, 49, 33, 50, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -575,7 +562,7 @@ static const yytype_uint8 yytranslate[] = 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30 + 25, 26, 27, 28, 29, 30, 31 }; #if YYDEBUG @@ -586,58 +573,60 @@ static const yytype_uint16 yyprhs[] = 0, 0, 3, 5, 7, 8, 11, 14, 21, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, - 111, 115, 119, 121, 123, 127, 133, 142, 143, 146, - 151, 157, 161, 165, 167, 169, 173, 176, 181, 185, - 187, 191, 195, 198, 202, 205, 207, 212, 216, 220, - 225, 229, 230, 232, 236, 240, 244, 248, 250, 256 + 111, 115, 119, 123, 125, 127, 131, 137, 146, 147, + 150, 155, 161, 165, 169, 171, 173, 177, 180, 185, + 189, 191, 195, 199, 202, 206, 209, 211, 216, 220, + 224, 229, 233, 234, 236, 240, 244, 248, 252, 254, + 260 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 51, 0, -1, 53, -1, 52, -1, -1, 55, 52, - -1, 55, 53, -1, 59, 9, 41, 4, 32, 53, - -1, 11, 53, 12, 53, 57, -1, 11, 53, 1, - -1, 53, 34, 53, -1, 53, 17, 53, -1, 53, - 16, 53, -1, 53, 8, 53, -1, 53, 23, 53, - -1, 53, 18, 53, -1, 53, 32, 53, -1, 53, - 33, 53, -1, 53, 37, 53, -1, 53, 19, 53, - -1, 53, 38, 53, -1, 53, 20, 53, -1, 53, - 39, 53, -1, 53, 21, 53, -1, 53, 40, 53, - -1, 53, 22, 53, -1, 53, 6, 53, -1, 53, - 7, 53, -1, 53, 35, 53, -1, 53, 36, 53, - -1, 53, 24, 53, -1, 53, 25, 53, -1, 54, - -1, 59, -1, 26, 56, 30, -1, 10, 4, 42, - 53, 31, -1, 10, 4, 43, 4, 44, 42, 53, - 31, -1, -1, 56, 27, -1, 56, 28, 53, 29, - -1, 14, 53, 12, 53, 57, -1, 13, 53, 15, - -1, 58, 32, 58, -1, 59, -1, 45, -1, 59, - 45, 4, -1, 45, 4, -1, 59, 46, 53, 47, - -1, 59, 46, 47, -1, 5, -1, 43, 53, 44, - -1, 46, 53, 47, -1, 46, 47, -1, 48, 60, - 49, -1, 41, 4, -1, 4, -1, 4, 43, 53, - 44, -1, 43, 1, 44, -1, 46, 1, 47, -1, - 59, 46, 1, 47, -1, 48, 1, 49, -1, -1, - 61, -1, 61, 33, 60, -1, 1, 33, 60, -1, - 4, 42, 58, -1, 54, 42, 58, -1, 4, -1, - 43, 53, 44, 42, 58, -1, 43, 1, 44, 42, - 58, -1 + 52, 0, -1, 54, -1, 53, -1, -1, 56, 53, + -1, 56, 54, -1, 60, 9, 42, 4, 33, 54, + -1, 11, 54, 12, 54, 58, -1, 11, 54, 1, + -1, 54, 35, 54, -1, 54, 17, 54, -1, 54, + 16, 54, -1, 54, 8, 54, -1, 54, 23, 54, + -1, 54, 18, 54, -1, 54, 33, 54, -1, 54, + 34, 54, -1, 54, 38, 54, -1, 54, 19, 54, + -1, 54, 39, 54, -1, 54, 20, 54, -1, 54, + 40, 54, -1, 54, 21, 54, -1, 54, 41, 54, + -1, 54, 22, 54, -1, 54, 6, 54, -1, 54, + 7, 54, -1, 54, 36, 54, -1, 54, 37, 54, + -1, 54, 24, 54, -1, 54, 25, 54, -1, 54, + 26, 54, -1, 55, -1, 60, -1, 27, 57, 31, + -1, 10, 4, 43, 54, 32, -1, 10, 4, 44, + 4, 45, 43, 54, 32, -1, -1, 57, 28, -1, + 57, 29, 54, 30, -1, 14, 54, 12, 54, 58, + -1, 13, 54, 15, -1, 59, 33, 59, -1, 60, + -1, 46, -1, 60, 46, 4, -1, 46, 4, -1, + 60, 47, 54, 48, -1, 60, 47, 48, -1, 5, + -1, 44, 54, 45, -1, 47, 54, 48, -1, 47, + 48, -1, 49, 61, 50, -1, 42, 4, -1, 4, + -1, 4, 44, 54, 45, -1, 44, 1, 45, -1, + 47, 1, 48, -1, 60, 47, 1, 48, -1, 49, + 1, 50, -1, -1, 62, -1, 62, 34, 61, -1, + 1, 34, 61, -1, 4, 43, 59, -1, 55, 43, + 59, -1, 4, -1, 44, 54, 45, 43, 59, -1, + 44, 1, 45, 43, 59, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 183, 183, 186, 191, 194, 199, 203, 210, 213, - 218, 227, 231, 235, 239, 243, 247, 251, 255, 259, - 263, 267, 271, 275, 279, 283, 287, 291, 295, 299, - 303, 307, 311, 315, 320, 325, 331, 339, 342, 345, - 351, 354, 359, 363, 369, 372, 375, 379, 382, 385, - 388, 391, 394, 397, 402, 406, 410, 420, 421, 422, - 423, 426, 429, 430, 431, 434, 437, 440, 444, 447 + 0, 185, 185, 188, 193, 196, 201, 205, 212, 215, + 220, 229, 233, 237, 241, 245, 249, 253, 257, 261, + 265, 269, 273, 277, 281, 285, 289, 293, 297, 301, + 305, 309, 313, 317, 321, 326, 331, 337, 345, 348, + 351, 357, 360, 365, 369, 375, 378, 381, 385, 388, + 391, 394, 397, 400, 403, 408, 412, 416, 426, 427, + 428, 429, 432, 435, 436, 437, 440, 443, 446, 450, + 453 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 1 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -646,12 +635,12 @@ static const char *const yytname[] = "\"==\"", "\"!=\"", "\"//\"", "\"as\"", "\"def\"", "\"if\"", "\"then\"", "\"else\"", "\"elif\"", "\"end\"", "\"and\"", "\"or\"", "\"|=\"", "\"+=\"", "\"-=\"", "\"*=\"", "\"/=\"", "\"//=\"", "\"<=\"", "\">=\"", - "QQSTRING_START", "QQSTRING_TEXT", "QQSTRING_INTERP_START", - "QQSTRING_INTERP_END", "QQSTRING_END", "';'", "'|'", "','", "'='", "'<'", - "'>'", "'+'", "'-'", "'*'", "'/'", "'$'", "':'", "'('", "')'", "'.'", - "'['", "']'", "'{'", "'}'", "$accept", "TopLevel", "FuncDefs", "Exp", - "String", "FuncDef", "QQString", "ElseBody", "ExpD", "Term", "MkDict", - "MkDictPair", YY_NULL + "\"contains\"", "QQSTRING_START", "QQSTRING_TEXT", + "QQSTRING_INTERP_START", "QQSTRING_INTERP_END", "QQSTRING_END", "';'", + "'|'", "','", "'='", "'<'", "'>'", "'+'", "'-'", "'*'", "'/'", "'$'", + "':'", "'('", "')'", "'.'", "'['", "']'", "'{'", "'}'", "$accept", + "TopLevel", "FuncDefs", "Exp", "String", "FuncDef", "QQString", + "ElseBody", "ExpD", "Term", "MkDict", "MkDictPair", 0 }; #endif @@ -663,21 +652,23 @@ static const yytype_uint16 yytoknum[] = 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 59, 124, 44, 61, 60, 62, 43, 45, 42, - 47, 36, 58, 40, 41, 46, 91, 93, 123, 125 + 285, 286, 59, 124, 44, 61, 60, 62, 43, 45, + 42, 47, 36, 58, 40, 41, 46, 91, 93, 123, + 125 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 50, 51, 51, 52, 52, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 54, 55, 55, 56, 56, 56, - 57, 57, 58, 58, 59, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, - 59, 60, 60, 60, 60, 61, 61, 61, 61, 61 + 0, 51, 52, 52, 53, 53, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 55, 56, 56, 57, 57, + 57, 58, 58, 59, 59, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, + 62 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -686,10 +677,11 @@ static const yytype_uint8 yyr2[] = 0, 2, 1, 1, 0, 2, 2, 6, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 3, 5, 8, 0, 2, 4, - 5, 3, 3, 1, 1, 3, 2, 4, 3, 1, - 3, 3, 2, 3, 2, 1, 4, 3, 3, 4, - 3, 0, 1, 3, 3, 3, 3, 1, 5, 5 + 3, 3, 3, 1, 1, 3, 5, 8, 0, 2, + 4, 5, 3, 3, 1, 1, 3, 2, 4, 3, + 1, 3, 3, 2, 3, 2, 1, 4, 3, 3, + 4, 3, 0, 1, 3, 3, 3, 3, 1, 5, + 5 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. @@ -697,264 +689,271 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 4, 55, 49, 0, 0, 37, 0, 0, 44, 0, - 0, 0, 3, 2, 32, 4, 33, 0, 0, 0, - 0, 0, 54, 0, 0, 46, 0, 52, 0, 0, - 67, 0, 0, 0, 62, 1, 0, 0, 0, 0, + 4, 56, 50, 0, 0, 38, 0, 0, 45, 0, + 0, 0, 3, 2, 33, 4, 34, 0, 0, 0, + 0, 0, 55, 0, 0, 47, 0, 53, 0, 0, + 68, 0, 0, 0, 63, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, - 0, 0, 0, 0, 0, 0, 9, 0, 38, 0, - 34, 57, 50, 58, 51, 0, 60, 0, 0, 0, - 0, 53, 0, 26, 27, 13, 12, 11, 15, 19, - 21, 23, 25, 14, 30, 31, 16, 17, 10, 28, - 29, 18, 20, 22, 24, 0, 45, 0, 48, 0, - 56, 0, 0, 0, 0, 0, 64, 65, 43, 0, - 0, 66, 63, 0, 59, 47, 35, 0, 0, 0, - 8, 39, 0, 0, 0, 0, 0, 0, 0, 42, - 69, 68, 7, 0, 41, 0, 36, 0, 40 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 6, 0, 0, 0, 0, 0, 0, 9, 0, 39, + 0, 35, 58, 51, 59, 52, 0, 61, 0, 0, + 0, 0, 54, 0, 26, 27, 13, 12, 11, 15, + 19, 21, 23, 25, 14, 30, 31, 32, 16, 17, + 10, 28, 29, 18, 20, 22, 24, 0, 46, 0, + 49, 0, 57, 0, 0, 0, 0, 0, 65, 66, + 44, 0, 0, 67, 64, 0, 60, 48, 36, 0, + 0, 0, 8, 40, 0, 0, 0, 0, 0, 0, + 0, 43, 70, 69, 7, 0, 42, 0, 37, 0, + 41 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 11, 12, 59, 14, 20, 21, 130, 117, 16, + -1, 11, 12, 60, 14, 20, 21, 132, 119, 16, 33, 34 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -75 +#define YYPACT_NINF -76 static const yytype_int16 yypact[] = { - 175, -41, -75, 10, 175, -75, 16, 129, 18, 78, - 64, 28, -75, 645, -75, 175, 52, 175, -27, 295, - 175, -17, -75, -14, 330, -75, -18, -75, 218, -28, - -10, 152, -8, -16, 2, -75, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 175, -75, 645, - 22, 71, 101, 365, 175, 72, -75, 175, -75, 175, - -75, -75, -75, -75, -75, 73, -75, 146, 34, 400, - 146, -75, 73, 785, 785, 715, 791, 765, 740, 740, - 740, 740, 740, 740, 785, 785, 680, 715, 740, 785, - 785, -15, -15, -75, -75, 76, -75, 37, -75, 253, - -75, 470, 41, 435, 505, 48, -75, 54, -19, 45, - 49, 54, -75, 60, -75, -75, -75, 51, 175, 175, - -75, -75, 146, 146, 146, 175, 175, 540, 575, -75, - 54, 54, 680, 610, -75, 175, -75, 435, -75 + 179, -42, -76, 10, 179, -76, 16, 131, 18, 79, + 65, 28, -76, 662, -76, 179, 53, 179, -28, 302, + 179, -18, -76, -15, 338, -76, -19, -76, 223, -29, + -11, 155, -10, 14, 1, -76, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, -76, + 662, -8, 72, 106, 374, 179, 73, -76, 179, -76, + 179, -76, -76, -76, -76, -76, 74, -76, 163, 34, + 410, 163, -76, 74, 807, 807, 734, 813, 786, 760, + 760, 760, 760, 760, 760, 807, 807, 807, 698, 734, + 760, 807, 807, -16, -16, -76, -76, 77, -76, 37, + -76, 259, -76, 482, 41, 446, 518, 48, -76, 54, + -20, 45, 50, 54, -76, 58, -76, -76, -76, 51, + 179, 179, -76, -76, 163, 163, 163, 179, 179, 554, + 590, -76, 54, 54, 698, 626, -76, 179, -76, 446, + -76 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -75, -75, 79, 0, -9, 8, -75, -52, -62, -74, - -63, -75 + -76, -76, 80, 0, -9, 8, -76, -53, -63, -75, + -64, -76 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -62 +#define YYTABLE_NINF -63 static const yytype_int16 yytable[] = { - 13, 32, 17, 118, 19, 75, 118, 24, 15, 28, - 68, 69, 116, 70, 18, 64, 65, 63, 121, 122, - 22, 76, 25, 15, 56, 57, 61, 62, 35, 73, - 71, 79, 77, 81, 80, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 118, 118, - 118, 60, 109, 105, 111, 29, 32, 113, 30, 114, - 139, 140, 141, 32, 115, 106, 112, 30, 119, 26, - 123, 75, 1, 2, 124, 127, 132, 133, 3, 4, - 5, 134, 135, 136, 58, 148, 0, 61, 62, 5, - 0, 0, 107, 0, 5, 1, 2, 31, 0, 0, - 0, 3, 4, -61, 0, 0, 31, 0, 0, 6, - 0, 7, -61, 8, 9, 27, 10, 5, 137, 138, - 23, 0, 0, 1, 2, 142, 143, 0, 0, 3, - 4, 0, 6, 0, 7, 147, 8, 9, 108, 10, - 1, 2, 0, 78, 0, 5, 1, 2, 0, 0, - 0, 0, 3, 4, 0, 0, 0, 0, 0, 0, - 6, 0, 7, 0, 8, 9, 0, 10, 5, 1, - 2, 0, 0, 0, 0, 3, 4, 6, 0, 7, - 0, 8, 9, 6, 10, 7, 0, 8, 9, 0, - 10, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 6, 0, 7, 0, - 8, 9, 0, 10, 36, 37, 38, 0, 0, 0, + 13, 32, 17, 120, 19, 76, 120, 24, 15, 28, + 69, 70, 118, 71, 18, 65, 66, 64, 123, 124, + 22, 77, 25, 15, 57, 58, 62, 63, 35, 74, + 72, 80, 78, 81, 107, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 120, + 120, 120, 61, 111, 82, 113, 29, 32, 115, 30, + 116, 141, 142, 143, 32, 117, 108, 114, 30, 121, + 26, 125, 76, 1, 2, 126, 129, 134, 135, 3, + 4, 137, 5, 136, 138, 59, 150, 0, 0, 62, + 63, 5, 0, 0, 0, 0, 5, 109, 0, 31, + 1, 2, 0, 0, 0, -62, 3, 4, 31, 0, + 0, 6, 0, 7, -62, 8, 9, 27, 10, 0, + 139, 140, 23, 5, 0, 1, 2, 144, 145, 0, + 0, 3, 4, 0, 0, 0, 0, 149, 6, 0, + 7, 0, 8, 9, 110, 10, 79, 0, 5, 1, + 2, 0, 0, 0, 0, 3, 4, 1, 2, 0, + 0, 0, 0, 6, 0, 7, 0, 8, 9, 0, + 10, 0, 5, 1, 2, 0, 0, 0, 0, 3, + 4, 0, 0, 0, 0, 0, 0, 6, 0, 7, + 0, 8, 9, 0, 10, 6, 5, 7, 0, 8, + 9, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 0, 7, 0, 8, 9, 0, 10, 36, + 37, 38, 0, 0, 0, 0, 0, 0, 0, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 0, 0, 0, 0, 0, 0, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 36, 37, 38, 0, 0, + 0, 75, 0, 0, 0, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 0, 0, 0, 0, + 0, 0, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 0, 0, 67, 0, 0, 0, 127, 36, 37, + 38, 0, 0, 0, 68, 0, 0, 0, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 0, + 0, 0, 0, 0, 0, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 36, 37, 38, 0, 0, 0, 0, 0, 0, 0, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 0, 0, 0, 0, 0, 0, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 36, - 37, 38, 0, 0, 0, 74, 0, 0, 0, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, - 0, 0, 0, 0, 0, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 0, 0, 66, 0, 0, 0, - 125, 36, 37, 38, 0, 0, 0, 67, 0, 0, - 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 0, 0, 0, 0, 0, 0, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 36, 37, 38, 0, + 45, 46, 47, 48, 49, 0, 0, 0, 0, 0, + 0, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 36, 37, 38, 73, 0, 0, 0, 0, 0, 0, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 0, 0, 0, 0, 0, 0, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 36, 37, 38, 112, 0, 0, 0, 0, 0, 0, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 0, 0, 0, 0, - 0, 0, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 36, 37, 38, 72, 0, 0, 0, 0, 0, - 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 0, 0, 0, 0, 0, 0, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 36, 37, 38, 110, - 0, 0, 0, 0, 0, 0, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 0, 0, 0, 0, - 0, 0, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 36, 37, 38, 120, 0, 0, 0, 128, 129, - 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 0, 0, 0, 0, 0, 0, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 36, 37, 38, 0, - 0, 0, 0, 0, 0, 0, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 0, 0, 0, 0, - 0, 126, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 36, 37, 38, 0, 0, 0, 0, 0, 0, - 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 0, 0, 0, 131, 0, 0, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 36, 37, 38, 0, - 0, 0, 0, 0, 0, 144, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 0, 0, 0, 0, - 0, 0, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 36, 37, 38, 0, 0, 0, 145, 0, 0, - 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 0, 0, 0, 0, 0, 0, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 36, 37, 38, 0, - 0, 0, 0, 0, 0, 0, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 0, 0, 0, 0, - 0, 146, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 36, 37, 38, 0, 0, 0, 0, 0, 0, - 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 0, 0, 0, 0, 0, 0, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 36, 37, 38, 0, - 0, 0, 0, 0, 0, 0, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 0, 0, 0, 0, + 43, 44, 45, 46, 47, 48, 49, 0, 0, 0, 0, 0, 0, 50, 51, 52, 53, 54, 55, 56, - 57, 36, 37, 38, 0, 0, 0, 0, 0, 0, - 0, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 0, 0, 0, 0, 0, 36, 37, 0, 51, - 52, 53, 54, 55, 56, 57, 39, 40, -62, -62, - -62, -62, -62, -62, 47, 48, 0, 0, 0, 0, - 0, 36, 37, 0, -62, 52, 53, 54, 55, 56, - 57, 39, 0, 0, 0, 0, 0, 0, 0, 47, - 48, -62, -62, 0, 0, 0, 0, 36, 37, 0, - 52, 53, 54, 55, 56, 57, 0, 0, 0, -62, - -62, 0, 0, 0, 0, 47, 48, 0, 0, 0, - -62, -62, 54, 55, 56, 57, 52, 53, 54, 55, - 56, 57 + 57, 58, 36, 37, 38, 122, 0, 0, 0, 130, + 131, 0, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 0, 0, 0, 0, 0, 0, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 36, 37, + 38, 0, 0, 0, 0, 0, 0, 0, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 0, + 0, 0, 0, 0, 128, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 36, 37, 38, 0, 0, 0, + 0, 0, 0, 0, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 0, 0, 0, 133, 0, + 0, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 36, 37, 38, 0, 0, 0, 0, 0, 0, 146, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 0, 0, 0, 0, 0, 0, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 36, 37, 38, 0, + 0, 0, 147, 0, 0, 0, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 0, 0, 0, + 0, 0, 0, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 36, 37, 38, 0, 0, 0, 0, 0, + 0, 0, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 0, 0, 0, 0, 0, 148, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 36, 37, + 38, 0, 0, 0, 0, 0, 0, 0, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 0, + 0, 0, 0, 0, 0, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 36, 37, 38, 0, 0, 0, + 0, 0, 0, 0, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 0, 0, 0, 0, 0, + 0, 0, 51, 52, 53, 54, 55, 56, 57, 58, + 36, 37, 38, 0, 0, 0, 0, 0, 0, 0, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 0, 0, 0, 0, 0, 36, 37, 0, 52, + 53, 54, 55, 56, 57, 58, 39, 40, -63, -63, + -63, -63, -63, -63, 47, 48, 49, 0, 0, 0, + 0, 0, 36, 37, 0, -63, 53, 54, 55, 56, + 57, 58, 39, 0, 0, 0, 0, 0, 0, 0, + 47, 48, 49, -63, -63, 0, 0, 0, 0, 36, + 37, 0, 53, 54, 55, 56, 57, 58, 0, 0, + 0, -63, -63, -63, 0, 0, 0, 47, 48, 49, + 0, 0, 0, -63, -63, 55, 56, 57, 58, 53, + 54, 55, 56, 57, 58 }; #define yypact_value_is_default(yystate) \ - ((yystate) == (-75)) + ((yystate) == (-76)) #define yytable_value_is_error(yytable_value) \ - ((yytable_value) == (-62)) + ((yytable_value) == (-63)) static const yytype_int16 yycheck[] = { - 0, 10, 43, 77, 4, 33, 80, 7, 0, 9, - 27, 28, 75, 30, 4, 42, 43, 17, 80, 82, - 4, 49, 4, 15, 39, 40, 45, 46, 0, 47, - 44, 31, 42, 49, 42, 33, 36, 37, 38, 39, + 0, 10, 44, 78, 4, 34, 81, 7, 0, 9, + 28, 29, 76, 31, 4, 43, 44, 17, 81, 83, + 4, 50, 4, 15, 40, 41, 46, 47, 0, 48, + 45, 31, 43, 43, 42, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 132, 133, - 134, 9, 62, 41, 64, 1, 75, 67, 4, 69, - 132, 133, 134, 82, 1, 4, 4, 4, 44, 1, - 4, 33, 4, 5, 47, 44, 32, 42, 10, 11, - 26, 42, 32, 42, 15, 147, -1, 45, 46, 26, - -1, -1, 1, -1, 26, 4, 5, 43, -1, -1, - -1, 10, 11, 49, -1, -1, 43, -1, -1, 41, - -1, 43, 49, 45, 46, 47, 48, 26, 128, 129, - 1, -1, -1, 4, 5, 135, 136, -1, -1, 10, - 11, -1, 41, -1, 43, 145, 45, 46, 47, 48, - 4, 5, -1, 1, -1, 26, 4, 5, -1, -1, - -1, -1, 10, 11, -1, -1, -1, -1, -1, -1, - 41, -1, 43, -1, 45, 46, -1, 48, 26, 4, - 5, -1, -1, -1, -1, 10, 11, 41, -1, 43, - -1, 45, 46, 41, 48, 43, -1, 45, 46, -1, - 48, 26, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 41, -1, 43, -1, - 45, 46, -1, 48, 6, 7, 8, -1, -1, -1, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 134, + 135, 136, 9, 63, 50, 65, 1, 76, 68, 4, + 70, 134, 135, 136, 83, 1, 4, 4, 4, 45, + 1, 4, 34, 4, 5, 48, 45, 33, 43, 10, + 11, 33, 27, 43, 43, 15, 149, -1, -1, 46, + 47, 27, -1, -1, -1, -1, 27, 1, -1, 44, + 4, 5, -1, -1, -1, 50, 10, 11, 44, -1, + -1, 42, -1, 44, 50, 46, 47, 48, 49, -1, + 130, 131, 1, 27, -1, 4, 5, 137, 138, -1, + -1, 10, 11, -1, -1, -1, -1, 147, 42, -1, + 44, -1, 46, 47, 48, 49, 1, -1, 27, 4, + 5, -1, -1, -1, -1, 10, 11, 4, 5, -1, + -1, -1, -1, 42, -1, 44, -1, 46, 47, -1, + 49, -1, 27, 4, 5, -1, -1, -1, -1, 10, + 11, -1, -1, -1, -1, -1, -1, 42, -1, 44, + -1, 46, 47, -1, 49, 42, 27, 44, -1, 46, + 47, -1, 49, -1, -1, -1, -1, -1, -1, -1, + -1, 42, -1, 44, -1, 46, 47, -1, 49, 6, + 7, 8, -1, -1, -1, -1, -1, -1, -1, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + -1, -1, -1, -1, -1, -1, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 6, 7, 8, -1, -1, + -1, 48, -1, -1, -1, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, -1, -1, -1, -1, + -1, -1, 33, 34, 35, 36, 37, 38, 39, 40, + 41, -1, -1, 1, -1, -1, -1, 48, 6, 7, + 8, -1, -1, -1, 12, -1, -1, -1, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 6, - 7, 8, -1, -1, -1, 47, -1, -1, -1, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, - -1, -1, -1, -1, -1, 32, 33, 34, 35, 36, - 37, 38, 39, 40, -1, -1, 1, -1, -1, -1, - 47, 6, 7, 8, -1, -1, -1, 12, -1, -1, - -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, -1, -1, -1, -1, -1, -1, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 6, 7, 8, -1, + 22, 23, 24, 25, 26, -1, -1, -1, -1, -1, + -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 6, 7, 8, 45, -1, -1, -1, -1, -1, -1, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, -1, -1, -1, -1, -1, -1, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 6, 7, 8, 45, -1, -1, -1, -1, -1, -1, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, - -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 6, 7, 8, 44, -1, -1, -1, -1, -1, - -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, -1, -1, -1, -1, -1, -1, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 6, 7, 8, 44, - -1, -1, -1, -1, -1, -1, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, - -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 6, 7, 8, 44, -1, -1, -1, 13, 14, - -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, -1, -1, -1, -1, -1, -1, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 6, 7, 8, -1, - -1, -1, -1, -1, -1, -1, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, - -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 6, 7, 8, -1, -1, -1, -1, -1, -1, - -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, -1, -1, -1, 29, -1, -1, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 6, 7, 8, -1, - -1, -1, -1, -1, -1, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, - -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 6, 7, 8, -1, -1, -1, 12, -1, -1, - -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, -1, -1, -1, -1, -1, -1, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 6, 7, 8, -1, - -1, -1, -1, -1, -1, -1, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, - -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 6, 7, 8, -1, -1, -1, -1, -1, -1, - -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, -1, -1, -1, -1, -1, -1, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 6, 7, 8, -1, - -1, -1, -1, -1, -1, -1, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, + 20, 21, 22, 23, 24, 25, 26, -1, -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, - 40, 6, 7, 8, -1, -1, -1, -1, -1, -1, - -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, -1, -1, -1, -1, -1, 6, 7, -1, 34, - 35, 36, 37, 38, 39, 40, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, - -1, 6, 7, -1, 34, 35, 36, 37, 38, 39, - 40, 16, -1, -1, -1, -1, -1, -1, -1, 24, - 25, 6, 7, -1, -1, -1, -1, 6, 7, -1, - 35, 36, 37, 38, 39, 40, -1, -1, -1, 24, - 25, -1, -1, -1, -1, 24, 25, -1, -1, -1, - 35, 36, 37, 38, 39, 40, 35, 36, 37, 38, - 39, 40 + 40, 41, 6, 7, 8, 45, -1, -1, -1, 13, + 14, -1, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, -1, -1, -1, -1, -1, -1, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, -1, -1, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 6, 7, 8, -1, -1, -1, + -1, -1, -1, -1, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, -1, -1, -1, 30, -1, + -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 6, 7, 8, -1, -1, -1, -1, -1, -1, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, -1, -1, -1, -1, -1, -1, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 6, 7, 8, -1, + -1, -1, 12, -1, -1, -1, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, -1, -1, -1, + -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 6, 7, 8, -1, -1, -1, -1, -1, + -1, -1, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, -1, -1, -1, -1, -1, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, + -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 6, 7, 8, -1, -1, -1, + -1, -1, -1, -1, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, -1, -1, -1, -1, -1, + -1, -1, 34, 35, 36, 37, 38, 39, 40, 41, + 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, -1, -1, -1, -1, -1, 6, 7, -1, 35, + 36, 37, 38, 39, 40, 41, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, -1, -1, -1, + -1, -1, 6, 7, -1, 35, 36, 37, 38, 39, + 40, 41, 16, -1, -1, -1, -1, -1, -1, -1, + 24, 25, 26, 6, 7, -1, -1, -1, -1, 6, + 7, -1, 36, 37, 38, 39, 40, 41, -1, -1, + -1, 24, 25, 26, -1, -1, -1, 24, 25, 26, + -1, -1, -1, 36, 37, 38, 39, 40, 41, 36, + 37, 38, 39, 40, 41 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 4, 5, 10, 11, 26, 41, 43, 45, 46, - 48, 51, 52, 53, 54, 55, 59, 43, 4, 53, - 55, 56, 4, 1, 53, 4, 1, 47, 53, 1, - 4, 43, 54, 60, 61, 0, 6, 7, 8, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 52, 53, - 9, 45, 46, 53, 42, 43, 1, 12, 27, 28, - 30, 44, 44, 47, 47, 33, 49, 42, 1, 53, - 42, 49, 33, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 41, 4, 1, 47, 53, - 44, 53, 4, 53, 53, 1, 60, 58, 59, 44, - 44, 58, 60, 4, 47, 47, 31, 44, 13, 14, - 57, 29, 32, 42, 42, 32, 42, 53, 53, 58, - 58, 58, 53, 53, 15, 12, 31, 53, 57 + 0, 4, 5, 10, 11, 27, 42, 44, 46, 47, + 49, 52, 53, 54, 55, 56, 60, 44, 4, 54, + 56, 57, 4, 1, 54, 4, 1, 48, 54, 1, + 4, 44, 55, 61, 62, 0, 6, 7, 8, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 53, + 54, 9, 46, 47, 54, 43, 44, 1, 12, 28, + 29, 31, 45, 45, 48, 48, 34, 50, 43, 1, + 54, 43, 50, 34, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 42, 4, 1, + 48, 54, 45, 54, 4, 54, 54, 1, 61, 59, + 60, 45, 45, 59, 61, 4, 48, 48, 32, 45, + 13, 14, 58, 30, 33, 43, 43, 33, 43, 54, + 54, 59, 59, 59, 54, 54, 15, 12, 32, 54, + 58 }; #define yyerrok (yyerrstatus = 0) @@ -984,18 +983,17 @@ static const yytype_uint8 yystos[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ yyerror (&yylloc, answer, errors, locations, lexer_param_ptr, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ @@ -1005,33 +1003,32 @@ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 + /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ while (YYID (0)) #endif -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) - - /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know @@ -1105,8 +1102,6 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, answer, errors, struct lexer_param* lexer_param_ptr; #endif { - FILE *yyo = yyoutput; - YYUSE (yyo); if (!yyvaluep) return; YYUSE (yylocationp); @@ -1375,12 +1370,12 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = 0; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1440,7 +1435,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + yysize1 = yysize + yytnamerr (0, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1535,96 +1530,122 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, answer, errors, locations, lex switch (yytype) { - case 4: /* IDENT */ -/* Line 1381 of yacc.c */ + case 4: /* "IDENT" */ + +/* Line 1391 of yacc.c */ #line 32 "parser.y" - { jv_free(((*yyvaluep).literal)); }; -/* Line 1381 of yacc.c */ -#line 1544 "parser.gen.c" + { jv_free((yyvaluep->literal)); }; + +/* Line 1391 of yacc.c */ +#line 1541 "parser.gen.c" break; - case 5: /* LITERAL */ -/* Line 1381 of yacc.c */ + case 5: /* "LITERAL" */ + +/* Line 1391 of yacc.c */ #line 32 "parser.y" - { jv_free(((*yyvaluep).literal)); }; -/* Line 1381 of yacc.c */ -#line 1551 "parser.gen.c" + { jv_free((yyvaluep->literal)); }; + +/* Line 1391 of yacc.c */ +#line 1550 "parser.gen.c" break; - case 27: /* QQSTRING_TEXT */ -/* Line 1381 of yacc.c */ + case 28: /* "QQSTRING_TEXT" */ + +/* Line 1391 of yacc.c */ #line 32 "parser.y" - { jv_free(((*yyvaluep).literal)); }; -/* Line 1381 of yacc.c */ -#line 1558 "parser.gen.c" + { jv_free((yyvaluep->literal)); }; + +/* Line 1391 of yacc.c */ +#line 1559 "parser.gen.c" break; - case 52: /* FuncDefs */ -/* Line 1381 of yacc.c */ + case 53: /* "FuncDefs" */ + +/* Line 1391 of yacc.c */ #line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ -#line 1565 "parser.gen.c" + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ +#line 1568 "parser.gen.c" break; - case 53: /* Exp */ -/* Line 1381 of yacc.c */ + case 54: /* "Exp" */ + +/* Line 1391 of yacc.c */ #line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ -#line 1572 "parser.gen.c" + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ +#line 1577 "parser.gen.c" break; - case 54: /* String */ -/* Line 1381 of yacc.c */ + case 55: /* "String" */ + +/* Line 1391 of yacc.c */ #line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ -#line 1579 "parser.gen.c" - break; - case 55: /* FuncDef */ -/* Line 1381 of yacc.c */ -#line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ #line 1586 "parser.gen.c" break; - case 56: /* QQString */ -/* Line 1381 of yacc.c */ + case 56: /* "FuncDef" */ + +/* Line 1391 of yacc.c */ #line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ -#line 1593 "parser.gen.c" + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ +#line 1595 "parser.gen.c" break; - case 57: /* ElseBody */ -/* Line 1381 of yacc.c */ + case 57: /* "QQString" */ + +/* Line 1391 of yacc.c */ #line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ -#line 1600 "parser.gen.c" + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ +#line 1604 "parser.gen.c" break; - case 58: /* ExpD */ -/* Line 1381 of yacc.c */ + case 58: /* "ElseBody" */ + +/* Line 1391 of yacc.c */ #line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ -#line 1607 "parser.gen.c" + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ +#line 1613 "parser.gen.c" break; - case 59: /* Term */ -/* Line 1381 of yacc.c */ + case 59: /* "ExpD" */ + +/* Line 1391 of yacc.c */ #line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ -#line 1614 "parser.gen.c" + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ +#line 1622 "parser.gen.c" break; - case 60: /* MkDict */ -/* Line 1381 of yacc.c */ + case 60: /* "Term" */ + +/* Line 1391 of yacc.c */ #line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ -#line 1621 "parser.gen.c" + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ +#line 1631 "parser.gen.c" break; - case 61: /* MkDictPair */ -/* Line 1381 of yacc.c */ + case 61: /* "MkDict" */ + +/* Line 1391 of yacc.c */ #line 33 "parser.y" - { block_free(((*yyvaluep).blk)); }; -/* Line 1381 of yacc.c */ -#line 1628 "parser.gen.c" + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ +#line 1640 "parser.gen.c" + break; + case 62: /* "MkDictPair" */ + +/* Line 1391 of yacc.c */ +#line 33 "parser.y" + { block_free((yyvaluep->blk)); }; + +/* Line 1391 of yacc.c */ +#line 1649 "parser.gen.c" break; default: @@ -1633,6 +1654,20 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, answer, errors, locations, lex } +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (block* answer, int* errors, struct locfile* locations, struct lexer_param* lexer_param_ptr); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ /*----------. @@ -1685,7 +1720,7 @@ YYLTYPE yylloc; `yyvs': related to semantic values. `yyls': related to locations. - Refer to the stacks through separate pointers, to allow yyoverflow + Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1756,6 +1791,7 @@ YYLTYPE yylloc; yylloc.first_line = yylloc.last_line = 1; yylloc.first_column = yylloc.last_column = 1; #endif + goto yysetstate; /*------------------------------------------------------------. @@ -1939,48 +1975,54 @@ yyreduce: switch (yyn) { case 2: -/* Line 1787 of yacc.c */ -#line 183 "parser.y" + +/* Line 1806 of yacc.c */ +#line 185 "parser.y" { *answer = (yyvsp[(1) - (1)].blk); } break; case 3: -/* Line 1787 of yacc.c */ -#line 186 "parser.y" + +/* Line 1806 of yacc.c */ +#line 188 "parser.y" { *answer = (yyvsp[(1) - (1)].blk); } break; case 4: -/* Line 1787 of yacc.c */ -#line 191 "parser.y" + +/* Line 1806 of yacc.c */ +#line 193 "parser.y" { (yyval.blk) = gen_noop(); } break; case 5: -/* Line 1787 of yacc.c */ -#line 194 "parser.y" + +/* Line 1806 of yacc.c */ +#line 196 "parser.y" { (yyval.blk) = block_join((yyvsp[(1) - (2)].blk), (yyvsp[(2) - (2)].blk)); } break; case 6: -/* Line 1787 of yacc.c */ -#line 199 "parser.y" + +/* Line 1806 of yacc.c */ +#line 201 "parser.y" { (yyval.blk) = block_bind((yyvsp[(1) - (2)].blk), (yyvsp[(2) - (2)].blk), OP_IS_CALL_PSEUDO); } break; case 7: -/* Line 1787 of yacc.c */ -#line 203 "parser.y" + +/* Line 1806 of yacc.c */ +#line 205 "parser.y" { (yyval.blk) = gen_op_simple(DUP); block_append(&(yyval.blk), (yyvsp[(1) - (6)].blk)); @@ -1990,16 +2032,18 @@ yyreduce: break; case 8: -/* Line 1787 of yacc.c */ -#line 210 "parser.y" + +/* Line 1806 of yacc.c */ +#line 212 "parser.y" { (yyval.blk) = gen_cond((yyvsp[(2) - (5)].blk), (yyvsp[(4) - (5)].blk), (yyvsp[(5) - (5)].blk)); } break; case 9: -/* Line 1787 of yacc.c */ -#line 213 "parser.y" + +/* Line 1806 of yacc.c */ +#line 215 "parser.y" { FAIL((yyloc), "Possibly unterminated 'if' statment"); (yyval.blk) = (yyvsp[(2) - (3)].blk); @@ -2007,8 +2051,9 @@ yyreduce: break; case 10: -/* Line 1787 of yacc.c */ -#line 218 "parser.y" + +/* Line 1806 of yacc.c */ +#line 220 "parser.y" { block assign = gen_op_simple(DUP); block_append(&assign, (yyvsp[(3) - (3)].blk)); @@ -2020,200 +2065,234 @@ yyreduce: break; case 11: -/* Line 1787 of yacc.c */ -#line 227 "parser.y" + +/* Line 1806 of yacc.c */ +#line 229 "parser.y" { (yyval.blk) = gen_or((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk)); } break; case 12: -/* Line 1787 of yacc.c */ -#line 231 "parser.y" + +/* Line 1806 of yacc.c */ +#line 233 "parser.y" { (yyval.blk) = gen_and((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk)); } break; case 13: -/* Line 1787 of yacc.c */ -#line 235 "parser.y" + +/* Line 1806 of yacc.c */ +#line 237 "parser.y" { (yyval.blk) = gen_definedor((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk)); } break; case 14: -/* Line 1787 of yacc.c */ -#line 239 "parser.y" + +/* Line 1806 of yacc.c */ +#line 241 "parser.y" { (yyval.blk) = gen_update((yyvsp[(1) - (3)].blk), gen_definedor(gen_noop(), (yyvsp[(3) - (3)].blk)), 0); } break; case 15: -/* Line 1787 of yacc.c */ -#line 243 "parser.y" + +/* Line 1806 of yacc.c */ +#line 245 "parser.y" { (yyval.blk) = gen_update((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), 0); } break; case 16: -/* Line 1787 of yacc.c */ -#line 247 "parser.y" + +/* Line 1806 of yacc.c */ +#line 249 "parser.y" { (yyval.blk) = block_join((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk)); } break; case 17: -/* Line 1787 of yacc.c */ -#line 251 "parser.y" + +/* Line 1806 of yacc.c */ +#line 253 "parser.y" { (yyval.blk) = gen_both((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk)); } break; case 18: -/* Line 1787 of yacc.c */ -#line 255 "parser.y" + +/* Line 1806 of yacc.c */ +#line 257 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '+'); } break; case 19: -/* Line 1787 of yacc.c */ -#line 259 "parser.y" + +/* Line 1806 of yacc.c */ +#line 261 "parser.y" { (yyval.blk) = gen_update((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '+'); } break; case 20: -/* Line 1787 of yacc.c */ -#line 263 "parser.y" + +/* Line 1806 of yacc.c */ +#line 265 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '-'); } break; case 21: -/* Line 1787 of yacc.c */ -#line 267 "parser.y" + +/* Line 1806 of yacc.c */ +#line 269 "parser.y" { (yyval.blk) = gen_update((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '-'); } break; case 22: -/* Line 1787 of yacc.c */ -#line 271 "parser.y" + +/* Line 1806 of yacc.c */ +#line 273 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '*'); } break; case 23: -/* Line 1787 of yacc.c */ -#line 275 "parser.y" + +/* Line 1806 of yacc.c */ +#line 277 "parser.y" { (yyval.blk) = gen_update((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '*'); } break; case 24: -/* Line 1787 of yacc.c */ -#line 279 "parser.y" + +/* Line 1806 of yacc.c */ +#line 281 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '/'); } break; case 25: -/* Line 1787 of yacc.c */ -#line 283 "parser.y" + +/* Line 1806 of yacc.c */ +#line 285 "parser.y" { (yyval.blk) = gen_update((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '/'); } break; case 26: -/* Line 1787 of yacc.c */ -#line 287 "parser.y" + +/* Line 1806 of yacc.c */ +#line 289 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), EQ); } break; case 27: -/* Line 1787 of yacc.c */ -#line 291 "parser.y" + +/* Line 1806 of yacc.c */ +#line 293 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), NEQ); } break; case 28: -/* Line 1787 of yacc.c */ -#line 295 "parser.y" + +/* Line 1806 of yacc.c */ +#line 297 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '<'); } break; case 29: -/* Line 1787 of yacc.c */ -#line 299 "parser.y" + +/* Line 1806 of yacc.c */ +#line 301 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), '>'); } break; case 30: -/* Line 1787 of yacc.c */ -#line 303 "parser.y" + +/* Line 1806 of yacc.c */ +#line 305 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), LESSEQ); } break; case 31: -/* Line 1787 of yacc.c */ -#line 307 "parser.y" + +/* Line 1806 of yacc.c */ +#line 309 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), GREATEREQ); } break; case 32: -/* Line 1787 of yacc.c */ -#line 311 "parser.y" + +/* Line 1806 of yacc.c */ +#line 313 "parser.y" + { + (yyval.blk) = gen_binop((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk), CONTAINS); +} + break; + + case 33: + +/* Line 1806 of yacc.c */ +#line 317 "parser.y" { (yyval.blk) = (yyvsp[(1) - (1)].blk); } break; - case 33: -/* Line 1787 of yacc.c */ -#line 315 "parser.y" + case 34: + +/* Line 1806 of yacc.c */ +#line 321 "parser.y" { (yyval.blk) = (yyvsp[(1) - (1)].blk); } break; - case 34: -/* Line 1787 of yacc.c */ -#line 320 "parser.y" + case 35: + +/* Line 1806 of yacc.c */ +#line 326 "parser.y" { (yyval.blk) = (yyvsp[(2) - (3)].blk); } break; - case 35: -/* Line 1787 of yacc.c */ -#line 325 "parser.y" + case 36: + +/* Line 1806 of yacc.c */ +#line 331 "parser.y" { block body = block_join((yyvsp[(4) - (5)].blk), gen_op_simple(RET)); (yyval.blk) = gen_op_block_defn_rec(CLOSURE_CREATE, jv_string_value((yyvsp[(2) - (5)].literal)), body); @@ -2221,9 +2300,10 @@ yyreduce: } break; - case 36: -/* Line 1787 of yacc.c */ -#line 331 "parser.y" + case 37: + +/* Line 1806 of yacc.c */ +#line 337 "parser.y" { block body = block_bind(gen_op_block_unbound(CLOSURE_PARAM, jv_string_value((yyvsp[(4) - (8)].literal))), block_join((yyvsp[(7) - (8)].blk), gen_op_simple(RET)), OP_IS_CALL_PSEUDO); (yyval.blk) = gen_op_block_defn_rec(CLOSURE_CREATE, jv_string_value((yyvsp[(2) - (8)].literal)), body); @@ -2232,137 +2312,154 @@ yyreduce: } break; - case 37: -/* Line 1787 of yacc.c */ -#line 339 "parser.y" + case 38: + +/* Line 1806 of yacc.c */ +#line 345 "parser.y" { (yyval.blk) = gen_op_const(LOADK, jv_string("")); } break; - case 38: -/* Line 1787 of yacc.c */ -#line 342 "parser.y" + case 39: + +/* Line 1806 of yacc.c */ +#line 348 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (2)].blk), gen_op_const(LOADK, (yyvsp[(2) - (2)].literal)), '+'); } break; - case 39: -/* Line 1787 of yacc.c */ -#line 345 "parser.y" + case 40: + +/* Line 1806 of yacc.c */ +#line 351 "parser.y" { (yyval.blk) = gen_binop((yyvsp[(1) - (4)].blk), gen_format((yyvsp[(3) - (4)].blk)), '+'); } break; - case 40: -/* Line 1787 of yacc.c */ -#line 351 "parser.y" + case 41: + +/* Line 1806 of yacc.c */ +#line 357 "parser.y" { (yyval.blk) = gen_cond((yyvsp[(2) - (5)].blk), (yyvsp[(4) - (5)].blk), (yyvsp[(5) - (5)].blk)); } break; - case 41: -/* Line 1787 of yacc.c */ -#line 354 "parser.y" + case 42: + +/* Line 1806 of yacc.c */ +#line 360 "parser.y" { (yyval.blk) = (yyvsp[(2) - (3)].blk); } break; - case 42: -/* Line 1787 of yacc.c */ -#line 359 "parser.y" + case 43: + +/* Line 1806 of yacc.c */ +#line 365 "parser.y" { (yyval.blk) = block_join((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk)); } break; - case 43: -/* Line 1787 of yacc.c */ -#line 363 "parser.y" + case 44: + +/* Line 1806 of yacc.c */ +#line 369 "parser.y" { (yyval.blk) = (yyvsp[(1) - (1)].blk); } break; - case 44: -/* Line 1787 of yacc.c */ -#line 369 "parser.y" + case 45: + +/* Line 1806 of yacc.c */ +#line 375 "parser.y" { (yyval.blk) = gen_noop(); } break; - case 45: -/* Line 1787 of yacc.c */ -#line 372 "parser.y" + case 46: + +/* Line 1806 of yacc.c */ +#line 378 "parser.y" { (yyval.blk) = gen_index((yyvsp[(1) - (3)].blk), gen_op_const(LOADK, (yyvsp[(3) - (3)].literal))); } break; - case 46: -/* Line 1787 of yacc.c */ -#line 375 "parser.y" + case 47: + +/* Line 1806 of yacc.c */ +#line 381 "parser.y" { (yyval.blk) = gen_index(gen_noop(), gen_op_const(LOADK, (yyvsp[(2) - (2)].literal))); } break; - case 47: -/* Line 1787 of yacc.c */ -#line 379 "parser.y" + case 48: + +/* Line 1806 of yacc.c */ +#line 385 "parser.y" { (yyval.blk) = gen_index((yyvsp[(1) - (4)].blk), (yyvsp[(3) - (4)].blk)); } break; - case 48: -/* Line 1787 of yacc.c */ -#line 382 "parser.y" + case 49: + +/* Line 1806 of yacc.c */ +#line 388 "parser.y" { (yyval.blk) = block_join((yyvsp[(1) - (3)].blk), gen_op_simple(EACH)); } break; - case 49: -/* Line 1787 of yacc.c */ -#line 385 "parser.y" + case 50: + +/* Line 1806 of yacc.c */ +#line 391 "parser.y" { (yyval.blk) = gen_op_const(LOADK, (yyvsp[(1) - (1)].literal)); } break; - case 50: -/* Line 1787 of yacc.c */ -#line 388 "parser.y" + case 51: + +/* Line 1806 of yacc.c */ +#line 394 "parser.y" { (yyval.blk) = (yyvsp[(2) - (3)].blk); } break; - case 51: -/* Line 1787 of yacc.c */ -#line 391 "parser.y" + case 52: + +/* Line 1806 of yacc.c */ +#line 397 "parser.y" { (yyval.blk) = gen_collect((yyvsp[(2) - (3)].blk)); } break; - case 52: -/* Line 1787 of yacc.c */ -#line 394 "parser.y" + case 53: + +/* Line 1806 of yacc.c */ +#line 400 "parser.y" { (yyval.blk) = gen_op_const(LOADK, jv_array()); } break; - case 53: -/* Line 1787 of yacc.c */ -#line 397 "parser.y" + case 54: + +/* Line 1806 of yacc.c */ +#line 403 "parser.y" { (yyval.blk) = gen_subexp(gen_op_const(LOADK, jv_object())); block_append(&(yyval.blk), (yyvsp[(2) - (3)].blk)); @@ -2370,27 +2467,30 @@ yyreduce: } break; - case 54: -/* Line 1787 of yacc.c */ -#line 402 "parser.y" + case 55: + +/* Line 1806 of yacc.c */ +#line 408 "parser.y" { (yyval.blk) = gen_location((yyloc), gen_op_var_unbound(LOADV, jv_string_value((yyvsp[(2) - (2)].literal)))); jv_free((yyvsp[(2) - (2)].literal)); } break; - case 55: -/* Line 1787 of yacc.c */ -#line 406 "parser.y" + case 56: + +/* Line 1806 of yacc.c */ +#line 412 "parser.y" { (yyval.blk) = gen_location((yyloc), gen_op_call(CALL_1_1, gen_op_block_unbound(CLOSURE_REF, jv_string_value((yyvsp[(1) - (1)].literal))))); jv_free((yyvsp[(1) - (1)].literal)); } break; - case 56: -/* Line 1787 of yacc.c */ -#line 410 "parser.y" + case 57: + +/* Line 1806 of yacc.c */ +#line 416 "parser.y" { (yyval.blk) = gen_op_call(CALL_1_1, block_join(gen_op_block_unbound(CLOSURE_REF, jv_string_value((yyvsp[(1) - (4)].literal))), @@ -2403,98 +2503,112 @@ yyreduce: } break; - case 57: -/* Line 1787 of yacc.c */ -#line 420 "parser.y" - { (yyval.blk) = gen_noop(); } - break; - case 58: -/* Line 1787 of yacc.c */ -#line 421 "parser.y" + +/* Line 1806 of yacc.c */ +#line 426 "parser.y" { (yyval.blk) = gen_noop(); } break; case 59: -/* Line 1787 of yacc.c */ -#line 422 "parser.y" - { (yyval.blk) = (yyvsp[(1) - (4)].blk); } - break; - case 60: -/* Line 1787 of yacc.c */ -#line 423 "parser.y" +/* Line 1806 of yacc.c */ +#line 427 "parser.y" { (yyval.blk) = gen_noop(); } break; + case 60: + +/* Line 1806 of yacc.c */ +#line 428 "parser.y" + { (yyval.blk) = (yyvsp[(1) - (4)].blk); } + break; + case 61: -/* Line 1787 of yacc.c */ -#line 426 "parser.y" + +/* Line 1806 of yacc.c */ +#line 429 "parser.y" + { (yyval.blk) = gen_noop(); } + break; + + case 62: + +/* Line 1806 of yacc.c */ +#line 432 "parser.y" { (yyval.blk)=gen_noop(); } break; - case 62: -/* Line 1787 of yacc.c */ -#line 429 "parser.y" + case 63: + +/* Line 1806 of yacc.c */ +#line 435 "parser.y" { (yyval.blk) = (yyvsp[(1) - (1)].blk); } break; - case 63: -/* Line 1787 of yacc.c */ -#line 430 "parser.y" + case 64: + +/* Line 1806 of yacc.c */ +#line 436 "parser.y" { (yyval.blk)=block_join((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk)); } break; - case 64: -/* Line 1787 of yacc.c */ -#line 431 "parser.y" + case 65: + +/* Line 1806 of yacc.c */ +#line 437 "parser.y" { (yyval.blk) = (yyvsp[(3) - (3)].blk); } break; - case 65: -/* Line 1787 of yacc.c */ -#line 434 "parser.y" + case 66: + +/* Line 1806 of yacc.c */ +#line 440 "parser.y" { (yyval.blk) = gen_dictpair(gen_op_const(LOADK, (yyvsp[(1) - (3)].literal)), (yyvsp[(3) - (3)].blk)); } break; - case 66: -/* Line 1787 of yacc.c */ -#line 437 "parser.y" + case 67: + +/* Line 1806 of yacc.c */ +#line 443 "parser.y" { (yyval.blk) = gen_dictpair((yyvsp[(1) - (3)].blk), (yyvsp[(3) - (3)].blk)); } break; - case 67: -/* Line 1787 of yacc.c */ -#line 440 "parser.y" + case 68: + +/* Line 1806 of yacc.c */ +#line 446 "parser.y" { (yyval.blk) = gen_dictpair(gen_op_const(LOADK, jv_copy((yyvsp[(1) - (1)].literal))), gen_index(gen_noop(), gen_op_const(LOADK, (yyvsp[(1) - (1)].literal)))); } break; - case 68: -/* Line 1787 of yacc.c */ -#line 444 "parser.y" + case 69: + +/* Line 1806 of yacc.c */ +#line 450 "parser.y" { (yyval.blk) = gen_dictpair((yyvsp[(2) - (5)].blk), (yyvsp[(5) - (5)].blk)); } break; - case 69: -/* Line 1787 of yacc.c */ -#line 447 "parser.y" + case 70: + +/* Line 1806 of yacc.c */ +#line 453 "parser.y" { (yyval.blk) = (yyvsp[(5) - (5)].blk); } break; -/* Line 1787 of yacc.c */ -#line 2498 "parser.gen.c" + +/* Line 1806 of yacc.c */ +#line 2612 "parser.gen.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2688,7 +2802,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2730,8 +2844,9 @@ yyreturn: } -/* Line 2048 of yacc.c */ -#line 448 "parser.y" + +/* Line 2067 of yacc.c */ +#line 454 "parser.y" int jq_parse(struct locfile* locations, block* answer) { @@ -2760,3 +2875,4 @@ int jq_parse_library(struct locfile* locations, block* answer) { } return 0; } + diff --git a/parser.gen.h b/parser.gen.h index 0e5c8007..bf9f9f8c 100644 --- a/parser.gen.h +++ b/parser.gen.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 2.6.2. */ +/* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,17 +30,9 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -#ifndef YY_PARSER_GEN_H -# define YY_PARSER_GEN_H -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif /* "%code requires" blocks. */ -/* Line 2049 of yacc.c */ + +/* Line 2068 of yacc.c */ #line 9 "parser.y" #include "locfile.h" @@ -57,8 +49,9 @@ extern int yydebug; } while (0) -/* Line 2049 of yacc.c */ -#line 62 "parser.gen.h" + +/* Line 2068 of yacc.c */ +#line 55 "parser.gen.h" /* Tokens. */ #ifndef YYTOKENTYPE @@ -89,33 +82,39 @@ extern int yydebug; SETDEFINEDOR = 278, LESSEQ = 279, GREATEREQ = 280, - QQSTRING_START = 281, - QQSTRING_TEXT = 282, - QQSTRING_INTERP_START = 283, - QQSTRING_INTERP_END = 284, - QQSTRING_END = 285 + CONTAINS = 281, + QQSTRING_START = 282, + QQSTRING_TEXT = 283, + QQSTRING_INTERP_START = 284, + QQSTRING_INTERP_END = 285, + QQSTRING_END = 286 }; #endif + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { -/* Line 2049 of yacc.c */ + +/* Line 2068 of yacc.c */ #line 27 "parser.y" jv literal; block blk; -/* Line 2049 of yacc.c */ -#line 113 "parser.gen.h" + +/* Line 2068 of yacc.c */ +#line 110 "parser.gen.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + + #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE { @@ -130,18 +129,4 @@ typedef struct YYLTYPE #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (block* answer, int* errors, struct locfile* locations, struct lexer_param* lexer_param_ptr); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ -#endif /* !YY_PARSER_GEN_H */ diff --git a/parser.gen.info b/parser.gen.info index d2fb1fdf..b5718b63 100644 --- a/parser.gen.info +++ b/parser.gen.info @@ -1,16 +1,16 @@ -Terminaux inutilisés dans la grammaire +Terminals unused in grammar INVALID_CHARACTER -Grammaire +Grammar 0 $accept: TopLevel $end 1 TopLevel: Exp 2 | FuncDefs - 3 FuncDefs: /* vide */ + 3 FuncDefs: /* empty */ 4 | FuncDef FuncDefs 5 Exp: FuncDef Exp @@ -39,90 +39,91 @@ Grammaire 28 | Exp '>' Exp 29 | Exp "<=" Exp 30 | Exp ">=" Exp - 31 | String - 32 | Term + 31 | Exp "contains" Exp + 32 | String + 33 | Term - 33 String: QQSTRING_START QQString QQSTRING_END + 34 String: QQSTRING_START QQString QQSTRING_END - 34 FuncDef: "def" IDENT ':' Exp ';' - 35 | "def" IDENT '(' IDENT ')' ':' Exp ';' + 35 FuncDef: "def" IDENT ':' Exp ';' + 36 | "def" IDENT '(' IDENT ')' ':' Exp ';' - 36 QQString: /* vide */ - 37 | QQString QQSTRING_TEXT - 38 | QQString QQSTRING_INTERP_START Exp QQSTRING_INTERP_END + 37 QQString: /* empty */ + 38 | QQString QQSTRING_TEXT + 39 | QQString QQSTRING_INTERP_START Exp QQSTRING_INTERP_END - 39 ElseBody: "elif" Exp "then" Exp ElseBody - 40 | "else" Exp "end" + 40 ElseBody: "elif" Exp "then" Exp ElseBody + 41 | "else" Exp "end" - 41 ExpD: ExpD '|' ExpD - 42 | Term + 42 ExpD: ExpD '|' ExpD + 43 | Term - 43 Term: '.' - 44 | Term '.' IDENT - 45 | '.' IDENT - 46 | Term '[' Exp ']' - 47 | Term '[' ']' - 48 | LITERAL - 49 | '(' Exp ')' - 50 | '[' Exp ']' - 51 | '[' ']' - 52 | '{' MkDict '}' - 53 | '$' IDENT - 54 | IDENT - 55 | IDENT '(' Exp ')' - 56 | '(' error ')' - 57 | '[' error ']' - 58 | Term '[' error ']' - 59 | '{' error '}' + 44 Term: '.' + 45 | Term '.' IDENT + 46 | '.' IDENT + 47 | Term '[' Exp ']' + 48 | Term '[' ']' + 49 | LITERAL + 50 | '(' Exp ')' + 51 | '[' Exp ']' + 52 | '[' ']' + 53 | '{' MkDict '}' + 54 | '$' IDENT + 55 | IDENT + 56 | IDENT '(' Exp ')' + 57 | '(' error ')' + 58 | '[' error ']' + 59 | Term '[' error ']' + 60 | '{' error '}' - 60 MkDict: /* vide */ - 61 | MkDictPair - 62 | MkDictPair ',' MkDict - 63 | error ',' MkDict + 61 MkDict: /* empty */ + 62 | MkDictPair + 63 | MkDictPair ',' MkDict + 64 | error ',' MkDict - 64 MkDictPair: IDENT ':' ExpD - 65 | String ':' ExpD - 66 | IDENT - 67 | '(' Exp ')' ':' ExpD - 68 | '(' error ')' ':' ExpD + 65 MkDictPair: IDENT ':' ExpD + 66 | String ':' ExpD + 67 | IDENT + 68 | '(' Exp ')' ':' ExpD + 69 | '(' error ')' ':' ExpD -Terminaux, suivis des règles où ils apparaissent +Terminals, with rules where they appear $end (0) 0 -'$' (36) 6 53 -'(' (40) 35 49 55 56 67 68 -')' (41) 35 49 55 56 67 68 +'$' (36) 6 54 +'(' (40) 36 50 56 57 68 69 +')' (41) 36 50 56 57 68 69 '*' (42) 21 '+' (43) 17 -',' (44) 16 62 63 +',' (44) 16 63 64 '-' (45) 19 -'.' (46) 43 44 45 +'.' (46) 44 45 46 '/' (47) 23 -':' (58) 34 35 64 65 67 68 -';' (59) 34 35 +':' (58) 35 36 65 66 68 69 +';' (59) 35 36 '<' (60) 27 '=' (61) 9 '>' (62) 28 -'[' (91) 46 47 50 51 57 58 -']' (93) 46 47 50 51 57 58 -'{' (123) 52 59 -'|' (124) 6 15 41 -'}' (125) 52 59 -error (256) 8 56 57 58 59 63 68 +'[' (91) 47 48 51 52 58 59 +']' (93) 47 48 51 52 58 59 +'{' (123) 53 60 +'|' (124) 6 15 42 +'}' (125) 53 60 +error (256) 8 57 58 59 60 64 69 INVALID_CHARACTER (258) -IDENT (259) 6 34 35 44 45 53 54 55 64 66 -LITERAL (260) 48 +IDENT (259) 6 35 36 45 46 54 55 56 65 67 +LITERAL (260) 49 "==" (261) 25 "!=" (262) 26 "//" (263) 12 "as" (264) 6 -"def" (265) 34 35 +"def" (265) 35 36 "if" (266) 7 8 -"then" (267) 7 39 -"else" (268) 40 -"elif" (269) 39 -"end" (270) 40 +"then" (267) 7 40 +"else" (268) 41 +"elif" (269) 40 +"end" (270) 41 "and" (271) 11 "or" (272) 10 "|=" (273) 14 @@ -133,223 +134,224 @@ LITERAL (260) 48 "//=" (278) 13 "<=" (279) 29 ">=" (280) 30 -QQSTRING_START (281) 33 -QQSTRING_TEXT (282) 37 -QQSTRING_INTERP_START (283) 38 -QQSTRING_INTERP_END (284) 38 -QQSTRING_END (285) 33 +"contains" (281) 31 +QQSTRING_START (282) 34 +QQSTRING_TEXT (283) 38 +QQSTRING_INTERP_START (284) 39 +QQSTRING_INTERP_END (285) 39 +QQSTRING_END (286) 34 -Non-terminaux, suivis des règles où ils apparaissent +Nonterminals, with rules where they appear -$accept (50) - à gauche: 0 -TopLevel (51) - à gauche: 1 2, à droite: 0 -FuncDefs (52) - à gauche: 3 4, à droite: 2 4 -Exp (53) - à gauche: 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 - 24 25 26 27 28 29 30 31 32, à droite: 1 5 6 7 8 9 10 11 12 13 - 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 34 35 38 39 - 40 46 49 50 55 67 -String (54) - à gauche: 33, à droite: 31 65 -FuncDef (55) - à gauche: 34 35, à droite: 4 5 -QQString (56) - à gauche: 36 37 38, à droite: 33 37 38 -ElseBody (57) - à gauche: 39 40, à droite: 7 39 -ExpD (58) - à gauche: 41 42, à droite: 41 64 65 67 68 -Term (59) - à gauche: 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59, - à droite: 6 32 42 44 46 47 58 -MkDict (60) - à gauche: 60 61 62 63, à droite: 52 62 63 -MkDictPair (61) - à gauche: 64 65 66 67 68, à droite: 61 62 +$accept (51) + on left: 0 +TopLevel (52) + on left: 1 2, on right: 0 +FuncDefs (53) + on left: 3 4, on right: 2 4 +Exp (54) + on left: 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 + 25 26 27 28 29 30 31 32 33, on right: 1 5 6 7 8 9 10 11 12 13 14 + 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 35 36 39 40 + 41 47 50 51 56 68 +String (55) + on left: 34, on right: 32 66 +FuncDef (56) + on left: 35 36, on right: 4 5 +QQString (57) + on left: 37 38 39, on right: 34 38 39 +ElseBody (58) + on left: 40 41, on right: 7 40 +ExpD (59) + on left: 42 43, on right: 42 65 66 68 69 +Term (60) + on left: 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60, on right: + 6 33 43 45 47 48 59 +MkDict (61) + on left: 61 62 63 64, on right: 53 63 64 +MkDictPair (62) + on left: 65 66 67 68 69, on right: 62 63 -état 0 +state 0 0 $accept: . TopLevel $end - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - $défaut réduction par utilisation de la règle 3 (FuncDefs) + $default reduce using rule 3 (FuncDefs) - TopLevel aller à l'état 11 - FuncDefs aller à l'état 12 - Exp aller à l'état 13 - String aller à l'état 14 - FuncDef aller à l'état 15 - Term aller à l'état 16 + TopLevel go to state 11 + FuncDefs go to state 12 + Exp go to state 13 + String go to state 14 + FuncDef go to state 15 + Term go to state 16 -état 1 +state 1 - 54 Term: IDENT . - 55 | IDENT . '(' Exp ')' + 55 Term: IDENT . + 56 | IDENT . '(' Exp ')' - '(' décalage et aller à l'état 17 + '(' shift, and go to state 17 - $défaut réduction par utilisation de la règle 54 (Term) + $default reduce using rule 55 (Term) -état 2 +state 2 - 48 Term: LITERAL . + 49 Term: LITERAL . - $défaut réduction par utilisation de la règle 48 (Term) + $default reduce using rule 49 (Term) -état 3 +state 3 - 34 FuncDef: "def" . IDENT ':' Exp ';' - 35 | "def" . IDENT '(' IDENT ')' ':' Exp ';' + 35 FuncDef: "def" . IDENT ':' Exp ';' + 36 | "def" . IDENT '(' IDENT ')' ':' Exp ';' - IDENT décalage et aller à l'état 18 + IDENT shift, and go to state 18 -état 4 +state 4 7 Exp: "if" . Exp "then" Exp ElseBody 8 | "if" . Exp error - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 19 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 19 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 5 +state 5 - 33 String: QQSTRING_START . QQString QQSTRING_END + 34 String: QQSTRING_START . QQString QQSTRING_END - $défaut réduction par utilisation de la règle 36 (QQString) + $default reduce using rule 37 (QQString) - QQString aller à l'état 21 + QQString go to state 21 -état 6 +state 6 - 53 Term: '$' . IDENT + 54 Term: '$' . IDENT - IDENT décalage et aller à l'état 22 + IDENT shift, and go to state 22 -état 7 +state 7 - 49 Term: '(' . Exp ')' - 56 | '(' . error ')' + 50 Term: '(' . Exp ')' + 57 | '(' . error ')' - error décalage et aller à l'état 23 - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + error shift, and go to state 23 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 24 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 24 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 8 +state 8 - 43 Term: '.' . - 45 | '.' . IDENT + 44 Term: '.' . + 46 | '.' . IDENT - IDENT décalage et aller à l'état 25 + IDENT shift, and go to state 25 - $défaut réduction par utilisation de la règle 43 (Term) + $default reduce using rule 44 (Term) -état 9 +state 9 - 50 Term: '[' . Exp ']' - 51 | '[' . ']' - 57 | '[' . error ']' + 51 Term: '[' . Exp ']' + 52 | '[' . ']' + 58 | '[' . error ']' - error décalage et aller à l'état 26 - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - ']' décalage et aller à l'état 27 - '{' décalage et aller à l'état 10 + error shift, and go to state 26 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + ']' shift, and go to state 27 + '{' shift, and go to state 10 - Exp aller à l'état 28 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 28 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 10 +state 10 - 52 Term: '{' . MkDict '}' - 59 | '{' . error '}' + 53 Term: '{' . MkDict '}' + 60 | '{' . error '}' - error décalage et aller à l'état 29 - IDENT décalage et aller à l'état 30 - QQSTRING_START décalage et aller à l'état 5 - '(' décalage et aller à l'état 31 + error shift, and go to state 29 + IDENT shift, and go to state 30 + QQSTRING_START shift, and go to state 5 + '(' shift, and go to state 31 - '}' réduction par utilisation de la règle 60 (MkDict) + '}' reduce using rule 61 (MkDict) - String aller à l'état 32 - MkDict aller à l'état 33 - MkDictPair aller à l'état 34 + String go to state 32 + MkDict go to state 33 + MkDictPair go to state 34 -état 11 +state 11 0 $accept: TopLevel . $end - $end décalage et aller à l'état 35 + $end shift, and go to state 35 -état 12 +state 12 2 TopLevel: FuncDefs . - $défaut réduction par utilisation de la règle 2 (TopLevel) + $default reduce using rule 2 (TopLevel) -état 13 +state 13 1 TopLevel: Exp . 9 Exp: Exp . '=' Exp @@ -374,112 +376,114 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 1 (TopLevel) + $default reduce using rule 1 (TopLevel) -état 14 +state 14 - 31 Exp: String . + 32 Exp: String . - $défaut réduction par utilisation de la règle 31 (Exp) + $default reduce using rule 32 (Exp) -état 15 +state 15 4 FuncDefs: FuncDef . FuncDefs 5 Exp: FuncDef . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - $défaut réduction par utilisation de la règle 3 (FuncDefs) + $default reduce using rule 3 (FuncDefs) - FuncDefs aller à l'état 58 - Exp aller à l'état 59 - String aller à l'état 14 - FuncDef aller à l'état 15 - Term aller à l'état 16 + FuncDefs go to state 59 + Exp go to state 60 + String go to state 14 + FuncDef go to state 15 + Term go to state 16 -état 16 +state 16 6 Exp: Term . "as" '$' IDENT '|' Exp - 32 | Term . - 44 Term: Term . '.' IDENT - 46 | Term . '[' Exp ']' - 47 | Term . '[' ']' - 58 | Term . '[' error ']' + 33 | Term . + 45 Term: Term . '.' IDENT + 47 | Term . '[' Exp ']' + 48 | Term . '[' ']' + 59 | Term . '[' error ']' - "as" décalage et aller à l'état 60 - '.' décalage et aller à l'état 61 - '[' décalage et aller à l'état 62 + "as" shift, and go to state 61 + '.' shift, and go to state 62 + '[' shift, and go to state 63 - $défaut réduction par utilisation de la règle 32 (Exp) + $default reduce using rule 33 (Exp) -état 17 +state 17 - 55 Term: IDENT '(' . Exp ')' + 56 Term: IDENT '(' . Exp ')' - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 63 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 64 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 18 +state 18 - 34 FuncDef: "def" IDENT . ':' Exp ';' - 35 | "def" IDENT . '(' IDENT ')' ':' Exp ';' + 35 FuncDef: "def" IDENT . ':' Exp ';' + 36 | "def" IDENT . '(' IDENT ')' ':' Exp ';' - ':' décalage et aller à l'état 64 - '(' décalage et aller à l'état 65 + ':' shift, and go to state 65 + '(' shift, and go to state 66 -état 19 +state 19 7 Exp: "if" Exp . "then" Exp ElseBody 8 | "if" Exp . error @@ -505,80 +509,82 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - error décalage et aller à l'état 66 - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "then" décalage et aller à l'état 67 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + error shift, and go to state 67 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "then" shift, and go to state 68 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 -état 20 +state 20 5 Exp: FuncDef . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 59 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 60 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 21 +state 21 - 33 String: QQSTRING_START QQString . QQSTRING_END - 37 QQString: QQString . QQSTRING_TEXT - 38 | QQString . QQSTRING_INTERP_START Exp QQSTRING_INTERP_END + 34 String: QQSTRING_START QQString . QQSTRING_END + 38 QQString: QQString . QQSTRING_TEXT + 39 | QQString . QQSTRING_INTERP_START Exp QQSTRING_INTERP_END - QQSTRING_TEXT décalage et aller à l'état 68 - QQSTRING_INTERP_START décalage et aller à l'état 69 - QQSTRING_END décalage et aller à l'état 70 + QQSTRING_TEXT shift, and go to state 69 + QQSTRING_INTERP_START shift, and go to state 70 + QQSTRING_END shift, and go to state 71 -état 22 +state 22 - 53 Term: '$' IDENT . + 54 Term: '$' IDENT . - $défaut réduction par utilisation de la règle 53 (Term) + $default reduce using rule 54 (Term) -état 23 +state 23 - 56 Term: '(' error . ')' + 57 Term: '(' error . ')' - ')' décalage et aller à l'état 71 + ')' shift, and go to state 72 -état 24 +state 24 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -602,55 +608,57 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 49 Term: '(' Exp . ')' + 31 | Exp . "contains" Exp + 50 Term: '(' Exp . ')' - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 - ')' décalage et aller à l'état 72 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 + ')' shift, and go to state 73 -état 25 +state 25 - 45 Term: '.' IDENT . + 46 Term: '.' IDENT . - $défaut réduction par utilisation de la règle 45 (Term) + $default reduce using rule 46 (Term) -état 26 +state 26 - 57 Term: '[' error . ']' + 58 Term: '[' error . ']' - ']' décalage et aller à l'état 73 + ']' shift, and go to state 74 -état 27 +state 27 - 51 Term: '[' ']' . + 52 Term: '[' ']' . - $défaut réduction par utilisation de la règle 51 (Term) + $default reduce using rule 52 (Term) -état 28 +state 28 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -674,576 +682,599 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 50 Term: '[' Exp . ']' + 31 | Exp . "contains" Exp + 51 Term: '[' Exp . ']' - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 - ']' décalage et aller à l'état 74 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 + ']' shift, and go to state 75 -état 29 +state 29 - 59 Term: '{' error . '}' - 63 MkDict: error . ',' MkDict + 60 Term: '{' error . '}' + 64 MkDict: error . ',' MkDict - ',' décalage et aller à l'état 75 - '}' décalage et aller à l'état 76 + ',' shift, and go to state 76 + '}' shift, and go to state 77 -état 30 +state 30 - 64 MkDictPair: IDENT . ':' ExpD - 66 | IDENT . + 65 MkDictPair: IDENT . ':' ExpD + 67 | IDENT . - ':' décalage et aller à l'état 77 + ':' shift, and go to state 78 - $défaut réduction par utilisation de la règle 66 (MkDictPair) + $default reduce using rule 67 (MkDictPair) -état 31 +state 31 - 67 MkDictPair: '(' . Exp ')' ':' ExpD - 68 | '(' . error ')' ':' ExpD + 68 MkDictPair: '(' . Exp ')' ':' ExpD + 69 | '(' . error ')' ':' ExpD - error décalage et aller à l'état 78 - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + error shift, and go to state 79 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 79 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 80 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 32 +state 32 - 65 MkDictPair: String . ':' ExpD + 66 MkDictPair: String . ':' ExpD - ':' décalage et aller à l'état 80 + ':' shift, and go to state 81 -état 33 +state 33 - 52 Term: '{' MkDict . '}' + 53 Term: '{' MkDict . '}' - '}' décalage et aller à l'état 81 + '}' shift, and go to state 82 -état 34 +state 34 - 61 MkDict: MkDictPair . - 62 | MkDictPair . ',' MkDict + 62 MkDict: MkDictPair . + 63 | MkDictPair . ',' MkDict - ',' décalage et aller à l'état 82 + ',' shift, and go to state 83 - $défaut réduction par utilisation de la règle 61 (MkDict) + $default reduce using rule 62 (MkDict) -état 35 +state 35 0 $accept: TopLevel $end . - $défaut accepter + $default accept -état 36 +state 36 25 Exp: Exp "==" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 83 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 84 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 37 +state 37 26 Exp: Exp "!=" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 84 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 85 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 38 +state 38 12 Exp: Exp "//" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 85 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 86 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 39 +state 39 11 Exp: Exp "and" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 86 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 87 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 40 +state 40 10 Exp: Exp "or" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 87 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 88 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 41 +state 41 14 Exp: Exp "|=" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 88 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 89 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 42 +state 42 18 Exp: Exp "+=" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 89 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 90 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 43 +state 43 20 Exp: Exp "-=" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 90 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 91 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 44 +state 44 22 Exp: Exp "*=" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 91 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 92 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 45 +state 45 24 Exp: Exp "/=" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 92 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 93 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 46 +state 46 13 Exp: Exp "//=" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 93 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 94 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 47 +state 47 29 Exp: Exp "<=" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 94 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 95 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 48 +state 48 30 Exp: Exp ">=" . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 95 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 96 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 49 +state 49 + + 31 Exp: Exp "contains" . Exp + + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 + + Exp go to state 97 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 + + +state 50 15 Exp: Exp '|' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 96 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 98 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 50 +state 51 16 Exp: Exp ',' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 97 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 99 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 51 +state 52 9 Exp: Exp '=' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 98 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 100 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 52 +state 53 27 Exp: Exp '<' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 99 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 101 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 53 +state 54 28 Exp: Exp '>' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 100 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 102 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 54 +state 55 17 Exp: Exp '+' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 101 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 103 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 55 +state 56 19 Exp: Exp '-' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 102 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 104 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 56 +state 57 21 Exp: Exp '*' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 103 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 105 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 57 +state 58 23 Exp: Exp '/' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 104 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 106 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 58 +state 59 4 FuncDefs: FuncDef FuncDefs . - $défaut réduction par utilisation de la règle 4 (FuncDefs) + $default reduce using rule 4 (FuncDefs) -état 59 +state 60 5 Exp: FuncDef Exp . 9 | Exp . '=' Exp @@ -1268,73 +1299,75 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 5 (Exp) + $default reduce using rule 5 (Exp) -état 60 +state 61 6 Exp: Term "as" . '$' IDENT '|' Exp - '$' décalage et aller à l'état 105 + '$' shift, and go to state 107 -état 61 +state 62 - 44 Term: Term '.' . IDENT + 45 Term: Term '.' . IDENT - IDENT décalage et aller à l'état 106 + IDENT shift, and go to state 108 -état 62 +state 63 - 46 Term: Term '[' . Exp ']' - 47 | Term '[' . ']' - 58 | Term '[' . error ']' + 47 Term: Term '[' . Exp ']' + 48 | Term '[' . ']' + 59 | Term '[' . error ']' - error décalage et aller à l'état 107 - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - ']' décalage et aller à l'état 108 - '{' décalage et aller à l'état 10 + error shift, and go to state 109 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + ']' shift, and go to state 110 + '{' shift, and go to state 10 - Exp aller à l'état 109 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 111 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 63 +state 64 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1358,199 +1391,201 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 55 Term: IDENT '(' Exp . ')' + 31 | Exp . "contains" Exp + 56 Term: IDENT '(' Exp . ')' - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 - ')' décalage et aller à l'état 110 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 + ')' shift, and go to state 112 -état 64 +state 65 - 34 FuncDef: "def" IDENT ':' . Exp ';' + 35 FuncDef: "def" IDENT ':' . Exp ';' - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 111 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 113 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 65 +state 66 - 35 FuncDef: "def" IDENT '(' . IDENT ')' ':' Exp ';' + 36 FuncDef: "def" IDENT '(' . IDENT ')' ':' Exp ';' - IDENT décalage et aller à l'état 112 + IDENT shift, and go to state 114 -état 66 +state 67 8 Exp: "if" Exp error . - $défaut réduction par utilisation de la règle 8 (Exp) + $default reduce using rule 8 (Exp) -état 67 +state 68 7 Exp: "if" Exp "then" . Exp ElseBody - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 113 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 115 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 68 +state 69 - 37 QQString: QQString QQSTRING_TEXT . + 38 QQString: QQString QQSTRING_TEXT . - $défaut réduction par utilisation de la règle 37 (QQString) + $default reduce using rule 38 (QQString) -état 69 +state 70 - 38 QQString: QQString QQSTRING_INTERP_START . Exp QQSTRING_INTERP_END + 39 QQString: QQString QQSTRING_INTERP_START . Exp QQSTRING_INTERP_END - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 114 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 116 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 70 +state 71 - 33 String: QQSTRING_START QQString QQSTRING_END . + 34 String: QQSTRING_START QQString QQSTRING_END . - $défaut réduction par utilisation de la règle 33 (String) + $default reduce using rule 34 (String) -état 71 +state 72 - 56 Term: '(' error ')' . + 57 Term: '(' error ')' . - $défaut réduction par utilisation de la règle 56 (Term) + $default reduce using rule 57 (Term) -état 72 +state 73 - 49 Term: '(' Exp ')' . + 50 Term: '(' Exp ')' . - $défaut réduction par utilisation de la règle 49 (Term) + $default reduce using rule 50 (Term) -état 73 +state 74 - 57 Term: '[' error ']' . + 58 Term: '[' error ']' . - $défaut réduction par utilisation de la règle 57 (Term) + $default reduce using rule 58 (Term) -état 74 +state 75 - 50 Term: '[' Exp ']' . + 51 Term: '[' Exp ']' . - $défaut réduction par utilisation de la règle 50 (Term) + $default reduce using rule 51 (Term) -état 75 +state 76 - 63 MkDict: error ',' . MkDict + 64 MkDict: error ',' . MkDict - error décalage et aller à l'état 115 - IDENT décalage et aller à l'état 30 - QQSTRING_START décalage et aller à l'état 5 - '(' décalage et aller à l'état 31 + error shift, and go to state 117 + IDENT shift, and go to state 30 + QQSTRING_START shift, and go to state 5 + '(' shift, and go to state 31 - '}' réduction par utilisation de la règle 60 (MkDict) + '}' reduce using rule 61 (MkDict) - String aller à l'état 32 - MkDict aller à l'état 116 - MkDictPair aller à l'état 34 + String go to state 32 + MkDict go to state 118 + MkDictPair go to state 34 -état 76 +state 77 - 59 Term: '{' error '}' . + 60 Term: '{' error '}' . - $défaut réduction par utilisation de la règle 59 (Term) + $default reduce using rule 60 (Term) -état 77 +state 78 - 64 MkDictPair: IDENT ':' . ExpD + 65 MkDictPair: IDENT ':' . ExpD - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - ExpD aller à l'état 117 - Term aller à l'état 118 + ExpD go to state 119 + Term go to state 120 -état 78 +state 79 - 68 MkDictPair: '(' error . ')' ':' ExpD + 69 MkDictPair: '(' error . ')' ':' ExpD - ')' décalage et aller à l'état 119 + ')' shift, and go to state 121 -état 79 +state 80 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1574,73 +1609,75 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 67 MkDictPair: '(' Exp . ')' ':' ExpD + 31 | Exp . "contains" Exp + 68 MkDictPair: '(' Exp . ')' ':' ExpD - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 - ')' décalage et aller à l'état 120 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 + ')' shift, and go to state 122 -état 80 +state 81 - 65 MkDictPair: String ':' . ExpD + 66 MkDictPair: String ':' . ExpD - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - ExpD aller à l'état 121 - Term aller à l'état 118 + ExpD go to state 123 + Term go to state 120 -état 81 +state 82 - 52 Term: '{' MkDict '}' . + 53 Term: '{' MkDict '}' . - $défaut réduction par utilisation de la règle 52 (Term) + $default reduce using rule 53 (Term) -état 82 +state 83 - 62 MkDict: MkDictPair ',' . MkDict + 63 MkDict: MkDictPair ',' . MkDict - error décalage et aller à l'état 115 - IDENT décalage et aller à l'état 30 - QQSTRING_START décalage et aller à l'état 5 - '(' décalage et aller à l'état 31 + error shift, and go to state 117 + IDENT shift, and go to state 30 + QQSTRING_START shift, and go to state 5 + '(' shift, and go to state 31 - '}' réduction par utilisation de la règle 60 (MkDict) + '}' reduce using rule 61 (MkDict) - String aller à l'état 32 - MkDict aller à l'état 122 - MkDictPair aller à l'état 34 + String go to state 32 + MkDict go to state 124 + MkDictPair go to state 34 -état 83 +state 84 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1665,23 +1702,25 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "==" erreur (non-associative) - "!=" erreur (non-associative) - "<=" erreur (non-associative) - ">=" erreur (non-associative) - '<' erreur (non-associative) - '>' erreur (non-associative) + "==" error (nonassociative) + "!=" error (nonassociative) + "<=" error (nonassociative) + ">=" error (nonassociative) + "contains" error (nonassociative) + '<' error (nonassociative) + '>' error (nonassociative) - $défaut réduction par utilisation de la règle 25 (Exp) + $default reduce using rule 25 (Exp) -état 84 +state 85 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1706,23 +1745,25 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "==" erreur (non-associative) - "!=" erreur (non-associative) - "<=" erreur (non-associative) - ">=" erreur (non-associative) - '<' erreur (non-associative) - '>' erreur (non-associative) + "==" error (nonassociative) + "!=" error (nonassociative) + "<=" error (nonassociative) + ">=" error (nonassociative) + "contains" error (nonassociative) + '<' error (nonassociative) + '>' error (nonassociative) - $défaut réduction par utilisation de la règle 26 (Exp) + $default reduce using rule 26 (Exp) -état 85 +state 86 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1747,32 +1788,34 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 12 (Exp) + $default reduce using rule 12 (Exp) -état 86 +state 87 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1797,22 +1840,24 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 11 (Exp) + $default reduce using rule 11 (Exp) -état 87 +state 88 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1837,23 +1882,25 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "and" décalage et aller à l'état 39 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "and" shift, and go to state 39 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 10 (Exp) + $default reduce using rule 10 (Exp) -état 88 +state 89 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1878,32 +1925,34 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "|=" erreur (non-associative) - "+=" erreur (non-associative) - "-=" erreur (non-associative) - "*=" erreur (non-associative) - "/=" erreur (non-associative) - "//=" erreur (non-associative) - '=' erreur (non-associative) + "|=" error (nonassociative) + "+=" error (nonassociative) + "-=" error (nonassociative) + "*=" error (nonassociative) + "/=" error (nonassociative) + "//=" error (nonassociative) + '=' error (nonassociative) - $défaut réduction par utilisation de la règle 14 (Exp) + $default reduce using rule 14 (Exp) -état 89 +state 90 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1928,32 +1977,34 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "|=" erreur (non-associative) - "+=" erreur (non-associative) - "-=" erreur (non-associative) - "*=" erreur (non-associative) - "/=" erreur (non-associative) - "//=" erreur (non-associative) - '=' erreur (non-associative) + "|=" error (nonassociative) + "+=" error (nonassociative) + "-=" error (nonassociative) + "*=" error (nonassociative) + "/=" error (nonassociative) + "//=" error (nonassociative) + '=' error (nonassociative) - $défaut réduction par utilisation de la règle 18 (Exp) + $default reduce using rule 18 (Exp) -état 90 +state 91 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -1978,32 +2029,34 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "|=" erreur (non-associative) - "+=" erreur (non-associative) - "-=" erreur (non-associative) - "*=" erreur (non-associative) - "/=" erreur (non-associative) - "//=" erreur (non-associative) - '=' erreur (non-associative) + "|=" error (nonassociative) + "+=" error (nonassociative) + "-=" error (nonassociative) + "*=" error (nonassociative) + "/=" error (nonassociative) + "//=" error (nonassociative) + '=' error (nonassociative) - $défaut réduction par utilisation de la règle 20 (Exp) + $default reduce using rule 20 (Exp) -état 91 +state 92 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2028,32 +2081,34 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "|=" erreur (non-associative) - "+=" erreur (non-associative) - "-=" erreur (non-associative) - "*=" erreur (non-associative) - "/=" erreur (non-associative) - "//=" erreur (non-associative) - '=' erreur (non-associative) + "|=" error (nonassociative) + "+=" error (nonassociative) + "-=" error (nonassociative) + "*=" error (nonassociative) + "/=" error (nonassociative) + "//=" error (nonassociative) + '=' error (nonassociative) - $défaut réduction par utilisation de la règle 22 (Exp) + $default reduce using rule 22 (Exp) -état 92 +state 93 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2078,32 +2133,34 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "|=" erreur (non-associative) - "+=" erreur (non-associative) - "-=" erreur (non-associative) - "*=" erreur (non-associative) - "/=" erreur (non-associative) - "//=" erreur (non-associative) - '=' erreur (non-associative) + "|=" error (nonassociative) + "+=" error (nonassociative) + "-=" error (nonassociative) + "*=" error (nonassociative) + "/=" error (nonassociative) + "//=" error (nonassociative) + '=' error (nonassociative) - $défaut réduction par utilisation de la règle 24 (Exp) + $default reduce using rule 24 (Exp) -état 93 +state 94 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2128,32 +2185,34 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "|=" erreur (non-associative) - "+=" erreur (non-associative) - "-=" erreur (non-associative) - "*=" erreur (non-associative) - "/=" erreur (non-associative) - "//=" erreur (non-associative) - '=' erreur (non-associative) + "|=" error (nonassociative) + "+=" error (nonassociative) + "-=" error (nonassociative) + "*=" error (nonassociative) + "/=" error (nonassociative) + "//=" error (nonassociative) + '=' error (nonassociative) - $défaut réduction par utilisation de la règle 13 (Exp) + $default reduce using rule 13 (Exp) -état 94 +state 95 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2178,23 +2237,25 @@ MkDictPair (61) 29 | Exp . "<=" Exp 29 | Exp "<=" Exp . 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "==" erreur (non-associative) - "!=" erreur (non-associative) - "<=" erreur (non-associative) - ">=" erreur (non-associative) - '<' erreur (non-associative) - '>' erreur (non-associative) + "==" error (nonassociative) + "!=" error (nonassociative) + "<=" error (nonassociative) + ">=" error (nonassociative) + "contains" error (nonassociative) + '<' error (nonassociative) + '>' error (nonassociative) - $défaut réduction par utilisation de la règle 29 (Exp) + $default reduce using rule 29 (Exp) -état 95 +state 96 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2219,23 +2280,68 @@ MkDictPair (61) 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp 30 | Exp ">=" Exp . + 31 | Exp . "contains" Exp - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "==" erreur (non-associative) - "!=" erreur (non-associative) - "<=" erreur (non-associative) - ">=" erreur (non-associative) - '<' erreur (non-associative) - '>' erreur (non-associative) + "==" error (nonassociative) + "!=" error (nonassociative) + "<=" error (nonassociative) + ">=" error (nonassociative) + "contains" error (nonassociative) + '<' error (nonassociative) + '>' error (nonassociative) - $défaut réduction par utilisation de la règle 30 (Exp) + $default reduce using rule 30 (Exp) -état 96 +state 97 + + 9 Exp: Exp . '=' Exp + 10 | Exp . "or" Exp + 11 | Exp . "and" Exp + 12 | Exp . "//" Exp + 13 | Exp . "//=" Exp + 14 | Exp . "|=" Exp + 15 | Exp . '|' Exp + 16 | Exp . ',' Exp + 17 | Exp . '+' Exp + 18 | Exp . "+=" Exp + 19 | Exp . '-' Exp + 20 | Exp . "-=" Exp + 21 | Exp . '*' Exp + 22 | Exp . "*=" Exp + 23 | Exp . '/' Exp + 24 | Exp . "/=" Exp + 25 | Exp . "==" Exp + 26 | Exp . "!=" Exp + 27 | Exp . '<' Exp + 28 | Exp . '>' Exp + 29 | Exp . "<=" Exp + 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp + 31 | Exp "contains" Exp . + + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 + + "==" error (nonassociative) + "!=" error (nonassociative) + "<=" error (nonassociative) + ">=" error (nonassociative) + "contains" error (nonassociative) + '<' error (nonassociative) + '>' error (nonassociative) + + $default reduce using rule 31 (Exp) + + +state 98 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2260,33 +2366,35 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 15 (Exp) + $default reduce using rule 15 (Exp) -état 97 +state 99 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2311,32 +2419,34 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 16 (Exp) + $default reduce using rule 16 (Exp) -état 98 +state 100 9 Exp: Exp . '=' Exp 9 | Exp '=' Exp . @@ -2361,32 +2471,34 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "|=" erreur (non-associative) - "+=" erreur (non-associative) - "-=" erreur (non-associative) - "*=" erreur (non-associative) - "/=" erreur (non-associative) - "//=" erreur (non-associative) - '=' erreur (non-associative) + "|=" error (nonassociative) + "+=" error (nonassociative) + "-=" error (nonassociative) + "*=" error (nonassociative) + "/=" error (nonassociative) + "//=" error (nonassociative) + '=' error (nonassociative) - $défaut réduction par utilisation de la règle 9 (Exp) + $default reduce using rule 9 (Exp) -état 99 +state 101 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2411,23 +2523,25 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "==" erreur (non-associative) - "!=" erreur (non-associative) - "<=" erreur (non-associative) - ">=" erreur (non-associative) - '<' erreur (non-associative) - '>' erreur (non-associative) + "==" error (nonassociative) + "!=" error (nonassociative) + "<=" error (nonassociative) + ">=" error (nonassociative) + "contains" error (nonassociative) + '<' error (nonassociative) + '>' error (nonassociative) - $défaut réduction par utilisation de la règle 27 (Exp) + $default reduce using rule 27 (Exp) -état 100 +state 102 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2452,23 +2566,25 @@ MkDictPair (61) 28 | Exp '>' Exp . 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - "==" erreur (non-associative) - "!=" erreur (non-associative) - "<=" erreur (non-associative) - ">=" erreur (non-associative) - '<' erreur (non-associative) - '>' erreur (non-associative) + "==" error (nonassociative) + "!=" error (nonassociative) + "<=" error (nonassociative) + ">=" error (nonassociative) + "contains" error (nonassociative) + '<' error (nonassociative) + '>' error (nonassociative) - $défaut réduction par utilisation de la règle 28 (Exp) + $default reduce using rule 28 (Exp) -état 101 +state 103 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2493,14 +2609,15 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 17 (Exp) + $default reduce using rule 17 (Exp) -état 102 +state 104 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2525,14 +2642,15 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 19 (Exp) + $default reduce using rule 19 (Exp) -état 103 +state 105 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2557,11 +2675,12 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - $défaut réduction par utilisation de la règle 21 (Exp) + $default reduce using rule 21 (Exp) -état 104 +state 106 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2586,39 +2705,40 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - $défaut réduction par utilisation de la règle 23 (Exp) + $default reduce using rule 23 (Exp) -état 105 +state 107 6 Exp: Term "as" '$' . IDENT '|' Exp - IDENT décalage et aller à l'état 123 + IDENT shift, and go to state 125 -état 106 +state 108 - 44 Term: Term '.' IDENT . + 45 Term: Term '.' IDENT . - $défaut réduction par utilisation de la règle 44 (Term) + $default reduce using rule 45 (Term) -état 107 +state 109 - 58 Term: Term '[' error . ']' + 59 Term: Term '[' error . ']' - ']' décalage et aller à l'état 124 + ']' shift, and go to state 126 -état 108 +state 110 - 47 Term: Term '[' ']' . + 48 Term: Term '[' ']' . - $défaut réduction par utilisation de la règle 47 (Term) + $default reduce using rule 48 (Term) -état 109 +state 111 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2642,41 +2762,43 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 46 Term: Term '[' Exp . ']' + 31 | Exp . "contains" Exp + 47 Term: Term '[' Exp . ']' - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 - ']' décalage et aller à l'état 125 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 + ']' shift, and go to state 127 -état 110 +state 112 - 55 Term: IDENT '(' Exp ')' . + 56 Term: IDENT '(' Exp ')' . - $défaut réduction par utilisation de la règle 55 (Term) + $default reduce using rule 56 (Term) -état 111 +state 113 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2700,41 +2822,43 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 34 FuncDef: "def" IDENT ':' Exp . ';' + 31 | Exp . "contains" Exp + 35 FuncDef: "def" IDENT ':' Exp . ';' - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - ';' décalage et aller à l'état 126 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + ';' shift, and go to state 128 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 -état 112 +state 114 - 35 FuncDef: "def" IDENT '(' IDENT . ')' ':' Exp ';' + 36 FuncDef: "def" IDENT '(' IDENT . ')' ':' Exp ';' - ')' décalage et aller à l'état 127 + ')' shift, and go to state 129 -état 113 +state 115 7 Exp: "if" Exp "then" Exp . ElseBody 9 | Exp . '=' Exp @@ -2759,36 +2883,38 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "else" décalage et aller à l'état 128 - "elif" décalage et aller à l'état 129 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "else" shift, and go to state 130 + "elif" shift, and go to state 131 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - ElseBody aller à l'état 130 + ElseBody go to state 132 -état 114 +state 116 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -2812,284 +2938,286 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 38 QQString: QQString QQSTRING_INTERP_START Exp . QQSTRING_INTERP_END + 31 | Exp . "contains" Exp + 39 QQString: QQString QQSTRING_INTERP_START Exp . QQSTRING_INTERP_END - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - QQSTRING_INTERP_END décalage et aller à l'état 131 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + QQSTRING_INTERP_END shift, and go to state 133 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 -état 115 +state 117 - 63 MkDict: error . ',' MkDict + 64 MkDict: error . ',' MkDict - ',' décalage et aller à l'état 75 + ',' shift, and go to state 76 -état 116 +state 118 - 63 MkDict: error ',' MkDict . + 64 MkDict: error ',' MkDict . - $défaut réduction par utilisation de la règle 63 (MkDict) + $default reduce using rule 64 (MkDict) -état 117 +state 119 - 41 ExpD: ExpD . '|' ExpD - 64 MkDictPair: IDENT ':' ExpD . + 42 ExpD: ExpD . '|' ExpD + 65 MkDictPair: IDENT ':' ExpD . - '|' décalage et aller à l'état 132 + '|' shift, and go to state 134 - $défaut réduction par utilisation de la règle 64 (MkDictPair) + $default reduce using rule 65 (MkDictPair) -état 118 +state 120 - 42 ExpD: Term . - 44 Term: Term . '.' IDENT - 46 | Term . '[' Exp ']' - 47 | Term . '[' ']' - 58 | Term . '[' error ']' + 43 ExpD: Term . + 45 Term: Term . '.' IDENT + 47 | Term . '[' Exp ']' + 48 | Term . '[' ']' + 59 | Term . '[' error ']' - '.' décalage et aller à l'état 61 - '[' décalage et aller à l'état 62 + '.' shift, and go to state 62 + '[' shift, and go to state 63 - $défaut réduction par utilisation de la règle 42 (ExpD) + $default reduce using rule 43 (ExpD) -état 119 +state 121 - 68 MkDictPair: '(' error ')' . ':' ExpD + 69 MkDictPair: '(' error ')' . ':' ExpD - ':' décalage et aller à l'état 133 + ':' shift, and go to state 135 -état 120 +state 122 - 67 MkDictPair: '(' Exp ')' . ':' ExpD + 68 MkDictPair: '(' Exp ')' . ':' ExpD - ':' décalage et aller à l'état 134 + ':' shift, and go to state 136 -état 121 +state 123 - 41 ExpD: ExpD . '|' ExpD - 65 MkDictPair: String ':' ExpD . + 42 ExpD: ExpD . '|' ExpD + 66 MkDictPair: String ':' ExpD . - '|' décalage et aller à l'état 132 + '|' shift, and go to state 134 - $défaut réduction par utilisation de la règle 65 (MkDictPair) + $default reduce using rule 66 (MkDictPair) -état 122 +state 124 - 62 MkDict: MkDictPair ',' MkDict . + 63 MkDict: MkDictPair ',' MkDict . - $défaut réduction par utilisation de la règle 62 (MkDict) + $default reduce using rule 63 (MkDict) -état 123 +state 125 6 Exp: Term "as" '$' IDENT . '|' Exp - '|' décalage et aller à l'état 135 + '|' shift, and go to state 137 -état 124 +state 126 - 58 Term: Term '[' error ']' . + 59 Term: Term '[' error ']' . - $défaut réduction par utilisation de la règle 58 (Term) + $default reduce using rule 59 (Term) -état 125 +state 127 - 46 Term: Term '[' Exp ']' . + 47 Term: Term '[' Exp ']' . - $défaut réduction par utilisation de la règle 46 (Term) + $default reduce using rule 47 (Term) -état 126 +state 128 - 34 FuncDef: "def" IDENT ':' Exp ';' . + 35 FuncDef: "def" IDENT ':' Exp ';' . - $défaut réduction par utilisation de la règle 34 (FuncDef) + $default reduce using rule 35 (FuncDef) -état 127 +state 129 - 35 FuncDef: "def" IDENT '(' IDENT ')' . ':' Exp ';' + 36 FuncDef: "def" IDENT '(' IDENT ')' . ':' Exp ';' - ':' décalage et aller à l'état 136 + ':' shift, and go to state 138 -état 128 +state 130 - 40 ElseBody: "else" . Exp "end" + 41 ElseBody: "else" . Exp "end" - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 137 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 139 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 129 +state 131 - 39 ElseBody: "elif" . Exp "then" Exp ElseBody + 40 ElseBody: "elif" . Exp "then" Exp ElseBody - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 138 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 140 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 130 +state 132 7 Exp: "if" Exp "then" Exp ElseBody . - $défaut réduction par utilisation de la règle 7 (Exp) + $default reduce using rule 7 (Exp) -état 131 +state 133 - 38 QQString: QQString QQSTRING_INTERP_START Exp QQSTRING_INTERP_END . + 39 QQString: QQString QQSTRING_INTERP_START Exp QQSTRING_INTERP_END . - $défaut réduction par utilisation de la règle 38 (QQString) + $default reduce using rule 39 (QQString) -état 132 +state 134 - 41 ExpD: ExpD '|' . ExpD + 42 ExpD: ExpD '|' . ExpD - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - ExpD aller à l'état 139 - Term aller à l'état 118 + ExpD go to state 141 + Term go to state 120 -état 133 +state 135 - 68 MkDictPair: '(' error ')' ':' . ExpD + 69 MkDictPair: '(' error ')' ':' . ExpD - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - ExpD aller à l'état 140 - Term aller à l'état 118 + ExpD go to state 142 + Term go to state 120 -état 134 +state 136 - 67 MkDictPair: '(' Exp ')' ':' . ExpD + 68 MkDictPair: '(' Exp ')' ':' . ExpD - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - ExpD aller à l'état 141 - Term aller à l'état 118 + ExpD go to state 143 + Term go to state 120 -état 135 +state 137 6 Exp: Term "as" '$' IDENT '|' . Exp - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 142 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 144 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 136 +state 138 - 35 FuncDef: "def" IDENT '(' IDENT ')' ':' . Exp ';' + 36 FuncDef: "def" IDENT '(' IDENT ')' ':' . Exp ';' - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 143 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 145 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 137 +state 139 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -3113,34 +3241,36 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 40 ElseBody: "else" Exp . "end" + 31 | Exp . "contains" Exp + 41 ElseBody: "else" Exp . "end" - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "end" décalage et aller à l'état 144 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "end" shift, and go to state 146 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 -état 138 +state 140 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -3164,62 +3294,64 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 39 ElseBody: "elif" Exp . "then" Exp ElseBody + 31 | Exp . "contains" Exp + 40 ElseBody: "elif" Exp . "then" Exp ElseBody - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "then" décalage et aller à l'état 145 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "then" shift, and go to state 147 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 -état 139 +state 141 - 41 ExpD: ExpD . '|' ExpD - 41 | ExpD '|' ExpD . + 42 ExpD: ExpD . '|' ExpD + 42 | ExpD '|' ExpD . - $défaut réduction par utilisation de la règle 41 (ExpD) + $default reduce using rule 42 (ExpD) -état 140 +state 142 - 41 ExpD: ExpD . '|' ExpD - 68 MkDictPair: '(' error ')' ':' ExpD . + 42 ExpD: ExpD . '|' ExpD + 69 MkDictPair: '(' error ')' ':' ExpD . - '|' décalage et aller à l'état 132 + '|' shift, and go to state 134 - $défaut réduction par utilisation de la règle 68 (MkDictPair) + $default reduce using rule 69 (MkDictPair) -état 141 +state 143 - 41 ExpD: ExpD . '|' ExpD - 67 MkDictPair: '(' Exp ')' ':' ExpD . + 42 ExpD: ExpD . '|' ExpD + 68 MkDictPair: '(' Exp ')' ':' ExpD . - '|' décalage et aller à l'état 132 + '|' shift, and go to state 134 - $défaut réduction par utilisation de la règle 67 (MkDictPair) + $default reduce using rule 68 (MkDictPair) -état 142 +state 144 6 Exp: Term "as" '$' IDENT '|' Exp . 9 | Exp . '=' Exp @@ -3244,33 +3376,35 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp + 31 | Exp . "contains" Exp - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - $défaut réduction par utilisation de la règle 6 (Exp) + $default reduce using rule 6 (Exp) -état 143 +state 145 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -3294,69 +3428,71 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 35 FuncDef: "def" IDENT '(' IDENT ')' ':' Exp . ';' + 31 | Exp . "contains" Exp + 36 FuncDef: "def" IDENT '(' IDENT ')' ':' Exp . ';' - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - ';' décalage et aller à l'état 146 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + ';' shift, and go to state 148 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 -état 144 +state 146 - 40 ElseBody: "else" Exp "end" . + 41 ElseBody: "else" Exp "end" . - $défaut réduction par utilisation de la règle 40 (ElseBody) + $default reduce using rule 41 (ElseBody) -état 145 +state 147 - 39 ElseBody: "elif" Exp "then" . Exp ElseBody + 40 ElseBody: "elif" Exp "then" . Exp ElseBody - IDENT décalage et aller à l'état 1 - LITERAL décalage et aller à l'état 2 - "def" décalage et aller à l'état 3 - "if" décalage et aller à l'état 4 - QQSTRING_START décalage et aller à l'état 5 - '$' décalage et aller à l'état 6 - '(' décalage et aller à l'état 7 - '.' décalage et aller à l'état 8 - '[' décalage et aller à l'état 9 - '{' décalage et aller à l'état 10 + IDENT shift, and go to state 1 + LITERAL shift, and go to state 2 + "def" shift, and go to state 3 + "if" shift, and go to state 4 + QQSTRING_START shift, and go to state 5 + '$' shift, and go to state 6 + '(' shift, and go to state 7 + '.' shift, and go to state 8 + '[' shift, and go to state 9 + '{' shift, and go to state 10 - Exp aller à l'état 147 - String aller à l'état 14 - FuncDef aller à l'état 20 - Term aller à l'état 16 + Exp go to state 149 + String go to state 14 + FuncDef go to state 20 + Term go to state 16 -état 146 +state 148 - 35 FuncDef: "def" IDENT '(' IDENT ')' ':' Exp ';' . + 36 FuncDef: "def" IDENT '(' IDENT ')' ':' Exp ';' . - $défaut réduction par utilisation de la règle 35 (FuncDef) + $default reduce using rule 36 (FuncDef) -état 147 +state 149 9 Exp: Exp . '=' Exp 10 | Exp . "or" Exp @@ -3380,38 +3516,40 @@ MkDictPair (61) 28 | Exp . '>' Exp 29 | Exp . "<=" Exp 30 | Exp . ">=" Exp - 39 ElseBody: "elif" Exp "then" Exp . ElseBody + 31 | Exp . "contains" Exp + 40 ElseBody: "elif" Exp "then" Exp . ElseBody - "==" décalage et aller à l'état 36 - "!=" décalage et aller à l'état 37 - "//" décalage et aller à l'état 38 - "else" décalage et aller à l'état 128 - "elif" décalage et aller à l'état 129 - "and" décalage et aller à l'état 39 - "or" décalage et aller à l'état 40 - "|=" décalage et aller à l'état 41 - "+=" décalage et aller à l'état 42 - "-=" décalage et aller à l'état 43 - "*=" décalage et aller à l'état 44 - "/=" décalage et aller à l'état 45 - "//=" décalage et aller à l'état 46 - "<=" décalage et aller à l'état 47 - ">=" décalage et aller à l'état 48 - '|' décalage et aller à l'état 49 - ',' décalage et aller à l'état 50 - '=' décalage et aller à l'état 51 - '<' décalage et aller à l'état 52 - '>' décalage et aller à l'état 53 - '+' décalage et aller à l'état 54 - '-' décalage et aller à l'état 55 - '*' décalage et aller à l'état 56 - '/' décalage et aller à l'état 57 + "==" shift, and go to state 36 + "!=" shift, and go to state 37 + "//" shift, and go to state 38 + "else" shift, and go to state 130 + "elif" shift, and go to state 131 + "and" shift, and go to state 39 + "or" shift, and go to state 40 + "|=" shift, and go to state 41 + "+=" shift, and go to state 42 + "-=" shift, and go to state 43 + "*=" shift, and go to state 44 + "/=" shift, and go to state 45 + "//=" shift, and go to state 46 + "<=" shift, and go to state 47 + ">=" shift, and go to state 48 + "contains" shift, and go to state 49 + '|' shift, and go to state 50 + ',' shift, and go to state 51 + '=' shift, and go to state 52 + '<' shift, and go to state 53 + '>' shift, and go to state 54 + '+' shift, and go to state 55 + '-' shift, and go to state 56 + '*' shift, and go to state 57 + '/' shift, and go to state 58 - ElseBody aller à l'état 148 + ElseBody go to state 150 -état 148 +state 150 - 39 ElseBody: "elif" Exp "then" Exp ElseBody . + 40 ElseBody: "elif" Exp "then" Exp ElseBody . - $défaut réduction par utilisation de la règle 39 (ElseBody) + $default reduce using rule 40 (ElseBody) diff --git a/parser.y b/parser.y index e2e591df..ddc41c5e 100644 --- a/parser.y +++ b/parser.y @@ -65,6 +65,7 @@ struct lexer_param; %token SETDEFINEDOR "//=" %token LESSEQ "<=" %token GREATEREQ ">=" +%token CONTAINS "contains" %token QQSTRING_START %token QQSTRING_TEXT @@ -80,7 +81,7 @@ struct lexer_param; %nonassoc '=' SETPIPE SETPLUS SETMINUS SETMULT SETDIV SETDEFINEDOR %left OR %left AND -%nonassoc NEQ EQ '<' '>' LESSEQ GREATEREQ +%nonassoc NEQ EQ '<' '>' LESSEQ GREATEREQ CONTAINS %left '+' '-' %left '*' '/' @@ -152,6 +153,7 @@ static block gen_binop(block a, block b, int op) { case '>': funcname = "_greater"; break; case LESSEQ: funcname = "_lesseq"; break; case GREATEREQ: funcname = "_greatereq"; break; + case CONTAINS: funcname = "_contains"; break; } assert(funcname); @@ -308,6 +310,10 @@ Exp ">=" Exp { $$ = gen_binop($1, $3, GREATEREQ); } | +Exp "contains" Exp { + $$ = gen_binop($1, $3, CONTAINS); +} | + String { $$ = $1; } | diff --git a/testdata b/testdata index 8cd5e27c..ce330112 100644 --- a/testdata +++ b/testdata @@ -395,3 +395,28 @@ def inc(x): x |= .+1; inc(.[].a) [{"foo":[1,2,{"bar":18},"world"]} == {"foo":[1,2,{"bar":18},"world"]},{"foo":[1,2,{"bar":18},"world"]} == {"foo":[1,2,{"bar":19},"world"]}] {} [true,false] + +# containment operator +["foo" contains "foo", "foobar" contains "foo", "foo" contains "foobar"] +{} +[true, true, false] + +[[] contains [], [1,2,3] contains [1,2], [1,2,3] contains [3,1], [1,2,3] contains [4], [1,2,3] contains [1,4]] +{} +[true, true, true, false, false] + +[["foobar", "foobaz"] contains ["baz", "bar"], ["foobar", "foobaz"] contains ["foo"], ["foobar", "foobaz"] contains ["blap"]] +{} +[true, true, false] + +[{foo: 12, bar:13} contains {foo: 12}, {foo: 12} contains {}, {foo: 12, bar:13} contains {baz:14}] +{} +[true, true, false] + +{foo: {baz: 12, blap: {bar: 13}}, bar: 14} contains {bar: 14, foo: {blap: {}}} +{} +true + +{foo: {baz: 12, blap: {bar: 13}}, bar: 14} contains {bar: 14, foo: {blap: {bar: 14}}} +{} +false \ No newline at end of file From ecc8998d38ddd7da5a7f8237b883dae74ffe38cb Mon Sep 17 00:00:00 2001 From: Stephen Roantree Date: Wed, 24 Oct 2012 18:29:33 -0700 Subject: [PATCH 2/3] Restructure contains methods to use public jv methods --- jv.c | 79 ++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/jv.c b/jv.c index 8515e7f4..45df882e 100644 --- a/jv.c +++ b/jv.c @@ -250,27 +250,6 @@ static int jvp_array_equal(jv_complex* a, jv_complex* b) { return 1; } -static int jvp_array_contains(jv_complex* a, jv_complex* b) { - int r = 1; - for (int bi = 0; bi < jvp_array_length(b); bi++) { - int ri = 0; - jv* bval = jvp_array_read(b, bi); - for (int ai = 0; ai < jvp_array_length(a); ai++) { - jv aval = jv_copy(*jvp_array_read(a, ai)); - jv bval_copy = jv_copy(*bval); - if (jv_contains(aval, bval_copy)) { - ri = 1; - break; - } - } - if (!ri) { - r = 0; - break; - } - } - return r; -} - static jv_complex jvp_array_slice(jv_complex* a, int start, int end) { // FIXME: maybe slice should reallocate if the slice is small enough assert(start <= end); @@ -350,6 +329,28 @@ jv jv_array_slice(jv a, int start, int end) { return a; } +int jv_array_contains(jv a, jv b) { + int r = 1; + int a_length = jv_array_length(jv_copy(a)); + int b_length = jv_array_length(jv_copy(b)); + for (int bi = 0; bi < b_length; bi++) { + int ri = 0; + for (int ai = 0; ai < a_length; ai++) { + if (jv_contains(jv_array_get(jv_copy(a), ai), jv_array_get(jv_copy(b), bi))) { + ri = 1; + break; + } + } + if (!ri) { + r = 0; + break; + } + } + jv_free(a); + jv_free(b); + return r; +} + /* * Strings (internal helpers) @@ -889,17 +890,33 @@ int jv_object_contains(jv a, jv b) { assert(jv_get_kind(b) == JV_KIND_OBJECT); int r = 1; - for (int i=0; istring) continue; - jv* slota = jvp_object_read(&a.val.complex, slotb->string); - if (!(slota && jv_get_kind(slotb->value) == jv_get_kind(*slota) - && jv_contains(jv_copy(*slota), jv_copy(slotb->value)))) { - r = 0; - break; - } + int nkeys = jv_object_length(jv_copy(b)); + jv* keys = malloc(sizeof(jv) * nkeys); + int kidx = 0; + jv_object_foreach(i, b) { + keys[kidx++] = jv_object_iter_key(b, i); } + for (int i=0; i < nkeys; i++) { + jv a_val = jv_object_get(jv_copy(a), jv_copy(keys[i])); + jv b_val = jv_object_get(jv_copy(b), jv_copy(keys[i])); + + if (!(jv_get_kind(a_val) == jv_get_kind(b_val) + && jv_contains(jv_copy(a_val), jv_copy(b_val)))) { + r = 0; + } + + jv_free(a_val); + jv_free(b_val); + + if (!r) break; + } + + for (int i=0; i < nkeys; i++) { + jv_free(keys[i]); + } + free(keys); + jv_free(a); jv_free(b); return r; @@ -1027,7 +1044,7 @@ int jv_contains(jv a, jv b) { } else if (jv_get_kind(a) == JV_KIND_OBJECT) { r = jv_object_contains(jv_copy(a), jv_copy(b)); } else if (jv_get_kind(a) == JV_KIND_ARRAY) { - r = jvp_array_contains(&a.val.complex, &b.val.complex); + r = jv_array_contains(jv_copy(a), jv_copy(b)); } else if (jv_get_kind(a) == JV_KIND_STRING) { r = strstr(jv_string_value(a), jv_string_value(b)) != 0; } else { From 1b556315afdafde27a935f711efe212d2d988842 Mon Sep 17 00:00:00 2001 From: Stephen Roantree Date: Thu, 25 Oct 2012 06:29:23 -0700 Subject: [PATCH 3/3] Remove redundant code from jv_object_contains --- jv.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/jv.c b/jv.c index 45df882e..77937a8d 100644 --- a/jv.c +++ b/jv.c @@ -890,33 +890,17 @@ int jv_object_contains(jv a, jv b) { assert(jv_get_kind(b) == JV_KIND_OBJECT); int r = 1; - int nkeys = jv_object_length(jv_copy(b)); - jv* keys = malloc(sizeof(jv) * nkeys); - int kidx = 0; jv_object_foreach(i, b) { - keys[kidx++] = jv_object_iter_key(b, i); - } + jv key = jv_object_iter_key(b, i); + jv a_val = jv_object_get(jv_copy(a), jv_copy(key)); + jv b_val = jv_object_get(jv_copy(b), jv_copy(key)); - for (int i=0; i < nkeys; i++) { - jv a_val = jv_object_get(jv_copy(a), jv_copy(keys[i])); - jv b_val = jv_object_get(jv_copy(b), jv_copy(keys[i])); - - if (!(jv_get_kind(a_val) == jv_get_kind(b_val) - && jv_contains(jv_copy(a_val), jv_copy(b_val)))) { - r = 0; - } - - jv_free(a_val); - jv_free(b_val); + r = jv_contains(a_val, b_val); + jv_free(key); if (!r) break; } - for (int i=0; i < nkeys; i++) { - jv_free(keys[i]); - } - free(keys); - jv_free(a); jv_free(b); return r;