'END' detection was breaking parsing, causing havoc.

This commit is contained in:
2021-09-25 17:20:45 +02:00
parent a03de6c394
commit c4051a0377
5 changed files with 14 additions and 10 deletions
@@ -871,11 +871,7 @@ public class _M68kLexer implements FlexLexer {
yybegin(ASMINSTR);
return MNEMONIC;
}
if (isEndDirective(yytext())) {
yybegin(YYINITIAL);
zzAtEOF = true;
return null;
}
//if(isEndDirective(yytext())) { yybegin(YYINITIAL); zzAtEOF = true; return null; }
if (isDataDirective(yytext())) {
startExpr(EXPR, EXPR_OP);
return DATA_DIRECTIVE;
@@ -117,7 +117,7 @@ PLAIN_MACRO_LINE=[^;\r\n]+
{DIRECTIVE_KEYWORD} {
if(isAsmMnemonicWithSize(yytext())) { yybegin(ASMINSTR); yypushback(2); return MNEMONIC; }
if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; }
if(isEndDirective(yytext())) { yybegin(YYINITIAL); zzAtEOF = true; return null; }
//if(isEndDirective(yytext())) { yybegin(YYINITIAL); zzAtEOF = true; return null; }
if(isDataDirective(yytext())) { startExpr(EXPR, EXPR_OP); return DATA_DIRECTIVE; }
if(isPlainDirective(yytext())) { yybegin(PLAINPARAMS); return OTHER_DIRECTIVE; }
if(isOtherDirective(yytext())) { startExpr(EXPR, EXPR_OP); return OTHER_DIRECTIVE; }