diff --git a/src/asm/asmy.y b/src/asm/asmy.y index e0eaeae6..945af5bd 100644 --- a/src/asm/asmy.y +++ b/src/asm/asmy.y @@ -555,7 +555,6 @@ static void strsubUTF8(char *dest, const char *src, uint32_t pos, uint32_t len) %left NEG /* negation -- unary minus */ %token T_LABEL -%token T_LOCAL_LABEL %type scoped_label %type scoped_label_bare %token T_ID @@ -671,12 +670,12 @@ line : label scoped_label_bare : T_LABEL { warning(WARNING_OBSOLETE, "Non-local labels without a colon are deprecated"); } - | T_LOCAL_LABEL + | T_LOCAL_ID ; scoped_label : T_LABEL ':' { strcpy($$, $1); } - | T_LOCAL_LABEL ':' { + | T_LOCAL_ID ':' { strcpy($$, $1); } ; diff --git a/src/asm/lexer.c b/src/asm/lexer.c index ac2fbd64..f8e86b49 100644 --- a/src/asm/lexer.c +++ b/src/asm/lexer.c @@ -905,12 +905,8 @@ scanagain: if (type == T_ID && strchr(yylval.tzSym, '.')) type = T_LOCAL_ID; - if (linestart) { - if (type == T_ID) - return T_LABEL; - if (type == T_LOCAL_ID) - return T_LOCAL_LABEL; - } + if (linestart && type == T_ID) + return T_LABEL; return type; }