diff options
Diffstat (limited to 'tools/d2c/d2c_gram.y')
-rw-r--r-- | tools/d2c/d2c_gram.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/d2c/d2c_gram.y b/tools/d2c/d2c_gram.y index 5deb053..7195e21 100644 --- a/tools/d2c/d2c_gram.y +++ b/tools/d2c/d2c_gram.y @@ -142,7 +142,7 @@ struct action_tmp %token CONV EQ OP COMMA CP NOT EOR COLON -%token RULES IF EXPR_START EQUAL BINVAL EXPR_END AND THEN SEE +%token RULES IF EXPR_START EQUAL BINVAL IMMVAL EXPR_END AND THEN SEE UNPREDICTABLE %type <string> COPYRIGHT INS_NAME @@ -164,7 +164,7 @@ struct action_tmp %type <string> conv_arg_field %type <expr> rule_cond -%type <string> BINVAL +%type <string> BINVAL IMMVAL %type <tmpa> action @@ -258,10 +258,12 @@ rule : IF EXPR_START rule_cond EXPR_END THEN action { add_conditional_rule_to_coder(coder, $3, $6.action, $6.details); } rule_cond : NAME EQUAL BINVAL { $$ = build_simple_cond_expression($1, CCT_EQUAL, $3); } + | NAME EQUAL IMMVAL { $$ = build_simple_cond_expression($1, CCT_EQUAL, $3); } | EXPR_START rule_cond EXPR_END AND EXPR_START rule_cond EXPR_END { $$ = build_composed_cond_expression($2, COT_AND, $6); } action : SEE INS_DETAILS { $$.action = CAT_SEE; $$.details = $2; } + | UNPREDICTABLE { $$.action = CAT_UNPREDICTABLE; $$.details = NULL; } %% |