From 3aeb415974978f5baca83eb9eb641853fe91a703 Mon Sep 17 00:00:00 2001 From: chrisly42 Date: Sat, 31 Jul 2021 13:56:07 +0200 Subject: [PATCH] Massively reworked and extended ISA-Description class. Added inspection to validate the correctness of a MC68000 instruction regarding operation size and address modes. --- README.md | 3 +- build.gradle | 5 +- .../plugins/m68k/parser/M68kParser.java | 6 +- .../intellij/plugins/m68k/psi/M68kAsmOp.java | 6 + .../plugins/m68k/psi/M68kOperandSize.java | 2 + .../plugins/m68k/psi/impl/M68kAsmOpImpl.java | 12 + .../m68k/psi/impl/M68kOperandSizeImpl.java | 6 + .../intellij/plugins/m68k/asm/M68kIsa.kt | 623 +++++++++++++++--- .../AbstractBaseM68kLocalInspectionTool.kt | 44 ++ .../m68k/inspections/M68kSyntaxInspection.kt | 193 ++++++ .../platon42/intellij/plugins/m68k/m68k.bnf | 12 +- .../plugins/m68k/psi/M68kAddressModeUtil.kt | 29 + .../plugins/m68k/psi/M68kPsiImplUtil.kt | 21 +- src/main/resources/META-INF/plugin.xml | 3 + .../inspectionDescriptions/M68kSyntax.html | 14 + .../inspections/AbstractInspectionTest.kt | 18 + .../inspections/M68kSyntaxInspectionTest.kt | 99 +++ 17 files changed, 993 insertions(+), 103 deletions(-) create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/inspections/AbstractBaseM68kLocalInspectionTool.kt create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/inspections/M68kSyntaxInspection.kt create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kAddressModeUtil.kt create mode 100644 src/main/resources/inspectionDescriptions/M68kSyntax.html create mode 100644 src/test/java/de/platon42/intellij/plugins/m68k/inspections/AbstractInspectionTest.kt create mode 100644 src/test/java/de/platon42/intellij/plugins/m68k/inspections/M68kSyntaxInspectionTest.kt diff --git a/README.md b/README.md index 800375e..b29005a 100644 --- a/README.md +++ b/README.md @@ -71,12 +71,13 @@ make it work with JUnit 5. Feel free to use the code (in package ```de.platon42. ### V0.4 (unreleased) - Enhancement: Added Structure View filters. +- New: Added inspection to validate the correctness of a MC68000 instruction regarding operation size and address modes. ### V0.3 (28-Jul-21) - Enhancement: Macro contents are no longer parsed, added syntax highlighting options for macros. - Enhancement: Macro definitions are now word and stub indexed, macro calls reference to definition. -- Enhancement: Macro definition refactoring and find usages support. +- New: Macro definition refactoring and find usages support. - Enhancement: Structural View also shows macro definitions. - Bugfix: Missing REPT and ENDR assembler directives added. - Cosmetics: Changed or added some icons at various places. diff --git a/build.gradle b/build.gradle index bf3f918..dc80e7d 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ plugins { } group = 'de.platon42' -version = '0.3' +version = '0.4' sourceCompatibility = "1.8" targetCompatibility = "1.8" @@ -60,12 +60,13 @@ patchPluginXml {

V0.4 (unreleased)

V0.3 (28-Jul-21)