From ad3b2073626ab72408fd9e2066785e549acbf5a4 Mon Sep 17 00:00:00 2001 From: chrisly42 Date: Mon, 26 Jul 2021 13:59:55 +0200 Subject: [PATCH] Added missing test for comparing expressions. Deleted unused generated file for Label-Implementation, noticed problem in inheritance hierarchy and removed base interface M68kLabel, too. --- .../plugins/m68k/parser/M68kParser.java | 7 +- .../plugins/m68k/psi/M68kGlobalLabel.java | 2 +- .../intellij/plugins/m68k/psi/M68kLabel.java | 6 -- .../plugins/m68k/psi/M68kLocalLabel.java | 2 +- .../m68k/psi/M68kPreprocessorDirective.java | 5 +- .../plugins/m68k/psi/M68kStatement.java | 5 +- .../intellij/plugins/m68k/psi/M68kTypes.java | 1 - .../plugins/m68k/psi/M68kVisitor.java | 10 +-- .../plugins/m68k/psi/impl/M68kLabelImpl.java | 27 ------ .../impl/M68kPreprocessorDirectiveImpl.java | 15 ++-- .../m68k/psi/impl/M68kStatementImpl.java | 10 ++- .../platon42/intellij/plugins/m68k/m68k.bnf | 4 +- .../plugins/m68k/parser/ExpressionsTest.kt | 5 ++ .../expressions/comparing_expressions.txt | 89 +++++++++++++++++++ 14 files changed, 126 insertions(+), 62 deletions(-) delete mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLabel.java delete mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLabelImpl.java create mode 100644 src/test/resources/parser/expressions/comparing_expressions.txt diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/parser/M68kParser.java b/src/main/gen/de/platon42/intellij/plugins/m68k/parser/M68kParser.java index 4c00a0a..cf369fc 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/parser/M68kParser.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/parser/M68kParser.java @@ -37,7 +37,6 @@ public class M68kParser implements PsiParser, LightPsiParser { } public static final TokenSet[] EXTENDS_SETS_ = new TokenSet[]{ - create_token_set_(GLOBAL_LABEL, LABEL, LOCAL_LABEL), create_token_set_(ADDRESS_REGISTER, DATA_REGISTER, REGISTER, SPECIAL_REGISTER), create_token_set_(ABSOLUTE_ADDRESS_ADDRESSING_MODE, ADDRESSING_MODE, ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_PRE_DEC_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE, @@ -567,14 +566,12 @@ public class M68kParser implements PsiParser, LightPsiParser { /* ********************************************************** */ // LocalLabel | GlobalLabel - public static boolean Label(PsiBuilder b, int l) { + static boolean Label(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Label")) return false; - if (!nextTokenIs(b, "