From 9047c53a0ec77bdfa237f50b1520a0fa655c8106 Mon Sep 17 00:00:00 2001 From: chrisly42 Date: Wed, 14 Jul 2021 13:07:54 +0200 Subject: [PATCH] Intermediate commit for BNF and generated Parser and Lexer. --- build.gradle | 2 + .../plugins/m68k/lexer/_M68kLexer.java | 1124 ++++++++++++++ .../plugins/m68k/parser/M68kParser.java | 1330 +++++++++++++++++ .../M68kAbsoluteAddressAddressingMode.java | 15 + .../plugins/m68k/psi/M68kAddressRegister.java | 12 + ...8kAddressRegisterDirectAddressingMode.java | 11 + ...AddressRegisterIndirectAddressingMode.java | 11 + ...RegisterIndirectPostIncAddressingMode.java | 11 + ...sRegisterIndirectPreDecAddressingMode.java | 11 + ...rectWithDisplacementNewAddressingMode.java | 14 + ...rectWithDisplacementOldAddressingMode.java | 14 + ...terIndirectWithIndexNewAddressingMode.java | 21 + ...terIndirectWithIndexOldAddressingMode.java | 21 + .../plugins/m68k/psi/M68kAddressSize.java | 12 + .../plugins/m68k/psi/M68kAddressingMode.java | 8 + .../plugins/m68k/psi/M68kAsmInstruction.java | 19 + .../intellij/plugins/m68k/psi/M68kAsmOp.java | 16 + .../plugins/m68k/psi/M68kAsmOperands.java | 14 + .../plugins/m68k/psi/M68kAssignment.java | 19 + .../plugins/m68k/psi/M68kBinaryAddExpr.java | 13 + .../m68k/psi/M68kBinaryBitwiseAndExpr.java | 13 + .../m68k/psi/M68kBinaryBitwiseOrExpr.java | 13 + .../m68k/psi/M68kBinaryBitwiseXorExpr.java | 13 + .../plugins/m68k/psi/M68kBinaryCmpEqExpr.java | 13 + .../plugins/m68k/psi/M68kBinaryCmpGeExpr.java | 13 + .../plugins/m68k/psi/M68kBinaryCmpGtExpr.java | 13 + .../plugins/m68k/psi/M68kBinaryCmpLeExpr.java | 13 + .../plugins/m68k/psi/M68kBinaryCmpLtExpr.java | 13 + .../plugins/m68k/psi/M68kBinaryCmpNeExpr.java | 13 + .../plugins/m68k/psi/M68kBinaryDivExpr.java | 13 + .../m68k/psi/M68kBinaryLogicalAndExpr.java | 13 + .../m68k/psi/M68kBinaryLogicalOrExpr.java | 13 + .../plugins/m68k/psi/M68kBinaryModExpr.java | 13 + .../plugins/m68k/psi/M68kBinaryMulExpr.java | 13 + .../m68k/psi/M68kBinaryShiftLExpr.java | 13 + .../m68k/psi/M68kBinaryShiftRExpr.java | 13 + .../plugins/m68k/psi/M68kBinarySubExpr.java | 13 + .../plugins/m68k/psi/M68kDataRegister.java | 12 + .../M68kDataRegisterDirectAddressingMode.java | 11 + .../plugins/m68k/psi/M68kDataWidth.java | 12 + .../intellij/plugins/m68k/psi/M68kExpr.java | 8 + .../plugins/m68k/psi/M68kGlobalLabel.java | 16 + .../plugins/m68k/psi/M68kImmediateData.java | 11 + .../intellij/plugins/m68k/psi/M68kLabel.java | 15 + .../plugins/m68k/psi/M68kLiteralExpr.java | 24 + .../plugins/m68k/psi/M68kLocalLabel.java | 16 + .../plugins/m68k/psi/M68kMacroCall.java | 17 + .../plugins/m68k/psi/M68kOperandSize.java | 15 + .../plugins/m68k/psi/M68kParenExpr.java | 11 + .../m68k/psi/M68kPreprocessorDirective.java | 63 + ...rectWithDisplacementNewAddressingMode.java | 15 + ...rectWithDisplacementOldAddressingMode.java | 15 + ...terIndirectWithIndexNewAddressingMode.java | 22 + ...terIndirectWithIndexOldAddressingMode.java | 22 + .../plugins/m68k/psi/M68kRefExpr.java | 12 + .../plugins/m68k/psi/M68kRegister.java | 8 + .../plugins/m68k/psi/M68kSpecialRegister.java | 21 + ...8kSpecialRegisterDirectAddressingMode.java | 11 + .../plugins/m68k/psi/M68kStatement.java | 21 + .../intellij/plugins/m68k/psi/M68kTypes.java | 215 +++ .../plugins/m68k/psi/M68kUnaryComplExpr.java | 11 + .../plugins/m68k/psi/M68kUnaryMinusExpr.java | 11 + .../plugins/m68k/psi/M68kUnaryNotExpr.java | 11 + .../plugins/m68k/psi/M68kUnaryPlusExpr.java | 11 + .../plugins/m68k/psi/M68kVisitor.java | 254 ++++ ...M68kAbsoluteAddressAddressingModeImpl.java | 42 + ...dressRegisterDirectAddressingModeImpl.java | 34 + .../psi/impl/M68kAddressRegisterImpl.java | 36 + ...essRegisterIndirectAddressingModeImpl.java | 34 + ...sterIndirectPostIncAddressingModeImpl.java | 34 + ...isterIndirectPreDecAddressingModeImpl.java | 34 + ...WithDisplacementNewAddressingModeImpl.java | 41 + ...WithDisplacementOldAddressingModeImpl.java | 41 + ...ndirectWithIndexNewAddressingModeImpl.java | 51 + ...ndirectWithIndexOldAddressingModeImpl.java | 51 + .../m68k/psi/impl/M68kAddressSizeImpl.java | 36 + .../m68k/psi/impl/M68kAddressingModeImpl.java | 27 + .../m68k/psi/impl/M68kAsmInstructionImpl.java | 51 + .../plugins/m68k/psi/impl/M68kAsmOpImpl.java | 44 + .../m68k/psi/impl/M68kAsmOperandsImpl.java | 37 + .../m68k/psi/impl/M68kAssignmentImpl.java | 51 + .../m68k/psi/impl/M68kBinaryAddExprImpl.java | 37 + .../impl/M68kBinaryBitwiseAndExprImpl.java | 37 + .../psi/impl/M68kBinaryBitwiseOrExprImpl.java | 37 + .../impl/M68kBinaryBitwiseXorExprImpl.java | 37 + .../psi/impl/M68kBinaryCmpEqExprImpl.java | 37 + .../psi/impl/M68kBinaryCmpGeExprImpl.java | 37 + .../psi/impl/M68kBinaryCmpGtExprImpl.java | 37 + .../psi/impl/M68kBinaryCmpLeExprImpl.java | 37 + .../psi/impl/M68kBinaryCmpLtExprImpl.java | 37 + .../psi/impl/M68kBinaryCmpNeExprImpl.java | 37 + .../m68k/psi/impl/M68kBinaryDivExprImpl.java | 37 + .../impl/M68kBinaryLogicalAndExprImpl.java | 37 + .../psi/impl/M68kBinaryLogicalOrExprImpl.java | 37 + .../m68k/psi/impl/M68kBinaryModExprImpl.java | 37 + .../m68k/psi/impl/M68kBinaryMulExprImpl.java | 37 + .../psi/impl/M68kBinaryShiftLExprImpl.java | 37 + .../psi/impl/M68kBinaryShiftRExprImpl.java | 37 + .../m68k/psi/impl/M68kBinarySubExprImpl.java | 37 + ...kDataRegisterDirectAddressingModeImpl.java | 34 + .../m68k/psi/impl/M68kDataRegisterImpl.java | 36 + .../m68k/psi/impl/M68kDataWidthImpl.java | 36 + .../plugins/m68k/psi/impl/M68kExprImpl.java | 27 + .../m68k/psi/impl/M68kGlobalLabelImpl.java | 44 + .../m68k/psi/impl/M68kImmediateDataImpl.java | 34 + .../plugins/m68k/psi/impl/M68kLabelImpl.java | 42 + .../m68k/psi/impl/M68kLiteralExprImpl.java | 61 + .../m68k/psi/impl/M68kLocalLabelImpl.java | 44 + .../m68k/psi/impl/M68kMacroCallImpl.java | 46 + .../m68k/psi/impl/M68kOperandSizeImpl.java | 44 + .../m68k/psi/impl/M68kParenExprImpl.java | 35 + .../impl/M68kPreprocessorDirectiveImpl.java | 137 ++ ...WithDisplacementNewAddressingModeImpl.java | 43 + ...WithDisplacementOldAddressingModeImpl.java | 43 + ...ndirectWithIndexNewAddressingModeImpl.java | 54 + ...ndirectWithIndexOldAddressingModeImpl.java | 54 + .../m68k/psi/impl/M68kRefExprImpl.java | 36 + .../m68k/psi/impl/M68kRegisterImpl.java | 27 + ...ecialRegisterDirectAddressingModeImpl.java | 34 + .../psi/impl/M68kSpecialRegisterImpl.java | 55 + .../m68k/psi/impl/M68kStatementImpl.java | 54 + .../m68k/psi/impl/M68kUnaryComplExprImpl.java | 35 + .../m68k/psi/impl/M68kUnaryMinusExprImpl.java | 35 + .../m68k/psi/impl/M68kUnaryNotExprImpl.java | 35 + .../m68k/psi/impl/M68kUnaryPlusExprImpl.java | 35 + .../plugins/m68k/M68kFileElementType.java | 36 + .../intellij/plugins/m68k/M68kFileType.kt | 2 +- .../intellij/plugins/m68k/M68kMnemonics.kt | 6 + .../intellij/plugins/m68k/lexer/M68kLexer.kt | 5 + .../plugins/m68k/lexer/_M68kLexer.flex | 135 ++ .../platon42/intellij/plugins/m68k/m68k.bnf | 278 ++++ .../m68k/parser/M68kParserDefinition.java | 66 + .../m68k/parser/M68kParserUtilBase.java | 22 + .../intellij/plugins/m68k/psi/M68kFile.kt | 15 + .../plugins/m68k/stubs/M68kFileStub.kt | 6 + src/main/resources/META-INF/plugin.xml | 4 +- 136 files changed, 6853 insertions(+), 2 deletions(-) create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/parser/M68kParser.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAbsoluteAddressAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressRegister.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressRegisterDirectAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressRegisterIndirectAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressRegisterIndirectPostIncAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressRegisterIndirectPreDecAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressRegisterIndirectWithDisplacementNewAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressRegisterIndirectWithDisplacementOldAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressRegisterIndirectWithIndexNewAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressRegisterIndirectWithIndexOldAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressSize.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmInstruction.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmOp.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmOperands.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAssignment.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryAddExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryBitwiseAndExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryBitwiseOrExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryBitwiseXorExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryCmpEqExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryCmpGeExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryCmpGtExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryCmpLeExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryCmpLtExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryCmpNeExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryDivExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryLogicalAndExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryLogicalOrExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryModExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryMulExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryShiftLExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinaryShiftRExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kBinarySubExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kDataRegister.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kDataRegisterDirectAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kDataWidth.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabel.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kImmediateData.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLabel.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLiteralExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLocalLabel.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMacroCall.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kOperandSize.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kParenExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kPreprocessorDirective.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterIndirectWithDisplacementNewAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterIndirectWithDisplacementOldAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterIndirectWithIndexNewAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterIndirectWithIndexOldAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kRefExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kRegister.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kSpecialRegister.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kSpecialRegisterDirectAddressingMode.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kStatement.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kUnaryComplExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kUnaryMinusExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kUnaryNotExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kUnaryPlusExpr.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAbsoluteAddressAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterDirectAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPostIncAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectPreDecAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressSizeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmInstructionImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmOpImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmOperandsImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAssignmentImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryAddExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryBitwiseAndExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryBitwiseOrExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryBitwiseXorExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryCmpEqExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryCmpGeExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryCmpGtExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryCmpLeExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryCmpLtExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryCmpNeExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryDivExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryLogicalAndExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryLogicalOrExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryModExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryMulExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryShiftLExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinaryShiftRExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kBinarySubExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kDataRegisterDirectAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kDataRegisterImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kDataWidthImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kGlobalLabelImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kImmediateDataImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLabelImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLiteralExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLocalLabelImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMacroCallImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kOperandSizeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kParenExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kPreprocessorDirectiveImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexNewAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterIndirectWithIndexOldAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kRefExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kRegisterImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kSpecialRegisterDirectAddressingModeImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kSpecialRegisterImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kStatementImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryComplExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryMinusExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryNotExprImpl.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kUnaryPlusExprImpl.java create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/M68kFileElementType.java create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/M68kMnemonics.kt create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/lexer/M68kLexer.kt create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.flex create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/parser/M68kParserDefinition.java create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/parser/M68kParserUtilBase.java create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kFile.kt create mode 100644 src/main/java/de/platon42/intellij/plugins/m68k/stubs/M68kFileStub.kt diff --git a/build.gradle b/build.gradle index c6fbe1a..1f97557 100644 --- a/build.gradle +++ b/build.gradle @@ -53,6 +53,8 @@ patchPluginXml { """ } +sourceSets.main.java.srcDirs 'src/main/gen' + test { useJUnitPlatform() testLogging { diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java b/src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java new file mode 100644 index 0000000..35bfad5 --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java @@ -0,0 +1,1124 @@ +/* The following code was generated by JFlex 1.7.0 tweaked for IntelliJ platform */ + +package de.platon42.intellij.plugins.m68k.lexer; + +import com.intellij.lexer.FlexLexer; +import com.intellij.psi.tree.IElementType; + +import static com.intellij.psi.TokenType.BAD_CHARACTER; +import static com.intellij.psi.TokenType.WHITE_SPACE; +import static de.platon42.intellij.plugins.m68k.psi.M68kTypes.*; + + +/** + * This class is a scanner generated by + * JFlex 1.7.0 + * from the specification file _M68kLexer.flex + */ +public class _M68kLexer implements FlexLexer { + + /** + * This character denotes the end of file + */ + public static final int YYEOF = -1; + + /** + * initial size of the lookahead buffer + */ + private static final int ZZ_BUFFERSIZE = 16384; + + /** + * lexical states + */ + public static final int YYINITIAL = 0; + + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l + * at the beginning of a line + * l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0 + }; + + /** + * Translates characters to character classes + * Chosen bits are [11, 6, 4] + * Total runtime size is 14432 bytes + */ + public static int ZZ_CMAP(int ch) { + return ZZ_CMAP_A[(ZZ_CMAP_Y[(ZZ_CMAP_Z[ch >> 10] << 6) | ((ch >> 4) & 0x3f)] << 4) | (ch & 0xf)]; + } + + /* The ZZ_CMAP_Z table has 1088 entries */ + static final char ZZ_CMAP_Z[] = zzUnpackCMap( + "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\2\11\1\12\1\13\6\14\1\15\23\14\1\16" + + "\1\14\1\17\1\20\12\14\1\21\10\11\1\22\1\23\1\24\1\25\1\26\1\27\1\30\1\31\1" + + "\32\1\33\1\34\1\35\2\11\1\14\1\36\3\11\1\37\10\11\1\40\1\41\5\14\1\42\1\43" + + "\11\11\1\44\2\11\1\45\5\11\1\46\4\11\1\47\1\50\4\11\51\14\1\51\3\14\1\52\1" + + "\53\4\14\1\54\12\11\1\55\u0381\11"); + + /* The ZZ_CMAP_Y table has 2944 entries */ + static final char ZZ_CMAP_Y[] = zzUnpackCMap( + "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\1\1\11\1\12\1\13\1\14\1\13\1\14\34" + + "\13\1\15\1\16\1\17\10\1\1\20\1\21\1\13\1\22\4\13\1\23\10\13\1\24\12\13\1\25" + + "\1\13\1\26\1\25\1\13\1\27\4\1\1\13\1\30\1\31\2\1\2\13\1\30\1\1\1\32\1\25\5" + + "\13\1\33\1\34\1\35\1\1\1\36\1\13\1\1\1\37\5\13\1\40\1\41\1\42\1\13\1\30\1" + + "\43\1\13\1\44\1\45\1\1\1\13\1\46\4\1\1\13\1\47\4\1\1\50\2\13\1\51\1\1\1\52" + + "\1\53\1\25\1\54\1\55\1\56\1\57\1\60\1\61\1\53\1\16\1\62\1\55\1\56\1\63\1\1" + + "\1\64\1\65\1\66\1\67\1\22\1\56\1\70\1\1\1\71\1\53\1\72\1\73\1\55\1\56\1\70" + + "\1\1\1\61\1\53\1\41\1\74\1\75\1\76\1\77\1\1\1\71\1\65\1\1\1\100\1\36\1\56" + + "\1\51\1\1\1\101\1\53\1\1\1\102\1\36\1\56\1\103\1\1\1\60\1\53\1\104\1\100\1" + + "\36\1\13\1\105\1\60\1\106\1\53\1\107\1\110\1\111\1\13\1\112\1\113\1\1\1\65" + + "\1\1\1\25\2\13\1\114\1\113\1\115\2\1\1\116\1\117\1\120\1\121\1\122\1\123\2" + + "\1\1\71\1\1\1\115\1\1\1\124\1\13\1\125\1\1\1\126\7\1\2\13\1\30\1\127\1\115" + + "\1\130\1\131\1\132\1\133\1\115\2\13\1\134\2\13\1\135\24\13\1\136\1\137\2\13" + + "\1\136\2\13\1\140\1\141\1\14\3\13\1\141\3\13\1\30\2\1\1\13\1\1\5\13\1\142" + + "\1\25\45\13\1\143\1\13\1\144\1\30\4\13\1\30\1\145\1\146\1\16\1\13\1\16\1\13" + + "\1\16\1\146\1\71\3\13\1\147\1\1\1\150\1\115\2\1\1\115\5\13\1\27\1\151\1\13" + + "\1\152\4\13\1\40\1\13\1\153\2\1\1\65\1\13\1\154\1\155\2\13\1\156\1\13\1\77" + + "\1\115\2\1\1\13\1\113\3\13\1\155\2\1\2\115\1\157\5\1\1\110\2\13\1\147\1\160" + + "\1\115\2\1\1\161\1\13\1\162\1\42\2\13\1\40\1\1\2\13\1\147\1\1\1\163\1\42\1" + + "\13\1\154\1\46\5\1\1\164\1\165\14\13\4\1\21\13\1\142\2\13\1\142\1\166\1\13" + + "\1\154\3\13\1\167\1\170\1\171\1\125\1\170\1\172\1\1\1\173\2\1\1\174\1\1\1" + + "\175\1\1\1\125\6\1\1\176\1\177\1\200\1\201\1\202\3\1\1\203\147\1\2\13\1\153" + + "\2\13\1\153\10\13\1\204\1\205\2\13\1\134\3\13\1\206\1\1\1\13\1\113\4\207\4" + + "\1\1\127\35\1\1\210\2\1\1\211\1\25\4\13\1\212\1\25\4\13\1\135\1\110\1\13\1" + + "\154\1\25\4\13\1\153\1\1\1\13\1\30\3\1\1\13\40\1\133\13\1\40\4\1\135\13\1" + + "\40\2\1\10\13\1\125\4\1\2\13\1\154\20\13\1\125\1\13\1\213\1\1\2\13\1\153\1" + + "\127\1\13\1\154\4\13\1\40\2\1\1\214\1\215\5\13\1\216\1\13\1\153\1\27\3\1\1" + + "\214\1\217\1\13\1\31\1\1\3\13\1\147\1\215\2\13\1\147\1\1\1\115\1\1\1\220\1" + + "\42\1\13\1\40\1\13\1\113\1\1\1\13\1\125\1\50\2\13\1\31\1\127\1\115\1\221\1" + + "\222\2\13\1\46\1\1\1\223\1\115\1\13\1\224\3\13\1\225\1\226\1\227\1\30\1\66" + + "\1\230\1\231\1\207\2\13\1\135\1\40\7\13\1\31\1\115\72\13\1\147\1\13\1\232" + + "\2\13\1\156\20\1\26\13\1\154\6\13\1\77\2\1\1\113\1\233\1\56\1\234\1\235\6" + + "\13\1\16\1\1\1\161\25\13\1\154\1\1\4\13\1\215\2\13\1\27\2\1\1\156\7\1\1\221" + + "\7\13\1\125\1\1\1\115\1\25\1\30\1\25\1\30\1\236\4\13\1\153\1\237\1\240\2\1" + + "\1\241\1\13\1\14\1\242\2\154\2\1\7\13\1\30\30\1\1\13\1\125\3\13\1\71\2\1\2" + + "\13\1\1\1\13\1\243\2\13\1\40\1\13\1\154\2\13\1\244\3\1\11\13\1\154\1\115\2" + + "\13\1\244\1\13\1\156\2\13\1\27\3\13\1\147\11\1\23\13\1\113\1\13\1\40\1\27" + + "\11\1\1\245\2\13\1\246\1\13\1\40\1\13\1\113\1\13\1\153\4\1\1\13\1\247\1\13" + + "\1\40\1\13\1\77\4\1\3\13\1\250\4\1\1\71\1\251\1\13\1\147\2\1\1\13\1\125\1" + + "\13\1\125\2\1\1\124\1\13\1\155\1\1\3\13\1\40\1\13\1\40\1\13\1\31\1\13\1\16" + + "\6\1\4\13\1\46\3\1\3\13\1\31\3\13\1\31\60\1\1\161\2\13\1\27\2\1\1\65\1\1\1" + + "\161\2\13\2\1\1\13\1\46\1\115\1\161\1\13\1\113\1\65\1\1\2\13\1\252\1\161\2" + + "\13\1\31\1\253\1\254\2\1\1\13\1\22\1\156\5\1\1\255\1\256\1\46\2\13\1\153\1" + + "\1\1\115\1\73\1\55\1\56\1\70\1\1\1\257\1\16\11\1\3\13\1\155\1\260\1\115\2" + + "\1\3\13\1\1\1\261\1\115\12\1\2\13\1\153\2\1\1\262\2\1\3\13\1\1\1\263\1\115" + + "\2\1\2\13\1\30\1\1\1\115\3\1\1\13\1\77\1\1\1\115\26\1\4\13\1\115\1\127\34" + + "\1\3\13\1\46\20\1\1\56\1\13\1\153\1\1\1\71\1\115\1\1\1\215\1\13\67\1\71\13" + + "\1\77\16\1\14\13\1\147\53\1\2\13\1\153\75\1\44\13\1\113\33\1\43\13\1\46\1" + + "\13\1\153\1\115\6\1\1\13\1\154\1\1\3\13\1\1\1\147\1\115\1\161\1\264\1\13\67" + + "\1\4\13\1\155\1\71\3\1\1\161\4\1\1\71\1\1\76\13\1\125\1\1\57\13\1\31\20\1" + + "\1\16\77\1\6\13\1\30\1\125\1\46\1\77\66\1\5\13\1\221\3\13\1\146\1\265\1\266" + + "\1\267\3\13\1\270\1\271\1\13\1\272\1\273\1\36\24\13\1\274\1\13\1\36\1\135" + + "\1\13\1\135\1\13\1\221\1\13\1\221\1\153\1\13\1\153\1\13\1\56\1\13\1\56\1\13" + + "\1\275\3\276\14\13\1\155\3\1\4\13\1\147\1\115\112\1\1\267\1\13\1\277\1\300" + + "\1\301\1\302\1\303\1\304\1\305\1\156\1\306\1\156\24\1\55\13\1\113\2\1\103" + + "\13\1\155\15\13\1\154\150\13\1\16\25\1\41\13\1\154\36\1"); + + /* The ZZ_CMAP_A table has 3184 entries */ + static final char ZZ_CMAP_A[] = zzUnpackCMap( + "\11\0\1\4\1\2\2\1\1\3\22\0\1\4\1\64\1\47\1\62\1\41\1\37\1\71\1\46\1\57\1\60" + + "\1\52\1\66\1\61\1\67\1\35\1\70\2\40\6\30\2\42\1\53\1\54\1\50\1\63\1\51\1\0" + + "\1\43\1\26\1\22\1\12\1\21\1\5\1\23\2\24\1\17\2\24\1\20\1\25\1\11\1\13\1\14" + + "\1\6\1\27\1\15\1\16\1\7\1\10\1\36\3\24\1\55\1\45\1\56\1\73\1\33\1\44\1\26" + + "\1\22\1\12\1\21\1\5\1\23\2\24\1\17\2\24\1\20\1\25\1\11\1\13\1\32\1\6\1\27" + + "\1\31\1\16\1\7\1\10\1\36\3\24\1\0\1\72\1\0\1\65\6\0\1\1\12\0\1\4\11\0\1\24" + + "\12\0\1\24\4\0\1\24\5\0\27\24\1\0\12\24\4\0\14\24\16\0\5\24\7\0\1\24\1\0\1" + + "\24\1\0\5\24\1\0\2\24\2\0\4\24\1\0\1\24\6\0\1\24\1\0\3\24\1\0\1\24\1\0\4\24" + + "\1\0\23\24\1\0\13\24\10\0\6\24\1\0\26\24\2\0\1\24\6\0\10\24\10\0\13\24\5\0" + + "\3\24\15\0\12\34\4\0\6\24\1\0\1\24\17\0\2\24\7\0\2\24\12\34\3\24\2\0\2\24" + + "\1\0\16\24\15\0\11\24\13\0\1\24\16\0\12\34\6\24\4\0\2\24\4\0\1\24\5\0\6\24" + + "\4\0\1\24\11\0\1\24\3\0\1\24\7\0\11\24\7\0\5\24\1\0\10\24\6\0\26\24\3\0\1" + + "\24\2\0\1\24\7\0\12\24\4\0\12\34\1\24\4\0\10\24\2\0\2\24\2\0\26\24\1\0\7\24" + + "\1\0\1\24\3\0\4\24\3\0\1\24\20\0\1\24\15\0\2\24\1\0\1\24\5\0\6\24\4\0\2\24" + + "\1\0\2\24\1\0\2\24\1\0\2\24\17\0\4\24\1\0\1\24\7\0\12\34\2\0\3\24\20\0\11" + + "\24\1\0\2\24\1\0\2\24\1\0\5\24\3\0\1\24\2\0\1\24\30\0\1\24\13\0\10\24\2\0" + + "\1\24\3\0\1\24\1\0\6\24\3\0\3\24\1\0\4\24\3\0\2\24\1\0\1\24\1\0\2\24\3\0\2" + + "\24\3\0\3\24\3\0\14\24\13\0\10\24\1\0\2\24\10\0\3\24\5\0\1\24\4\0\10\24\1" + + "\0\6\24\1\0\5\24\3\0\1\24\3\0\2\24\15\0\13\24\2\0\1\24\6\0\3\24\10\0\1\24" + + "\12\0\6\24\5\0\22\24\3\0\10\24\1\0\11\24\1\0\1\24\2\0\7\24\11\0\1\24\1\0\2" + + "\24\14\0\12\34\7\0\2\24\1\0\1\24\2\0\2\24\1\0\1\24\2\0\1\24\6\0\4\24\1\0\7" + + "\24\1\0\3\24\1\0\1\24\1\0\1\24\2\0\2\24\1\0\4\24\1\0\2\24\11\0\1\24\2\0\5" + + "\24\1\0\1\24\11\0\12\34\2\0\14\24\1\0\24\24\13\0\5\24\22\0\7\24\4\0\4\24\3" + + "\0\1\24\3\0\2\24\7\0\3\24\4\0\15\24\14\0\1\24\1\0\6\24\1\0\1\24\5\0\1\24\2" + + "\0\13\24\1\0\15\24\1\0\4\24\2\0\7\24\1\0\1\24\1\0\4\24\2\0\1\24\1\0\4\24\2" + + "\0\7\24\1\0\1\24\1\0\4\24\2\0\16\24\2\0\6\24\2\0\15\24\2\0\1\24\1\4\17\24" + + "\1\0\10\24\7\0\15\24\1\0\6\24\23\0\1\24\4\0\1\24\3\0\5\24\2\0\22\24\1\0\1" + + "\24\5\0\17\24\1\0\16\24\2\0\5\24\13\0\14\24\13\0\1\24\15\0\7\24\7\0\16\24" + + "\15\0\2\24\12\34\3\0\3\24\11\0\4\24\1\0\4\24\3\0\2\24\11\0\10\24\1\0\1\24" + + "\1\0\1\24\1\0\1\24\1\0\6\24\1\0\7\24\1\0\1\24\3\0\3\24\1\0\7\24\3\0\4\24\2" + + "\0\6\24\4\0\13\4\15\0\2\1\5\0\1\4\17\0\1\4\1\0\1\24\15\0\1\24\2\0\1\24\4\0" + + "\1\24\2\0\12\24\1\0\1\24\3\0\5\24\6\0\1\24\1\0\1\24\1\0\1\24\1\0\4\24\1\0" + + "\13\24\2\0\4\24\5\0\5\24\4\0\1\24\4\0\2\24\13\0\5\24\6\0\4\24\3\0\2\24\14" + + "\0\10\24\7\0\10\24\1\0\7\24\1\0\1\4\4\0\2\24\12\0\5\24\5\0\2\24\3\0\7\24\6" + + "\0\3\24\12\34\2\24\13\0\11\24\2\0\27\24\2\0\7\24\1\0\3\24\1\0\4\24\1\0\4\24" + + "\2\0\6\24\3\0\1\24\1\0\1\24\2\0\5\24\1\0\12\24\12\34\5\24\1\0\3\24\1\0\10" + + "\24\4\0\7\24\3\0\1\24\3\0\2\24\1\0\1\24\3\0\2\24\2\0\5\24\2\0\1\24\1\0\1\24" + + "\30\0\3\24\3\0\6\24\2\0\6\24\2\0\6\24\11\0\7\24\4\0\5\24\3\0\5\24\5\0\1\24" + + "\1\0\10\24\1\0\5\24\1\0\1\24\1\0\2\24\1\0\2\24\1\0\12\24\6\0\12\24\2\0\6\24" + + "\2\0\6\24\2\0\6\24\2\0\3\24\3\0\14\24\1\0\16\24\1\0\2\24\1\0\2\24\1\0\10\24" + + "\6\0\4\24\4\0\16\24\2\0\1\24\1\0\14\24\1\0\2\24\3\0\1\24\2\0\4\24\1\0\2\24" + + "\12\0\10\24\6\0\6\24\1\0\3\24\1\0\12\24\3\0\1\24\12\0\4\24\13\0\12\34\1\24" + + "\1\0\1\24\3\0\7\24\1\0\1\24\1\0\4\24\1\0\17\24\1\0\2\24\14\0\3\24\7\0\4\24" + + "\11\0\2\24\1\0\1\24\20\0\4\24\10\0\1\24\13\0\10\24\5\0\3\24\2\0\1\24\2\0\2" + + "\24\2\0\4\24\1\0\14\24\1\0\1\24\1\0\7\24\1\0\21\24\1\0\4\24\2\0\10\24\1\0" + + "\7\24\1\0\14\24\1\0\4\24\1\0\5\24\1\0\1\24\3\0\14\24\2\0\13\24\1\0\10\24\2" + + "\0\22\34\1\0\2\24\1\0\1\24\2\0\1\24\1\0\12\24\1\0\4\24\1\0\1\24\1\0\1\24\6" + + "\0\1\24\4\0\1\24\1\0\1\24\1\0\1\24\1\0\3\24\1\0\2\24\1\0\1\24\2\0\1\24\1\0" + + "\1\24\1\0\1\24\1\0\1\24\1\0\1\24\1\0\2\24\1\0\1\24\2\0\4\24\1\0\7\24\1\0\4" + + "\24\1\0\4\24\1\0\1\24\1\0\12\24\1\0\5\24\1\0\3\24\1\0\5\24\1\0\5\24"); + + /** + * Translates DFA states to action switch labels. + */ + private static final int[] ZZ_ACTION = zzUnpackAction(); + + private static final String ZZ_ACTION_PACKED_0 = + "\1\0\1\1\2\2\1\3\15\4\1\5\1\4\1\6" + + "\1\7\1\10\4\1\1\11\1\12\1\13\1\14\1\15" + + "\1\16\1\17\1\20\1\21\1\22\1\23\1\24\1\25" + + "\1\26\1\27\1\30\1\31\1\32\1\33\1\34\7\0" + + "\1\35\10\4\1\36\1\4\1\37\1\40\1\4\1\41" + + "\1\42\3\4\1\43\1\44\1\45\1\46\1\47\1\0" + + "\1\50\7\0\1\51\1\52\1\53\1\54\1\55\1\56" + + "\1\57\1\60\1\61\6\0\1\41\3\0\1\62\1\4" + + "\1\63\1\4\1\64\1\65\1\4\1\66\5\4\1\50" + + "\10\0\1\67\1\63\1\70\1\71\1\72\1\73\1\74" + + "\3\4\1\75\1\4\1\76\1\67\1\73\1\74\3\0" + + "\1\75\1\0\1\76\3\4\1\77\3\0\1\77\2\4" + + "\1\100\2\0\1\100\1\101\1\102\1\101\1\102"; + + private static int[] zzUnpackAction() { + int[] result = new int[168]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAction(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /** + * Translates a state to a row index in the transition table + */ + private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); + + private static final String ZZ_ROWMAP_PACKED_0 = + "\0\0\0\74\0\74\0\170\0\264\0\360\0\u012c\0\u0168" + + "\0\u01a4\0\u01e0\0\u021c\0\u0258\0\u0294\0\u02d0\0\u030c\0\u0348" + + "\0\u0384\0\u03c0\0\u03fc\0\u0438\0\u0474\0\u04b0\0\u04ec\0\u0528" + + "\0\u0564\0\u05a0\0\u05dc\0\u0618\0\u0654\0\u0690\0\74\0\u0690" + + "\0\74\0\74\0\74\0\74\0\74\0\74\0\u06cc\0\u0708" + + "\0\74\0\74\0\74\0\74\0\u0744\0\u0780\0\74\0\u07bc" + + "\0\u07f8\0\u0834\0\u0870\0\u08ac\0\u08e8\0\u0924\0\u0690\0\u0960" + + "\0\u099c\0\u09d8\0\u0a14\0\u0a50\0\u0a8c\0\u0ac8\0\u0b04\0\u012c" + + "\0\u0b40\0\u012c\0\u012c\0\u0b7c\0\u0bb8\0\u012c\0\u0bf4\0\u0c30" + + "\0\u0c6c\0\74\0\74\0\u04b0\0\u04ec\0\u0528\0\u0564\0\74" + + "\0\u0ca8\0\u05a0\0\u0ce4\0\u05dc\0\u0d20\0\u0d5c\0\u0d98\0\u0d5c" + + "\0\u0d5c\0\u0d5c\0\74\0\74\0\74\0\74\0\74\0\74" + + "\0\u0dd4\0\u0e10\0\u0e4c\0\u0e88\0\u0ec4\0\u0f00\0\u0f3c\0\u0f78" + + "\0\u0fb4\0\u0ff0\0\u012c\0\u102c\0\u1068\0\u10a4\0\u012c\0\u012c" + + "\0\u10e0\0\u012c\0\u111c\0\u1158\0\u1194\0\u11d0\0\u120c\0\u0d5c" + + "\0\u1248\0\u1284\0\u12c0\0\u12fc\0\u1338\0\u1374\0\u13b0\0\u13ec" + + "\0\u012c\0\u1428\0\u1428\0\u1428\0\u1428\0\u012c\0\u012c\0\u1464" + + "\0\u14a0\0\u14dc\0\u012c\0\u1518\0\u012c\0\74\0\74\0\74" + + "\0\u1554\0\u1590\0\u15cc\0\74\0\u1608\0\74\0\u1644\0\u1680" + + "\0\u16bc\0\u012c\0\u16f8\0\u1734\0\u1770\0\74\0\u17ac\0\u17e8" + + "\0\u012c\0\u1824\0\u1860\0\74\0\u012c\0\u012c\0\74\0\74"; + + private static int[] zzUnpackRowMap() { + int[] result = new int[168]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + + /** + * The transition table of the DFA + */ + private static final int[] ZZ_TRANS = zzUnpackTrans(); + + private static final String ZZ_TRANS_PACKED_0 = + "\1\2\2\3\1\4\1\5\1\6\1\7\1\10\1\11" + + "\1\7\1\12\1\7\1\13\1\14\1\7\1\15\1\7" + + "\1\16\1\7\1\17\1\7\1\20\1\21\1\22\1\23" + + "\1\24\1\13\1\7\1\2\1\25\1\7\1\26\1\23" + + "\1\27\1\23\1\30\1\31\1\2\1\32\1\33\1\34" + + "\1\35\1\36\1\37\1\40\1\41\1\42\1\43\1\44" + + "\1\45\1\46\1\47\1\50\1\51\1\52\1\53\1\54" + + "\1\55\1\56\1\57\76\0\1\3\75\0\1\5\1\60" + + "\4\0\1\61\2\0\1\62\1\0\1\63\3\0\1\64" + + "\1\0\1\65\1\0\1\66\1\0\1\62\20\0\1\67" + + "\1\0\1\67\24\0\1\7\1\70\1\7\1\71\1\72" + + "\6\7\1\73\14\7\1\0\1\7\1\0\1\7\1\0" + + "\1\7\36\0\30\7\1\0\1\7\1\0\1\7\1\0" + + "\1\7\36\0\10\7\1\74\13\7\1\74\3\7\1\0" + + "\1\7\1\0\1\7\1\0\1\7\36\0\15\7\1\75" + + "\12\7\1\0\1\7\1\0\1\7\1\0\1\7\36\0" + + "\4\7\1\76\1\77\22\7\1\0\1\7\1\0\1\7" + + "\1\0\1\7\36\0\5\7\1\100\22\7\1\0\1\7" + + "\1\0\1\7\1\0\1\7\36\0\1\101\6\7\1\102" + + "\12\7\1\103\5\7\1\0\1\7\1\0\1\7\1\0" + + "\1\7\36\0\4\7\1\104\11\7\1\105\11\7\1\0" + + "\1\7\1\0\1\7\1\0\1\7\36\0\23\7\1\106" + + "\4\7\1\0\1\7\1\0\1\106\1\0\1\7\36\0" + + "\21\7\1\107\6\7\1\0\1\7\1\0\1\7\1\0" + + "\1\7\36\0\21\7\1\110\6\7\1\0\1\7\1\0" + + "\1\7\1\0\1\7\36\0\23\7\1\102\4\7\1\0" + + "\1\7\1\0\1\102\1\0\1\7\36\0\1\111\27\7" + + "\1\0\1\7\1\0\1\7\1\0\1\7\61\0\1\23" + + "\7\0\1\23\1\0\1\23\36\0\1\101\21\7\1\103" + + "\2\7\1\102\2\7\1\0\1\7\1\0\1\7\1\0" + + "\1\7\46\0\1\112\2\0\1\113\1\0\1\112\6\0" + + "\1\112\4\0\1\113\75\0\1\114\40\0\1\115\4\0" + + "\1\115\6\0\3\115\2\0\1\115\1\0\1\115\7\0" + + "\1\115\1\0\1\115\61\0\1\116\7\0\1\116\33\0" + + "\44\117\1\120\1\121\26\117\45\122\1\123\1\120\25\122" + + "\45\124\1\125\1\124\1\120\24\124\44\126\1\0\1\127" + + "\2\126\1\130\1\131\11\126\1\132\10\126\51\0\1\133" + + "\11\0\1\134\10\0\1\67\3\0\70\67\63\0\1\135" + + "\73\0\1\136\101\0\1\137\74\0\1\140\11\0\1\141" + + "\1\142\6\0\1\143\64\0\1\144\67\0\1\145\77\0" + + "\1\146\11\0\1\147\76\0\1\150\73\0\1\151\52\0" + + "\1\152\73\0\2\7\1\153\25\7\1\0\1\7\1\0" + + "\1\7\1\0\1\7\36\0\1\154\27\7\1\0\1\7" + + "\1\0\1\7\1\0\1\7\36\0\14\7\1\155\13\7" + + "\1\0\1\7\1\0\1\7\1\0\1\7\36\0\10\7" + + "\1\156\13\7\1\156\3\7\1\0\1\7\1\0\1\7" + + "\1\0\1\7\36\0\7\7\1\157\15\7\1\157\2\7" + + "\1\0\1\7\1\0\1\7\1\0\1\7\36\0\22\7" + + "\1\160\5\7\1\0\1\7\1\0\1\7\1\0\1\7" + + "\36\0\6\7\1\161\21\7\1\0\1\7\1\0\1\7" + + "\1\0\1\7\36\0\22\7\1\162\5\7\1\0\1\7" + + "\1\0\1\7\1\0\1\7\36\0\5\7\1\163\22\7" + + "\1\0\1\7\1\0\1\7\1\0\1\7\36\0\5\7" + + "\1\164\22\7\1\0\1\7\1\0\1\7\1\0\1\7" + + "\36\0\23\105\1\7\2\105\2\7\1\0\1\105\1\0" + + "\1\7\1\0\1\7\36\0\12\7\1\165\15\7\1\0" + + "\1\7\1\0\1\7\1\0\1\7\36\0\5\7\1\166" + + "\22\7\1\0\1\7\1\0\1\7\1\0\1\7\36\0" + + "\7\7\1\167\15\7\1\167\2\7\1\0\1\7\1\0" + + "\1\7\1\0\1\7\31\0\1\117\3\0\70\117\1\122" + + "\3\0\70\122\1\124\3\0\70\124\44\126\1\0\1\127" + + "\3\126\1\170\23\126\3\0\70\126\5\0\1\171\107\0" + + "\1\155\67\0\1\172\13\0\1\172\55\0\1\173\72\0" + + "\1\174\73\0\1\175\66\0\23\147\1\0\2\147\3\0" + + "\1\147\54\0\1\176\66\0\1\177\75\0\1\200\15\0" + + "\1\200\46\0\4\7\1\201\23\7\1\0\1\7\1\0" + + "\1\7\1\0\1\7\31\0\1\202\3\0\6\202\1\203" + + "\12\202\1\204\1\202\1\205\44\202\5\0\1\206\27\7" + + "\1\0\1\7\1\0\1\7\1\0\1\7\36\0\7\7" + + "\1\207\15\7\1\207\2\7\1\0\1\7\1\0\1\7" + + "\1\0\1\7\36\0\11\7\1\210\16\7\1\0\1\7" + + "\1\0\1\7\1\0\1\7\36\0\13\7\1\211\1\7" + + "\1\212\12\7\1\0\1\7\1\0\1\7\1\0\1\7" + + "\36\0\13\7\1\213\14\7\1\0\1\7\1\0\1\7" + + "\1\0\1\7\36\0\22\7\1\214\5\7\1\0\1\7" + + "\1\0\1\7\1\0\1\7\36\0\11\7\1\215\16\7" + + "\1\0\1\7\1\0\1\7\1\0\1\7\42\0\1\216" + + "\67\0\1\217\102\0\1\220\15\0\1\220\57\0\1\221" + + "\75\0\1\222\1\0\1\223\71\0\1\224\102\0\1\225" + + "\62\0\1\226\55\0\1\202\3\0\70\202\5\0\12\7" + + "\1\227\15\7\1\0\1\7\1\0\1\7\1\0\1\7" + + "\36\0\2\7\1\230\25\7\1\0\1\7\1\0\1\7" + + "\1\0\1\7\36\0\12\7\1\231\15\7\1\0\1\7" + + "\1\0\1\7\1\0\1\7\36\0\6\7\1\232\21\7" + + "\1\0\1\7\1\0\1\7\1\0\1\7\50\0\1\233" + + "\63\0\1\234\103\0\1\235\67\0\1\236\65\0\6\7" + + "\1\237\21\7\1\0\1\7\1\0\1\7\1\0\1\7" + + "\36\0\14\7\1\240\13\7\1\0\1\7\1\0\1\7" + + "\1\0\1\7\36\0\4\7\1\241\23\7\1\0\1\7" + + "\1\0\1\7\1\0\1\7\44\0\1\242\101\0\1\243" + + "\63\0\1\244\67\0\4\7\1\245\23\7\1\0\1\7" + + "\1\0\1\7\1\0\1\7\36\0\1\246\27\7\1\0" + + "\1\7\1\0\1\7\1\0\1\7\42\0\1\247\67\0" + + "\1\250\66\0"; + + private static int[] zzUnpackTrans() { + int[] result = new int[6300]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackTrans(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + + /* error messages for the codes above */ + private static final String[] ZZ_ERROR_MSG = { + "Unknown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); + + private static final String ZZ_ATTRIBUTE_PACKED_0 = + "\1\0\2\11\33\1\1\11\1\1\6\11\2\1\4\11" + + "\2\1\1\11\7\0\23\1\2\11\3\1\1\0\1\11" + + "\7\0\3\1\6\11\6\0\1\1\3\0\16\1\10\0" + + "\15\1\3\11\3\0\1\11\1\0\1\11\4\1\3\0" + + "\1\11\3\1\2\0\1\11\2\1\2\11"; + + private static int[] zzUnpackAttribute() { + int[] result = new int[168]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAttribute(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + /** + * the input device + */ + private java.io.Reader zzReader; + + /** + * the current state of the DFA + */ + private int zzState; + + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; + + /** + * this buffer contains the current text to be matched and is + * the source of the yytext() string + */ + private CharSequence zzBuffer = ""; + + /** + * the textposition at the last accepting state + */ + private int zzMarkedPos; + + /** + * the current text position in the buffer + */ + private int zzCurrentPos; + + /** + * startRead marks the beginning of the yytext() string in the buffer + */ + private int zzStartRead; + + /** + * endRead marks the last character in the buffer, that has been read + * from input + */ + private int zzEndRead; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** + * zzAtEOF == true <=> the scanner is at the EOF + */ + private boolean zzAtEOF; + + /** + * denotes if the user-EOF-code has already been executed + */ + private boolean zzEOFDone; + + /* user code: */ + public _M68kLexer() { + this((java.io.Reader) null); + } + + + /** + * Creates a new scanner + * + * @param in the java.io.Reader to read input from. + */ + public _M68kLexer(java.io.Reader in) { + zzReader = in; + } + + + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char[] zzUnpackCMap(String packed) { + int size = 0; + for (int i = 0, length = packed.length(); i < length; i += 2) size += packed.charAt(i); + char[] map = new char[size]; + int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < packed.length()) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do map[j++] = value; while (--count > 0); + } + return map; + } + + public final int getTokenStart() { + return zzStartRead; + } + + public final int getTokenEnd() { + return getTokenStart() + yylength(); + } + + public void reset(CharSequence buffer, int start, int end, int initialState) { + zzBuffer = buffer; + zzCurrentPos = zzMarkedPos = zzStartRead = start; + zzAtEOF = false; + zzAtBOL = true; + zzEndRead = end; + yybegin(initialState); + } + + /** + * Refills the input buffer. + * + * @return {@code false}, iff there was new input. + * @throws java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + return true; + } + + + /** + * Returns the current lexical state. + */ + public final int yystate() { + return zzLexicalState; + } + + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + + /** + * Returns the text matched by the current regular expression. + */ + public final CharSequence yytext() { + return zzBuffer.subSequence(zzStartRead, zzMarkedPos); + } + + + /** + * Returns the character at position {@code pos} from the + * matched text. + *

+ * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. + * A value from 0 to yylength()-1. + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer.charAt(zzStartRead + pos); + } + + + /** + * Returns the length of the matched text region. + */ + public final int yylength() { + return zzMarkedPos - zzStartRead; + } + + + /** + * Reports an error that occurred while scanning. + *

+ * In a wellformed scanner (no or only correct usage of + * yypushback(int) and a match-all fallback rule) this method + * will only be called with things that "Can't Possibly Happen". + * If this method is called, something is seriously wrong + * (e.g. a JFlex bug producing a faulty scanner etc.). + *

+ * Usual syntax/scanner level error handling should be done + * in error fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + + throw new Error(message); + } + + + /** + * Pushes the specified amount of characters back into the input stream. + *

+ * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. + * This number must not be greater than yylength()! + */ + public void yypushback(int number) { + if (number > yylength()) + zzScanError(ZZ_PUSHBACK_2BIG); + + zzMarkedPos -= number; + } + + + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @throws java.io.IOException if any I/O-Error occurs + */ + public IElementType advance() throws java.io.IOException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + CharSequence zzBufferL = zzBuffer; + + int[] zzTransL = ZZ_TRANS; + int[] zzRowMapL = ZZ_ROWMAP; + int[] zzAttrL = ZZ_ATTRIBUTE; + + while (true) { + zzMarkedPosL = zzMarkedPos; + + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + // set up zzAction for empty match case: + int zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) zzAction = zzState; + + + zzForAction: + { + while (true) { + + if (zzCurrentPosL < zzEndReadL) { + zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL/*, zzEndReadL*/); + zzCurrentPosL += Character.charCount(zzInput); + } else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } else { + zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL/*, zzEndReadL*/); + zzCurrentPosL += Character.charCount(zzInput); + } + } + int zzNext = zzTransL[zzRowMapL[zzState] + ZZ_CMAP(zzInput)]; + if (zzNext == -1) break zzForAction; + zzState = zzNext; + + zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ((zzAttributes & 8) == 8) break zzForAction; + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + return null; + } else switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 1: { + return BAD_CHARACTER; + } + // fall through + case 67: + break; + case 2: { + return EOL; + } + // fall through + case 68: + break; + case 3: { + return WHITE_SPACE; + } + // fall through + case 69: + break; + case 4: { + return SYMBOL; + } + // fall through + case 70: + break; + case 5: { + return DECIMAL; + } + // fall through + case 71: + break; + case 6: { + return DOT; + } + // fall through + case 72: + break; + case 7: { + return OP_AR_MOD; + } + // fall through + case 73: + break; + case 8: { + return DOLLAR; + } + // fall through + case 74: + break; + case 9: { + return OP_CMP_LT; + } + // fall through + case 75: + break; + case 10: { + return OP_CMP_GT; + } + // fall through + case 76: + break; + case 11: { + return OP_AR_MUL; + } + // fall through + case 77: + break; + case 12: { + return COLON; + } + // fall through + case 78: + break; + case 13: { + return SEMICOLON; + } + // fall through + case 79: + break; + case 14: { + return SQUARE_L; + } + // fall through + case 80: + break; + case 15: { + return SQUARE_R; + } + // fall through + case 81: + break; + case 16: { + return ROUND_L; + } + // fall through + case 82: + break; + case 17: { + return ROUND_R; + } + // fall through + case 83: + break; + case 18: { + return SEPARATOR; + } + // fall through + case 84: + break; + case 19: { + return HASH; + } + // fall through + case 85: + break; + case 20: { + return OP_ASSIGN; + } + // fall through + case 86: + break; + case 21: { + return OP_UNARY_NOT; + } + // fall through + case 87: + break; + case 22: { + return OP_UNARY_COMPL; + } + // fall through + case 88: + break; + case 23: { + return OP_PLUS; + } + // fall through + case 89: + break; + case 24: { + return OP_MINUS; + } + // fall through + case 90: + break; + case 25: { + return OP_AR_DIV; + } + // fall through + case 91: + break; + case 26: { + return OP_BITWISE_AND; + } + // fall through + case 92: + break; + case 27: { + return OP_BITWISE_OR; + } + // fall through + case 93: + break; + case 28: { + return OP_BITWISE_XOR; + } + // fall through + case 94: + break; + case 29: { + return COMMENT; + } + // fall through + case 95: + break; + case 30: { + return PC; + } + // fall through + case 96: + break; + case 31: { + return AREG; + } + // fall through + case 97: + break; + case 32: { + return REG_SR; + } + // fall through + case 98: + break; + case 33: { + return IF_TAG; + } + // fall through + case 99: + break; + case 34: { + return DREG; + } + // fall through + case 100: + break; + case 35: { + return OPSIZE_BS; + } + // fall through + case 101: + break; + case 36: { + return OPSIZE_WL; + } + // fall through + case 102: + break; + case 37: { + return BINARY; + } + // fall through + case 103: + break; + case 38: { + return HEXADECIMAL; + } + // fall through + case 104: + break; + case 39: { + return OCTAL; + } + // fall through + case 105: + break; + case 40: { + return STRINGLIT; + } + // fall through + case 106: + break; + case 41: { + return OP_AR_SHIFT_L; + } + // fall through + case 107: + break; + case 42: { + return OP_CMP_NOT_EQ2; + } + // fall through + case 108: + break; + case 43: { + return OP_CMP_LT_EQ; + } + // fall through + case 109: + break; + case 44: { + return OP_AR_SHIFT_R; + } + // fall through + case 110: + break; + case 45: { + return OP_CMP_GT_EQ; + } + // fall through + case 111: + break; + case 46: { + return OP_CMP_EQ; + } + // fall through + case 112: + break; + case 47: { + return OP_CMP_NOT_EQ; + } + // fall through + case 113: + break; + case 48: { + return OP_LOGICAL_AND; + } + // fall through + case 114: + break; + case 49: { + return OP_LOGICAL_OR; + } + // fall through + case 115: + break; + case 50: { + return EQU; + } + // fall through + case 116: + break; + case 51: { + return END_TAG; + } + // fall through + case 117: + break; + case 52: { + return REG_USP; + } + // fall through + case 118: + break; + case 53: { + return REG_VBR; + } + // fall through + case 119: + break; + case 54: { + return REG_CCR; + } + // fall through + case 120: + break; + case 55: { + return EVEN_TAG; + } + // fall through + case 121: + break; + case 56: { + return ENDC_TAG; + } + // fall through + case 122: + break; + case 57: { + return MACRO_END_TAG; + } + // fall through + case 123: + break; + case 58: { + return REPT_END_TAG; + } + // fall through + case 124: + break; + case 59: { + return ELSE_TAG; + } + // fall through + case 125: + break; + case 60: { + return CNOP_TAG; + } + // fall through + case 126: + break; + case 61: { + return FAIL_TAG; + } + // fall through + case 127: + break; + case 62: { + return REPT_TAG; + } + // fall through + case 128: + break; + case 63: { + return MACRO_TAG; + } + // fall through + case 129: + break; + case 64: { + return INCBIN_TAG; + } + // fall through + case 130: + break; + case 65: { + return SECTION_TAG; + } + // fall through + case 131: + break; + case 66: { + return INCLUDE_TAG; + } + // fall through + case 132: + break; + default: + zzScanError(ZZ_NO_MATCH); + } + } + } + + +} 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 new file mode 100644 index 0000000..141dfb9 --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/parser/M68kParser.java @@ -0,0 +1,1330 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.parser; + +import com.intellij.lang.ASTNode; +import com.intellij.lang.LightPsiParser; +import com.intellij.lang.PsiBuilder; +import com.intellij.lang.PsiBuilder.Marker; +import com.intellij.lang.PsiParser; +import com.intellij.psi.tree.IElementType; +import com.intellij.psi.tree.TokenSet; + +import static de.platon42.intellij.plugins.m68k.parser.M68kParserUtilBase.*; +import static de.platon42.intellij.plugins.m68k.psi.M68kTypes.*; + +@SuppressWarnings({"SimplifiableIfStatement", "UnusedAssignment"}) +public class M68kParser implements PsiParser, LightPsiParser { + + public ASTNode parse(IElementType t, PsiBuilder b) { + parseLight(t, b); + return b.getTreeBuilt(); + } + + public void parseLight(IElementType t, PsiBuilder b) { + boolean r; + b = adapt_builder_(t, b, this, EXTENDS_SETS_); + Marker m = enter_section_(b, 0, _COLLAPSE_, null); + r = parse_root_(t, b); + exit_section_(b, 0, m, t, r, true, TRUE_CONDITION); + } + + protected boolean parse_root_(IElementType t, PsiBuilder b) { + return parse_root_(t, b, 0); + } + + static boolean parse_root_(IElementType t, PsiBuilder b, int l) { + return M68kFile(b, l + 1); + } + + public static final TokenSet[] EXTENDS_SETS_ = new TokenSet[]{ + 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, + ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE, DATA_REGISTER_DIRECT_ADDRESSING_MODE, IMMEDIATE_DATA, + PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE, PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE, PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE, PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE, + SPECIAL_REGISTER_DIRECT_ADDRESSING_MODE), + create_token_set_(BINARY_ADD_EXPR, BINARY_BITWISE_AND_EXPR, BINARY_BITWISE_OR_EXPR, BINARY_BITWISE_XOR_EXPR, + BINARY_CMP_EQ_EXPR, BINARY_CMP_GE_EXPR, BINARY_CMP_GT_EXPR, BINARY_CMP_LE_EXPR, + BINARY_CMP_LT_EXPR, BINARY_CMP_NE_EXPR, BINARY_DIV_EXPR, BINARY_LOGICAL_AND_EXPR, + BINARY_LOGICAL_OR_EXPR, BINARY_MOD_EXPR, BINARY_MUL_EXPR, BINARY_SHIFT_L_EXPR, + BINARY_SHIFT_R_EXPR, BINARY_SUB_EXPR, EXPR, LITERAL_EXPR, + PAREN_EXPR, REF_EXPR, UNARY_COMPL_EXPR, UNARY_MINUS_EXPR, + UNARY_NOT_EXPR, UNARY_PLUS_EXPR), + }; + + /* ********************************************************** */ + // expr AddressSize? !ROUND_L + public static boolean AbsoluteAddressAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AbsoluteAddressAddressingMode")) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ABSOLUTE_ADDRESS_ADDRESSING_MODE, ""); + r = expr(b, l + 1, -1); + r = r && AbsoluteAddressAddressingMode_1(b, l + 1); + r = r && AbsoluteAddressAddressingMode_2(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + // AddressSize? + private static boolean AbsoluteAddressAddressingMode_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AbsoluteAddressAddressingMode_1")) return false; + AddressSize(b, l + 1); + return true; + } + + // !ROUND_L + private static boolean AbsoluteAddressAddressingMode_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AbsoluteAddressAddressingMode_2")) return false; + boolean r; + Marker m = enter_section_(b, l, _NOT_); + r = !consumeTokenFast(b, ROUND_L); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // AREG + public static boolean AddressRegister(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegister")) return false; + if (!nextTokenIs(b, "", AREG)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER, ""); + r = consumeToken(b, AREG); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // AddressRegister + public static boolean AddressRegisterDirectAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterDirectAddressingMode")) return false; + if (!nextTokenIsFast(b, AREG)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE, ""); + r = AddressRegister(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // ROUND_L AddressRegister ROUND_R !OP_PLUS + public static boolean AddressRegisterIndirectAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER_INDIRECT_ADDRESSING_MODE, ""); + r = consumeTokenFast(b, ROUND_L); + r = r && AddressRegister(b, l + 1); + r = r && consumeToken(b, ROUND_R); + r = r && AddressRegisterIndirectAddressingMode_3(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + // !OP_PLUS + private static boolean AddressRegisterIndirectAddressingMode_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectAddressingMode_3")) return false; + boolean r; + Marker m = enter_section_(b, l, _NOT_); + r = !consumeTokenFast(b, OP_PLUS); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // ROUND_L AddressRegister ROUND_R OP_PLUS + public static boolean AddressRegisterIndirectPostIncAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectPostIncAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE, ""); + r = consumeTokenFast(b, ROUND_L); + r = r && AddressRegister(b, l + 1); + r = r && consumeTokens(b, 0, ROUND_R, OP_PLUS); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // OP_MINUS ROUND_L AddressRegister ROUND_R + public static boolean AddressRegisterIndirectPreDecAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectPreDecAddressingMode")) return false; + if (!nextTokenIsFast(b, OP_MINUS)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER_INDIRECT_PRE_DEC_ADDRESSING_MODE, ""); + r = consumeTokens(b, 0, OP_MINUS, ROUND_L); + r = r && AddressRegister(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // ROUND_L expr SEPARATOR AddressRegister ROUND_R + public static boolean AddressRegisterIndirectWithDisplacementNewAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectWithDisplacementNewAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE, ""); + r = consumeTokenFast(b, ROUND_L); + r = r && expr(b, l + 1, -1); + r = r && consumeToken(b, SEPARATOR); + r = r && AddressRegister(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // expr ROUND_L AddressRegister ROUND_R + public static boolean AddressRegisterIndirectWithDisplacementOldAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectWithDisplacementOldAddressingMode")) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE, ""); + r = expr(b, l + 1, -1); + r = r && consumeToken(b, ROUND_L); + r = r && AddressRegister(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // ROUND_L expr SEPARATOR AddressRegister SEPARATOR DataOrAddressRegister DataWidth? ROUND_R + public static boolean AddressRegisterIndirectWithIndexNewAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectWithIndexNewAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE, ""); + r = consumeTokenFast(b, ROUND_L); + r = r && expr(b, l + 1, -1); + r = r && consumeToken(b, SEPARATOR); + r = r && AddressRegister(b, l + 1); + r = r && consumeToken(b, SEPARATOR); + r = r && DataOrAddressRegister(b, l + 1); + r = r && AddressRegisterIndirectWithIndexNewAddressingMode_6(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + // DataWidth? + private static boolean AddressRegisterIndirectWithIndexNewAddressingMode_6(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectWithIndexNewAddressingMode_6")) return false; + DataWidth(b, l + 1); + return true; + } + + /* ********************************************************** */ + // expr ROUND_L AddressRegister SEPARATOR DataOrAddressRegister DataWidth? ROUND_R + public static boolean AddressRegisterIndirectWithIndexOldAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectWithIndexOldAddressingMode")) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE, ""); + r = expr(b, l + 1, -1); + r = r && consumeToken(b, ROUND_L); + r = r && AddressRegister(b, l + 1); + r = r && consumeToken(b, SEPARATOR); + r = r && DataOrAddressRegister(b, l + 1); + r = r && AddressRegisterIndirectWithIndexOldAddressingMode_5(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + // DataWidth? + private static boolean AddressRegisterIndirectWithIndexOldAddressingMode_5(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressRegisterIndirectWithIndexOldAddressingMode_5")) return false; + DataWidth(b, l + 1); + return true; + } + + /* ********************************************************** */ + // OPSIZE_WL + public static boolean AddressSize(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressSize")) return false; + if (!nextTokenIs(b, OPSIZE_WL)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, OPSIZE_WL); + exit_section_(b, m, ADDRESS_SIZE, r); + return r; + } + + /* ********************************************************** */ + // AbsoluteAddressAddressingMode + // | SpecialRegisterDirectAddressingMode + // | DataRegisterDirectAddressingMode + // | AddressRegisterDirectAddressingMode + // | AddressRegisterIndirectAddressingMode + // | AddressRegisterIndirectWithDisplacementOldAddressingMode + // | ProgramCounterIndirectWithDisplacementOldAddressingMode + // | AddressRegisterIndirectWithIndexOldAddressingMode + // | ProgramCounterIndirectWithIndexOldAddressingMode + // | AddressRegisterIndirectWithDisplacementNewAddressingMode + // | ProgramCounterIndirectWithDisplacementNewAddressingMode + // | AddressRegisterIndirectWithIndexNewAddressingMode + // | ProgramCounterIndirectWithIndexNewAddressingMode + // | AddressRegisterIndirectPreDecAddressingMode + // | AddressRegisterIndirectPostIncAddressingMode + // | ImmediateData + public static boolean AddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AddressingMode")) return false; + boolean r; + Marker m = enter_section_(b, l, _COLLAPSE_, ADDRESSING_MODE, ""); + r = AbsoluteAddressAddressingMode(b, l + 1); + if (!r) r = SpecialRegisterDirectAddressingMode(b, l + 1); + if (!r) r = DataRegisterDirectAddressingMode(b, l + 1); + if (!r) r = AddressRegisterDirectAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectWithDisplacementOldAddressingMode(b, l + 1); + if (!r) r = ProgramCounterIndirectWithDisplacementOldAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectWithIndexOldAddressingMode(b, l + 1); + if (!r) r = ProgramCounterIndirectWithIndexOldAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectWithDisplacementNewAddressingMode(b, l + 1); + if (!r) r = ProgramCounterIndirectWithDisplacementNewAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectWithIndexNewAddressingMode(b, l + 1); + if (!r) r = ProgramCounterIndirectWithIndexNewAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectPreDecAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectPostIncAddressingMode(b, l + 1); + if (!r) r = ImmediateData(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // AsmOp (WHITE_SPACE AsmOperands)? + public static boolean AsmInstruction(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AsmInstruction")) return false; + if (!nextTokenIs(b, SYMBOL)) return false; + boolean r; + Marker m = enter_section_(b); + r = AsmOp(b, l + 1); + r = r && AsmInstruction_1(b, l + 1); + exit_section_(b, m, ASM_INSTRUCTION, r); + return r; + } + + // (WHITE_SPACE AsmOperands)? + private static boolean AsmInstruction_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AsmInstruction_1")) return false; + AsmInstruction_1_0(b, l + 1); + return true; + } + + // WHITE_SPACE AsmOperands + private static boolean AsmInstruction_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AsmInstruction_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, WHITE_SPACE); + r = r && AsmOperands(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // SYMBOL OperandSize? + public static boolean AsmOp(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AsmOp")) return false; + if (!nextTokenIs(b, SYMBOL)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, SYMBOL); + r = r && AsmOp_1(b, l + 1); + exit_section_(b, m, ASM_OP, r); + return r; + } + + // OperandSize? + private static boolean AsmOp_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AsmOp_1")) return false; + OperandSize(b, l + 1); + return true; + } + + /* ********************************************************** */ + // FirstAsmOperand (SEPARATOR NextAsmOperand)* + public static boolean AsmOperands(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AsmOperands")) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, ASM_OPERANDS, ""); + r = FirstAsmOperand(b, l + 1); + r = r && AsmOperands_1(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + // (SEPARATOR NextAsmOperand)* + private static boolean AsmOperands_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AsmOperands_1")) return false; + while (true) { + int c = current_position_(b); + if (!AsmOperands_1_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "AsmOperands_1", c)) break; + } + return true; + } + + // SEPARATOR NextAsmOperand + private static boolean AsmOperands_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AsmOperands_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, SEPARATOR); + r = r && NextAsmOperand(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // SYMBOL ((WHITE_SPACE? OP_ASSIGN WHITE_SPACE?)|(WHITE_SPACE EQU WHITE_SPACE)) expr + public static boolean Assignment(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Assignment")) return false; + if (!nextTokenIs(b, SYMBOL)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, SYMBOL); + r = r && Assignment_1(b, l + 1); + r = r && expr(b, l + 1, -1); + exit_section_(b, m, ASSIGNMENT, r); + return r; + } + + // (WHITE_SPACE? OP_ASSIGN WHITE_SPACE?)|(WHITE_SPACE EQU WHITE_SPACE) + private static boolean Assignment_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Assignment_1")) return false; + boolean r; + Marker m = enter_section_(b); + r = Assignment_1_0(b, l + 1); + if (!r) r = Assignment_1_1(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // WHITE_SPACE? OP_ASSIGN WHITE_SPACE? + private static boolean Assignment_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Assignment_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = Assignment_1_0_0(b, l + 1); + r = r && consumeToken(b, OP_ASSIGN); + r = r && Assignment_1_0_2(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // WHITE_SPACE? + private static boolean Assignment_1_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Assignment_1_0_0")) return false; + consumeToken(b, WHITE_SPACE); + return true; + } + + // WHITE_SPACE? + private static boolean Assignment_1_0_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Assignment_1_0_2")) return false; + consumeToken(b, WHITE_SPACE); + return true; + } + + // WHITE_SPACE EQU WHITE_SPACE + private static boolean Assignment_1_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Assignment_1_1")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokens(b, 0, WHITE_SPACE, EQU, WHITE_SPACE); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // WHITE_SPACE? + static boolean BlankLine(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "BlankLine")) return false; + consumeToken(b, WHITE_SPACE); + return true; + } + + /* ********************************************************** */ + // DataRegister | AddressRegister + static boolean DataOrAddressRegister(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "DataOrAddressRegister")) return false; + if (!nextTokenIs(b, "", AREG, DREG)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, null, ""); + r = DataRegister(b, l + 1); + if (!r) r = AddressRegister(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // DREG + public static boolean DataRegister(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "DataRegister")) return false; + if (!nextTokenIs(b, "", DREG)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, DATA_REGISTER, ""); + r = consumeToken(b, DREG); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // DataRegister + public static boolean DataRegisterDirectAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "DataRegisterDirectAddressingMode")) return false; + if (!nextTokenIsFast(b, DREG)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, DATA_REGISTER_DIRECT_ADDRESSING_MODE, ""); + r = DataRegister(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + /* ********************************************************** */ + // OPSIZE_WL + public static boolean DataWidth(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "DataWidth")) return false; + if (!nextTokenIs(b, OPSIZE_WL)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, OPSIZE_WL); + exit_section_(b, m, DATA_WIDTH, r); + return r; + } + + /* ********************************************************** */ + // AddressingMode + static boolean FirstAsmOperand(PsiBuilder b, int l) { + return AddressingMode(b, l + 1); + } + + /* ********************************************************** */ + // (!WHITE_SPACE SYMBOL (COLON? COLON?)?)|(WHITE_SPACE? SYMBOL COLON COLON?) + public static boolean GlobalLabel(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel")) return false; + if (!nextTokenIs(b, "", SYMBOL, WHITE_SPACE)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, GLOBAL_LABEL, ""); + r = GlobalLabel_0(b, l + 1); + if (!r) r = GlobalLabel_1(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + // !WHITE_SPACE SYMBOL (COLON? COLON?)? + private static boolean GlobalLabel_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = GlobalLabel_0_0(b, l + 1); + r = r && consumeToken(b, SYMBOL); + r = r && GlobalLabel_0_2(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // !WHITE_SPACE + private static boolean GlobalLabel_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_0_0")) return false; + boolean r; + Marker m = enter_section_(b, l, _NOT_); + r = !consumeToken(b, WHITE_SPACE); + exit_section_(b, l, m, r, false, null); + return r; + } + + // (COLON? COLON?)? + private static boolean GlobalLabel_0_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_0_2")) return false; + GlobalLabel_0_2_0(b, l + 1); + return true; + } + + // COLON? COLON? + private static boolean GlobalLabel_0_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_0_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = GlobalLabel_0_2_0_0(b, l + 1); + r = r && GlobalLabel_0_2_0_1(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // COLON? + private static boolean GlobalLabel_0_2_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_0_2_0_0")) return false; + consumeToken(b, COLON); + return true; + } + + // COLON? + private static boolean GlobalLabel_0_2_0_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_0_2_0_1")) return false; + consumeToken(b, COLON); + return true; + } + + // WHITE_SPACE? SYMBOL COLON COLON? + private static boolean GlobalLabel_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_1")) return false; + boolean r; + Marker m = enter_section_(b); + r = GlobalLabel_1_0(b, l + 1); + r = r && consumeTokens(b, 0, SYMBOL, COLON); + r = r && GlobalLabel_1_3(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // WHITE_SPACE? + private static boolean GlobalLabel_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_1_0")) return false; + consumeToken(b, WHITE_SPACE); + return true; + } + + // COLON? + private static boolean GlobalLabel_1_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_1_3")) return false; + consumeToken(b, COLON); + return true; + } + + /* ********************************************************** */ + // HASH expr + public static boolean ImmediateData(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ImmediateData")) return false; + if (!nextTokenIs(b, HASH)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, HASH); + r = r && expr(b, l + 1, -1); + exit_section_(b, m, IMMEDIATE_DATA, r); + return r; + } + + /* ********************************************************** */ + // WHITE_SPACE Instruction + static boolean InstructionOnly(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "InstructionOnly")) return false; + if (!nextTokenIs(b, WHITE_SPACE)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, WHITE_SPACE); + r = r && parseMacroCallOrAsmInstruction(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // LocalLabel | GlobalLabel + public static boolean Label(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Label")) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, LABEL, "