diff options
Diffstat (limited to 'lexer.c')
-rw-r--r-- | lexer.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -700,11 +700,12 @@ int get_expr_type(char **p, uint64_t address, void *val, int *found_reg, char st char *scope_name = NULL; switch (ptok) { - case PTOK_PLUS : type = EXPR_PLUS ; str++; break; - case PTOK_MINUS: type = EXPR_MINUS; str++; break; - case PTOK_PIPE : type = EXPR_OR ; str++; break; - case PTOK_GT : type = (get_ptok(str[1], dbg) == PTOK_GT) ? (EXPR_RSHFT) : (EXPR_LOW) ; str += 2; break; - case PTOK_LT : type = (get_ptok(str[1], dbg) == PTOK_LT) ? (EXPR_LSHFT) : (EXPR_HIGH); str += 2; break; + case PTOK_PLUS : type = EXPR_PLUS ; str++; break; + case PTOK_MINUS : type = EXPR_MINUS ; str++; break; + case PTOK_ASTRSK: type = EXPR_MUL ; str++; break; + case PTOK_PIPE : type = EXPR_OR ; str++; break; + case PTOK_GT : type = (get_ptok(str[1], dbg) == PTOK_GT) ? (EXPR_RSHFT) : (EXPR_LOW) ; str += 2; break; + case PTOK_LT : type = (get_ptok(str[1], dbg) == PTOK_LT) ? (EXPR_LSHFT) : (EXPR_HIGH); str += 2; break; case PTOK_DOLLAR: case PTOK_PERCENT: case PTOK_NUMBER: @@ -815,6 +816,7 @@ expr *parse_expr(char **line, uint64_t address, int *found_reg, int is_left, cha break; case EXPR_HIGH : case EXPR_LOW : expr_type = 1; break; + case EXPR_MUL : case EXPR_OR : case EXPR_LSHFT : case EXPR_RSHFT : expr_type = 2; break; @@ -1062,6 +1064,7 @@ uint64_t lex(char *str, uint64_t address, uint16_t bline, uint8_t dbg) { break; case PTOK_PLUS: case PTOK_MINUS: + case PTOK_ASTRSK: case PTOK_GT: case PTOK_LT: case PTOK_PIPE: |