diff --git a/README.md b/README.md index 6302f4b..0697c30 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,8 @@ If the current statement has no valid syntax, the instruction details of all mat - Scoping for global symbols, labels and macros is currently the whole project. - No support for register replacement (e.g. registers replaced by `EQUR` or `EQURL` will cause syntax errors) - While the lexer supports the -spaces option (where a space does *NOT* introduce a comment), this cannot be configured yet (default is ON). -- No support for other processor instructions, FPU or 68020+ address modes. +- No support for other processor instructions and FPU. +- The pretty esoteric use of `ZPC`, `ZA0-ZA7` or `ZSP` for zero (omitted) address in 68020 addressing modes is unsupported. - Unit Test coverage is not as good as it could be (ahem). - Missing but planned features: - Macro evaluation on invocation 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 index 784bbb0..0f9f4a6 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java @@ -140,53 +140,53 @@ public class _M68kLexer implements FlexLexer { "\11\0\1\4\1\2\2\1\1\3\22\0\1\4\1\57\1\47\1\53\1\24\1\40\1\64\1\46\1\55\1\56" + "\1\63\1\61\1\52\1\62\1\23\1\66\2\41\5\6\1\10\2\43\1\14\1\32\1\50\1\22\1\51" + "\1\0\1\44\1\5\1\71\1\26\1\7\1\15\1\42\5\11\1\37\1\25\1\31\1\30\1\67\1\16\1" + - "\27\1\20\1\21\1\17\1\70\1\36\3\11\1\0\1\33\1\0\1\54\1\12\1\45\1\5\1\34\1\26" + - "\1\7\1\15\1\42\5\11\1\37\1\25\1\31\1\30\1\67\1\16\1\27\1\35\1\21\1\17\1\70" + - "\1\36\3\11\1\0\1\65\1\0\1\60\6\0\1\1\12\0\1\4\11\0\1\11\12\0\1\11\4\0\1\11" + - "\5\0\27\11\1\0\27\11\1\20\2\11\4\0\14\11\16\0\5\11\7\0\1\11\1\0\1\11\1\0\5" + - "\11\1\0\2\11\2\0\4\11\1\0\1\11\6\0\1\11\1\0\3\11\1\0\1\11\1\0\4\11\1\0\23" + - "\11\1\0\13\11\10\0\6\11\1\0\26\11\2\0\1\11\6\0\10\11\10\0\13\11\5\0\3\11\15" + - "\0\12\13\4\0\6\11\1\0\1\11\17\0\2\11\7\0\2\11\12\13\3\11\2\0\2\11\1\0\16\11" + - "\15\0\11\11\13\0\1\11\16\0\12\13\6\11\4\0\2\11\4\0\1\11\5\0\6\11\4\0\1\11" + - "\11\0\1\11\3\0\1\11\7\0\11\11\7\0\5\11\1\0\10\11\6\0\26\11\3\0\1\11\2\0\1" + - "\11\7\0\12\11\4\0\12\13\1\11\4\0\10\11\2\0\2\11\2\0\26\11\1\0\7\11\1\0\1\11" + - "\3\0\4\11\3\0\1\11\20\0\1\11\15\0\2\11\1\0\1\11\5\0\6\11\4\0\2\11\1\0\2\11" + - "\1\0\2\11\1\0\2\11\17\0\4\11\1\0\1\11\7\0\12\13\2\0\3\11\20\0\11\11\1\0\2" + - "\11\1\0\2\11\1\0\5\11\3\0\1\11\2\0\1\11\30\0\1\11\13\0\10\11\2\0\1\11\3\0" + - "\1\11\1\0\6\11\3\0\3\11\1\0\4\11\3\0\2\11\1\0\1\11\1\0\2\11\3\0\2\11\3\0\3" + - "\11\3\0\14\11\13\0\10\11\1\0\2\11\10\0\3\11\5\0\1\11\4\0\10\11\1\0\6\11\1" + - "\0\5\11\3\0\1\11\3\0\2\11\15\0\13\11\2\0\1\11\6\0\3\11\10\0\1\11\12\0\6\11" + - "\5\0\22\11\3\0\10\11\1\0\11\11\1\0\1\11\2\0\7\11\11\0\1\11\1\0\2\11\14\0\12" + - "\13\7\0\2\11\1\0\1\11\2\0\2\11\1\0\1\11\2\0\1\11\6\0\4\11\1\0\7\11\1\0\3\11" + - "\1\0\1\11\1\0\1\11\2\0\2\11\1\0\4\11\1\0\2\11\11\0\1\11\2\0\5\11\1\0\1\11" + - "\11\0\12\13\2\0\14\11\1\0\24\11\13\0\5\11\22\0\7\11\4\0\4\11\3\0\1\11\3\0" + - "\2\11\7\0\3\11\4\0\15\11\14\0\1\11\1\0\6\11\1\0\1\11\5\0\1\11\2\0\13\11\1" + - "\0\15\11\1\0\4\11\2\0\7\11\1\0\1\11\1\0\4\11\2\0\1\11\1\0\4\11\2\0\7\11\1" + - "\0\1\11\1\0\4\11\2\0\16\11\2\0\6\11\2\0\15\11\2\0\1\11\1\4\17\11\1\0\10\11" + - "\7\0\15\11\1\0\6\11\23\0\1\11\4\0\1\11\3\0\5\11\2\0\22\11\1\0\1\11\5\0\17" + - "\11\1\0\16\11\2\0\5\11\13\0\14\11\13\0\1\11\15\0\7\11\7\0\16\11\15\0\2\11" + - "\12\13\3\0\3\11\11\0\4\11\1\0\4\11\3\0\2\11\11\0\10\11\1\0\1\11\1\0\1\11\1" + - "\0\1\11\1\0\6\11\1\0\7\11\1\0\1\11\3\0\3\11\1\0\7\11\3\0\4\11\2\0\6\11\4\0" + - "\13\4\15\0\2\1\5\0\1\4\17\0\1\4\1\0\1\11\15\0\1\11\2\0\1\11\4\0\1\11\2\0\12" + - "\11\1\0\1\11\3\0\5\11\6\0\1\11\1\0\1\11\1\0\1\11\1\0\4\11\1\0\13\11\2\0\4" + - "\11\5\0\5\11\4\0\1\11\4\0\2\11\13\0\5\11\6\0\4\11\3\0\2\11\14\0\10\11\7\0" + - "\10\11\1\0\7\11\1\0\1\4\4\0\2\11\12\0\5\11\5\0\2\11\3\0\7\11\6\0\3\11\12\13" + - "\2\11\13\0\11\11\2\0\27\11\2\0\7\11\1\0\3\11\1\0\4\11\1\0\4\11\2\0\6\11\3" + - "\0\1\11\1\0\1\11\2\0\5\11\1\0\12\11\12\13\5\11\1\0\3\11\1\0\10\11\4\0\7\11" + - "\3\0\1\11\3\0\2\11\1\0\1\11\3\0\2\11\2\0\5\11\2\0\1\11\1\0\1\11\30\0\3\11" + - "\3\0\6\11\2\0\6\11\2\0\6\11\11\0\7\11\4\0\5\11\3\0\5\11\5\0\1\11\1\0\10\11" + - "\1\0\5\11\1\0\1\11\1\0\2\11\1\0\2\11\1\0\12\11\6\0\12\11\2\0\6\11\2\0\6\11" + - "\2\0\6\11\2\0\3\11\3\0\14\11\1\0\16\11\1\0\2\11\1\0\2\11\1\0\10\11\6\0\4\11" + - "\4\0\16\11\2\0\1\11\1\0\14\11\1\0\2\11\3\0\1\11\2\0\4\11\1\0\2\11\12\0\10" + - "\11\6\0\6\11\1\0\3\11\1\0\12\11\3\0\1\11\12\0\4\11\13\0\12\13\1\11\1\0\1\11" + - "\3\0\7\11\1\0\1\11\1\0\4\11\1\0\17\11\1\0\2\11\14\0\3\11\7\0\4\11\11\0\2\11" + - "\1\0\1\11\20\0\4\11\10\0\1\11\13\0\10\11\5\0\3\11\2\0\1\11\2\0\2\11\2\0\4" + - "\11\1\0\14\11\1\0\1\11\1\0\7\11\1\0\21\11\1\0\4\11\2\0\10\11\1\0\7\11\1\0" + - "\14\11\1\0\4\11\1\0\5\11\1\0\1\11\3\0\14\11\2\0\13\11\1\0\10\11\2\0\22\13" + - "\1\0\2\11\1\0\1\11\2\0\1\11\1\0\12\11\1\0\4\11\1\0\1\11\1\0\1\11\6\0\1\11" + - "\4\0\1\11\1\0\1\11\1\0\1\11\1\0\3\11\1\0\2\11\1\0\1\11\2\0\1\11\1\0\1\11\1" + - "\0\1\11\1\0\1\11\1\0\1\11\1\0\2\11\1\0\1\11\2\0\4\11\1\0\7\11\1\0\4\11\1\0" + - "\4\11\1\0\1\11\1\0\12\11\1\0\5\11\1\0\3\11\1\0\5\11\1\0\5\11"); + "\27\1\20\1\21\1\17\1\70\1\36\3\11\1\72\1\33\1\73\1\54\1\12\1\45\1\5\1\34\1" + + "\26\1\7\1\15\1\42\5\11\1\37\1\25\1\31\1\30\1\67\1\16\1\27\1\35\1\21\1\17\1" + + "\70\1\36\3\11\1\0\1\65\1\0\1\60\6\0\1\1\12\0\1\4\11\0\1\11\12\0\1\11\4\0\1" + + "\11\5\0\27\11\1\0\27\11\1\20\2\11\4\0\14\11\16\0\5\11\7\0\1\11\1\0\1\11\1" + + "\0\5\11\1\0\2\11\2\0\4\11\1\0\1\11\6\0\1\11\1\0\3\11\1\0\1\11\1\0\4\11\1\0" + + "\23\11\1\0\13\11\10\0\6\11\1\0\26\11\2\0\1\11\6\0\10\11\10\0\13\11\5\0\3\11" + + "\15\0\12\13\4\0\6\11\1\0\1\11\17\0\2\11\7\0\2\11\12\13\3\11\2\0\2\11\1\0\16" + + "\11\15\0\11\11\13\0\1\11\16\0\12\13\6\11\4\0\2\11\4\0\1\11\5\0\6\11\4\0\1" + + "\11\11\0\1\11\3\0\1\11\7\0\11\11\7\0\5\11\1\0\10\11\6\0\26\11\3\0\1\11\2\0" + + "\1\11\7\0\12\11\4\0\12\13\1\11\4\0\10\11\2\0\2\11\2\0\26\11\1\0\7\11\1\0\1" + + "\11\3\0\4\11\3\0\1\11\20\0\1\11\15\0\2\11\1\0\1\11\5\0\6\11\4\0\2\11\1\0\2" + + "\11\1\0\2\11\1\0\2\11\17\0\4\11\1\0\1\11\7\0\12\13\2\0\3\11\20\0\11\11\1\0" + + "\2\11\1\0\2\11\1\0\5\11\3\0\1\11\2\0\1\11\30\0\1\11\13\0\10\11\2\0\1\11\3" + + "\0\1\11\1\0\6\11\3\0\3\11\1\0\4\11\3\0\2\11\1\0\1\11\1\0\2\11\3\0\2\11\3\0" + + "\3\11\3\0\14\11\13\0\10\11\1\0\2\11\10\0\3\11\5\0\1\11\4\0\10\11\1\0\6\11" + + "\1\0\5\11\3\0\1\11\3\0\2\11\15\0\13\11\2\0\1\11\6\0\3\11\10\0\1\11\12\0\6" + + "\11\5\0\22\11\3\0\10\11\1\0\11\11\1\0\1\11\2\0\7\11\11\0\1\11\1\0\2\11\14" + + "\0\12\13\7\0\2\11\1\0\1\11\2\0\2\11\1\0\1\11\2\0\1\11\6\0\4\11\1\0\7\11\1" + + "\0\3\11\1\0\1\11\1\0\1\11\2\0\2\11\1\0\4\11\1\0\2\11\11\0\1\11\2\0\5\11\1" + + "\0\1\11\11\0\12\13\2\0\14\11\1\0\24\11\13\0\5\11\22\0\7\11\4\0\4\11\3\0\1" + + "\11\3\0\2\11\7\0\3\11\4\0\15\11\14\0\1\11\1\0\6\11\1\0\1\11\5\0\1\11\2\0\13" + + "\11\1\0\15\11\1\0\4\11\2\0\7\11\1\0\1\11\1\0\4\11\2\0\1\11\1\0\4\11\2\0\7" + + "\11\1\0\1\11\1\0\4\11\2\0\16\11\2\0\6\11\2\0\15\11\2\0\1\11\1\4\17\11\1\0" + + "\10\11\7\0\15\11\1\0\6\11\23\0\1\11\4\0\1\11\3\0\5\11\2\0\22\11\1\0\1\11\5" + + "\0\17\11\1\0\16\11\2\0\5\11\13\0\14\11\13\0\1\11\15\0\7\11\7\0\16\11\15\0" + + "\2\11\12\13\3\0\3\11\11\0\4\11\1\0\4\11\3\0\2\11\11\0\10\11\1\0\1\11\1\0\1" + + "\11\1\0\1\11\1\0\6\11\1\0\7\11\1\0\1\11\3\0\3\11\1\0\7\11\3\0\4\11\2\0\6\11" + + "\4\0\13\4\15\0\2\1\5\0\1\4\17\0\1\4\1\0\1\11\15\0\1\11\2\0\1\11\4\0\1\11\2" + + "\0\12\11\1\0\1\11\3\0\5\11\6\0\1\11\1\0\1\11\1\0\1\11\1\0\4\11\1\0\13\11\2" + + "\0\4\11\5\0\5\11\4\0\1\11\4\0\2\11\13\0\5\11\6\0\4\11\3\0\2\11\14\0\10\11" + + "\7\0\10\11\1\0\7\11\1\0\1\4\4\0\2\11\12\0\5\11\5\0\2\11\3\0\7\11\6\0\3\11" + + "\12\13\2\11\13\0\11\11\2\0\27\11\2\0\7\11\1\0\3\11\1\0\4\11\1\0\4\11\2\0\6" + + "\11\3\0\1\11\1\0\1\11\2\0\5\11\1\0\12\11\12\13\5\11\1\0\3\11\1\0\10\11\4\0" + + "\7\11\3\0\1\11\3\0\2\11\1\0\1\11\3\0\2\11\2\0\5\11\2\0\1\11\1\0\1\11\30\0" + + "\3\11\3\0\6\11\2\0\6\11\2\0\6\11\11\0\7\11\4\0\5\11\3\0\5\11\5\0\1\11\1\0" + + "\10\11\1\0\5\11\1\0\1\11\1\0\2\11\1\0\2\11\1\0\12\11\6\0\12\11\2\0\6\11\2" + + "\0\6\11\2\0\6\11\2\0\3\11\3\0\14\11\1\0\16\11\1\0\2\11\1\0\2\11\1\0\10\11" + + "\6\0\4\11\4\0\16\11\2\0\1\11\1\0\14\11\1\0\2\11\3\0\1\11\2\0\4\11\1\0\2\11" + + "\12\0\10\11\6\0\6\11\1\0\3\11\1\0\12\11\3\0\1\11\12\0\4\11\13\0\12\13\1\11" + + "\1\0\1\11\3\0\7\11\1\0\1\11\1\0\4\11\1\0\17\11\1\0\2\11\14\0\3\11\7\0\4\11" + + "\11\0\2\11\1\0\1\11\20\0\4\11\10\0\1\11\13\0\10\11\5\0\3\11\2\0\1\11\2\0\2" + + "\11\2\0\4\11\1\0\14\11\1\0\1\11\1\0\7\11\1\0\21\11\1\0\4\11\2\0\10\11\1\0" + + "\7\11\1\0\14\11\1\0\4\11\1\0\5\11\1\0\1\11\3\0\14\11\2\0\13\11\1\0\10\11\2" + + "\0\22\13\1\0\2\11\1\0\1\11\2\0\1\11\1\0\12\11\1\0\4\11\1\0\1\11\1\0\1\11\6" + + "\0\1\11\4\0\1\11\1\0\1\11\1\0\1\11\1\0\3\11\1\0\2\11\1\0\1\11\2\0\1\11\1\0" + + "\1\11\1\0\1\11\1\0\1\11\1\0\1\11\1\0\2\11\1\0\1\11\2\0\4\11\1\0\7\11\1\0\4" + + "\11\1\0\4\11\1\0\1\11\1\0\12\11\1\0\5\11\1\0\3\11\1\0\5\11\1\0\5\11"); /** * Translates DFA states to action switch labels. @@ -200,20 +200,21 @@ public class _M68kLexer implements FlexLexer { "\1\17\5\1\1\21\1\22\1\23\1\24\1\25\1\26" + "\1\27\1\30\1\31\1\32\2\17\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\43\1\51\2\1\1\52\1\17" + - "\1\53\1\12\4\53\1\54\1\12\2\55\2\56\1\57" + - "\1\60\3\61\1\60\1\61\1\0\1\4\1\62\2\63" + - "\1\64\3\0\1\10\1\65\1\66\1\67\1\70\1\71" + - "\1\72\1\17\1\73\1\74\1\17\1\75\1\76\2\0" + - "\1\77\4\0\1\100\1\17\1\33\1\101\1\102\1\103" + - "\1\104\1\105\1\106\1\107\3\0\1\53\1\0\1\53" + - "\1\0\1\53\1\0\1\53\1\56\1\60\3\0\1\4" + - "\1\63\1\64\1\10\1\110\1\10\1\111\1\112\1\113" + - "\1\114\1\0\1\53\3\0\1\56\1\60\3\0\1\10" + - "\1\56\1\60\2\0\1\115\1\116\1\117\1\0\1\120"; + "\1\46\1\47\1\50\1\51\1\44\1\52\1\53\2\1" + + "\1\54\1\17\1\55\1\12\4\55\1\56\1\12\2\57" + + "\2\60\1\61\1\62\3\63\1\62\1\63\1\0\1\4" + + "\1\64\2\65\1\66\3\0\1\10\1\67\1\70\1\71" + + "\1\72\1\73\1\74\1\17\1\75\1\76\1\17\1\77" + + "\1\100\2\0\1\101\4\0\1\102\1\17\1\34\1\103" + + "\1\104\1\105\1\106\1\107\1\110\1\111\3\0\1\55" + + "\1\0\1\55\1\0\1\55\1\0\1\55\1\60\1\62" + + "\3\0\1\4\1\65\1\66\1\10\1\112\1\10\1\113" + + "\1\114\1\115\1\116\1\0\1\55\3\0\1\60\1\62" + + "\3\0\1\10\1\60\1\62\2\0\1\117\1\120\1\121" + + "\1\0\1\122"; private static int[] zzUnpackAction() { - int[] result = new int[184]; + int[] result = new int[186]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -238,32 +239,33 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\72\0\164\0\256\0\350\0\u0122\0\u015c\0\u0196" + - "\0\u01d0\0\u020a\0\u0244\0\u027e\0\u02b8\0\u02f2\0\u032c\0\u0366" + - "\0\u0366\0\u03a0\0\u03da\0\u0414\0\u044e\0\u0488\0\u04c2\0\u04fc" + - "\0\u0536\0\u0570\0\u05aa\0\u0366\0\u05e4\0\u061e\0\u0658\0\u0366" + - "\0\u0692\0\u06cc\0\u0706\0\u0740\0\u077a\0\u07b4\0\u07ee\0\u0828" + - "\0\u0862\0\u089c\0\u08d6\0\u0910\0\u094a\0\u0984\0\u09be\0\u09f8" + - "\0\u0a32\0\u0366\0\u0366\0\u0366\0\u0366\0\u0366\0\u0366\0\u0366" + - "\0\u0366\0\u0366\0\u0366\0\u0a6c\0\u0aa6\0\u0ae0\0\u0366\0\u0b1a" + - "\0\u0b54\0\u0366\0\u0366\0\u0366\0\u0366\0\u0b8e\0\u0366\0\u0366" + - "\0\u0366\0\u0366\0\u0bc8\0\u0c02\0\u0c3c\0\u0c76\0\u0cb0\0\u0366" + - "\0\u0cea\0\u0d24\0\u0d24\0\u0d5e\0\u0d98\0\u0dd2\0\u0e0c\0\u0e46" + - "\0\u0e46\0\u0366\0\u0e80\0\u0eba\0\u0ef4\0\u0f2e\0\u0f68\0\u0f68" + - "\0\u0366\0\u0fa2\0\u0fdc\0\u0e46\0\u1016\0\u1050\0\u108a\0\u10c4" + - "\0\u10fe\0\u1138\0\u1172\0\u11ac\0\u11e6\0\u1220\0\u0366\0\u0366" + - "\0\u0366\0\u0828\0\u0828\0\u0828\0\u125a\0\u0828\0\u08d6\0\u1294" + - "\0\u094a\0\u0984\0\u09be\0\u12ce\0\u0366\0\u09f8\0\u1308\0\u0a32" + - "\0\u1342\0\u0828\0\u137c\0\u0366\0\u0366\0\u0366\0\u0366\0\u0366" + - "\0\u0366\0\u0366\0\u0366\0\u13b6\0\u13f0\0\u142a\0\u1464\0\u149e" + - "\0\u14d8\0\u1512\0\u154c\0\u1586\0\u15c0\0\u15fa\0\u1634\0\u166e" + - "\0\u16a8\0\u16e2\0\u0366\0\u0366\0\u0366\0\u0366\0\u0366\0\u171c" + - "\0\u0828\0\u0828\0\u0828\0\u0366\0\u1756\0\u0366\0\u1790\0\u17ca" + - "\0\u1804\0\u183e\0\u1878\0\u18b2\0\u18ec\0\u1926\0\u1960\0\u199a" + - "\0\u19d4\0\u108a\0\u1a0e\0\u04fc\0\u0eba\0\u1a48\0\u1a82\0\u1abc"; + "\0\0\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\u0384\0\u03c0\0\u03fc\0\u0438\0\u0474\0\u04b0\0\u04ec\0\u0528" + + "\0\u0564\0\u05a0\0\u05dc\0\u0384\0\u0618\0\u0654\0\u0690\0\u0384" + + "\0\u06cc\0\u0708\0\u0744\0\u0780\0\u07bc\0\u07f8\0\u0834\0\u0870" + + "\0\u08ac\0\u08e8\0\u0924\0\u0960\0\u099c\0\u09d8\0\u0a14\0\u0a50" + + "\0\u0a8c\0\u0384\0\u0384\0\u0384\0\u0384\0\u0384\0\u0384\0\u0384" + + "\0\u0384\0\u0384\0\u0384\0\u0ac8\0\u0b04\0\u0384\0\u0b40\0\u0384" + + "\0\u0b7c\0\u0bb8\0\u0384\0\u0384\0\u0384\0\u0384\0\u0bf4\0\u0384" + + "\0\u0384\0\u0384\0\u0384\0\u0c30\0\u0c6c\0\u0ca8\0\u0384\0\u0ce4" + + "\0\u0d20\0\u0384\0\u0d5c\0\u0d98\0\u0d98\0\u0dd4\0\u0e10\0\u0e4c" + + "\0\u0e88\0\u0ec4\0\u0ec4\0\u0384\0\u0f00\0\u0f3c\0\u0f78\0\u0fb4" + + "\0\u0ff0\0\u0ff0\0\u0384\0\u102c\0\u1068\0\u0ec4\0\u10a4\0\u10e0" + + "\0\u111c\0\u1158\0\u1194\0\u11d0\0\u120c\0\u1248\0\u1284\0\u12c0" + + "\0\u0384\0\u0384\0\u0384\0\u0870\0\u0870\0\u0870\0\u12fc\0\u0870" + + "\0\u0924\0\u1338\0\u099c\0\u09d8\0\u0a14\0\u1374\0\u0384\0\u0a50" + + "\0\u13b0\0\u0a8c\0\u13ec\0\u0870\0\u1428\0\u0384\0\u0384\0\u0384" + + "\0\u0384\0\u0384\0\u0384\0\u0384\0\u0384\0\u1464\0\u14a0\0\u14dc" + + "\0\u1518\0\u1554\0\u1590\0\u15cc\0\u1608\0\u1644\0\u1680\0\u16bc" + + "\0\u16f8\0\u1734\0\u1770\0\u17ac\0\u0384\0\u0384\0\u0384\0\u0384" + + "\0\u0384\0\u17e8\0\u0870\0\u0870\0\u0870\0\u0384\0\u1824\0\u0384" + + "\0\u1860\0\u189c\0\u18d8\0\u1914\0\u1950\0\u198c\0\u19c8\0\u1a04" + + "\0\u1a40\0\u1a7c\0\u1ab8\0\u111c\0\u1af4\0\u0528\0\u0f3c\0\u1b30" + + "\0\u1b6c\0\u1ba8"; private static int[] zzUnpackRowMap() { - int[] result = new int[184]; + int[] result = new int[186]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -289,145 +291,146 @@ public class _M68kLexer implements FlexLexer { "\1\20\2\21\1\22\1\23\1\24\1\20\1\24\1\20" + "\2\24\2\20\5\24\1\20\1\25\1\20\5\24\1\26" + "\1\20\4\24\2\20\1\24\10\20\1\26\7\20\1\26" + - "\3\20\3\24\1\20\2\21\1\22\1\27\1\30\1\20" + + "\3\20\3\24\3\20\2\21\1\22\1\27\1\30\1\20" + "\1\30\1\20\1\30\1\31\2\20\5\30\1\20\1\32" + "\1\20\1\33\4\30\1\26\1\20\4\30\2\20\1\30" + - "\10\20\1\26\7\20\1\26\3\20\3\30\1\20\2\34" + + "\10\20\1\26\7\20\1\26\3\20\3\30\3\20\2\34" + "\1\35\1\27\1\36\1\20\1\36\1\20\1\36\1\37" + "\1\20\1\40\5\36\3\20\5\36\1\41\1\20\4\36" + - "\2\20\1\36\24\20\3\36\1\20\2\34\1\35\1\42" + - "\16\20\1\43\6\20\1\41\40\20\2\34\1\35\1\44" + + "\2\20\1\36\24\20\3\36\3\20\2\34\1\35\1\42" + + "\16\20\1\43\6\20\1\41\42\20\2\34\1\35\1\44" + "\1\45\1\46\1\47\1\46\2\50\2\20\2\50\1\51" + "\1\52\1\50\1\20\1\50\1\53\1\50\1\54\3\50" + "\1\41\1\20\1\50\1\52\2\50\1\55\1\46\1\50" + "\1\46\1\56\1\57\1\60\1\61\2\20\1\62\1\63" + "\1\64\1\65\1\66\1\67\1\70\1\71\1\72\1\73" + - "\3\20\1\74\1\75\1\50\1\20\2\34\1\35\1\44" + - "\15\20\1\76\1\43\6\20\1\41\5\20\1\77\7\20" + - "\1\100\1\101\1\102\1\20\1\103\1\104\1\105\1\106" + - "\1\107\1\110\1\111\1\112\1\113\1\114\1\115\4\20" + - "\2\34\1\35\1\27\7\20\1\40\1\116\2\20\1\117" + - "\1\20\1\120\7\20\1\41\2\20\1\117\35\20\2\34" + - "\1\35\1\44\1\121\1\46\1\121\1\46\2\121\2\20" + - "\5\121\1\20\1\121\1\53\5\121\1\41\1\20\4\121" + - "\1\55\1\46\1\121\1\46\1\56\1\57\1\60\1\61" + - "\2\20\1\62\1\20\1\64\1\65\1\66\1\67\1\70" + - "\1\71\1\72\1\73\3\20\3\121\1\20\2\34\1\35" + - "\1\44\15\20\1\76\7\20\1\41\5\20\1\77\7\20" + - "\1\100\1\101\1\102\1\20\1\103\1\104\1\105\1\106" + - "\1\107\1\110\1\111\1\112\1\113\1\114\1\115\3\20" + - "\1\122\1\123\1\34\1\35\1\44\25\122\1\41\12\122" + - "\1\124\1\125\1\126\1\127\1\122\1\62\17\122\1\130" + - "\1\131\1\34\1\35\66\130\1\20\2\132\1\133\1\27" + - "\1\134\1\20\1\134\1\20\2\134\1\20\1\40\5\134" + - "\3\20\1\135\4\134\1\136\1\20\4\134\2\20\1\134" + - "\24\20\3\134\1\137\1\140\1\141\1\142\1\143\25\137" + - "\1\136\37\137\1\20\2\34\1\35\1\27\25\20\1\41" + - "\37\20\1\130\1\144\1\141\1\142\66\130\74\0\1\21" + - "\73\0\1\23\71\0\1\145\7\24\1\146\5\24\1\147" + - "\1\0\1\150\5\24\2\0\4\24\1\0\3\24\23\0" + - "\3\24\5\0\1\151\1\0\1\151\1\0\2\151\2\0" + - "\5\151\3\0\5\151\2\0\4\151\2\0\1\151\24\0" + - "\3\151\1\26\3\0\66\26\4\0\1\27\72\0\1\30" + - "\1\31\1\30\1\31\1\30\2\31\1\152\5\30\1\0" + - "\1\153\1\154\5\30\2\0\4\30\1\0\1\31\1\30" + - "\1\31\23\0\3\30\5\0\7\31\1\152\5\31\2\0" + - "\1\154\5\31\2\0\4\31\1\0\3\31\23\0\3\31" + - "\5\0\1\155\1\0\1\155\1\0\2\155\2\0\5\155" + - "\3\0\5\155\2\0\4\155\2\0\1\155\24\0\3\155" + - "\5\0\1\156\1\31\1\30\1\31\1\30\2\31\1\152" + - "\5\30\1\0\1\153\1\154\5\30\2\0\4\30\1\0" + - "\1\31\1\30\1\31\23\0\3\30\2\0\1\34\74\0" + - "\1\36\1\37\1\36\1\37\1\36\2\37\1\0\5\36" + - "\1\0\1\153\1\0\5\36\2\0\4\36\1\0\1\37" + - "\1\36\1\37\23\0\3\36\5\0\7\37\1\0\5\37" + - "\3\0\5\37\2\0\4\37\1\0\3\37\23\0\3\37" + - "\1\41\3\0\66\41\4\0\1\42\121\0\2\157\1\160" + - "\1\161\36\0\1\44\72\0\1\50\1\162\1\50\1\163" + + "\3\20\1\74\1\75\1\50\1\76\2\20\2\34\1\35" + + "\1\44\15\20\1\77\1\43\6\20\1\41\5\20\1\100" + + "\7\20\1\101\1\102\1\103\1\20\1\104\1\105\1\106" + + "\1\107\1\110\1\111\1\112\1\113\1\114\1\115\1\116" + + "\3\20\1\76\1\117\1\20\2\34\1\35\1\27\7\20" + + "\1\40\1\120\2\20\1\121\1\20\1\122\7\20\1\41" + + "\2\20\1\121\37\20\2\34\1\35\1\44\1\123\1\46" + + "\1\123\1\46\2\123\2\20\5\123\1\20\1\123\1\53" + + "\5\123\1\41\1\20\4\123\1\55\1\46\1\123\1\46" + + "\1\56\1\57\1\60\1\61\2\20\1\62\1\20\1\64" + + "\1\65\1\66\1\67\1\70\1\71\1\72\1\73\3\20" + + "\3\123\3\20\2\34\1\35\1\44\15\20\1\77\7\20" + + "\1\41\5\20\1\100\7\20\1\101\1\102\1\103\1\20" + + "\1\104\1\105\1\106\1\107\1\110\1\111\1\112\1\113" + + "\1\114\1\115\1\116\5\20\1\124\1\125\1\34\1\35" + + "\1\44\25\124\1\41\12\124\1\126\1\127\1\130\1\131" + + "\1\124\1\62\21\124\1\132\1\133\1\34\1\35\70\132" + + "\1\20\2\134\1\135\1\27\1\136\1\20\1\136\1\20" + + "\2\136\1\20\1\40\5\136\3\20\1\137\4\136\1\140" + + "\1\20\4\136\2\20\1\136\24\20\3\136\2\20\1\141" + + "\1\142\1\143\1\144\1\145\25\141\1\140\41\141\1\20" + + "\2\34\1\35\1\27\25\20\1\41\41\20\1\132\1\146" + + "\1\143\1\144\70\132\76\0\1\21\75\0\1\23\73\0" + + "\1\147\7\24\1\150\5\24\1\151\1\0\1\152\5\24" + + "\2\0\4\24\1\0\3\24\23\0\3\24\7\0\1\153" + + "\1\0\1\153\1\0\2\153\2\0\5\153\3\0\5\153" + + "\2\0\4\153\2\0\1\153\24\0\3\153\2\0\1\26" + + "\3\0\70\26\4\0\1\27\74\0\1\30\1\31\1\30" + + "\1\31\1\30\2\31\1\154\5\30\1\0\1\155\1\156" + + "\5\30\2\0\4\30\1\0\1\31\1\30\1\31\23\0" + + "\3\30\7\0\7\31\1\154\5\31\2\0\1\156\5\31" + + "\2\0\4\31\1\0\3\31\23\0\3\31\7\0\1\157" + + "\1\0\1\157\1\0\2\157\2\0\5\157\3\0\5\157" + + "\2\0\4\157\2\0\1\157\24\0\3\157\7\0\1\160" + + "\1\31\1\30\1\31\1\30\2\31\1\154\5\30\1\0" + + "\1\155\1\156\5\30\2\0\4\30\1\0\1\31\1\30" + + "\1\31\23\0\3\30\4\0\1\34\76\0\1\36\1\37" + + "\1\36\1\37\1\36\2\37\1\0\5\36\1\0\1\155" + + "\1\0\5\36\2\0\4\36\1\0\1\37\1\36\1\37" + + "\23\0\3\36\7\0\7\37\1\0\5\37\3\0\5\37" + + "\2\0\4\37\1\0\3\37\23\0\3\37\2\0\1\41" + + "\3\0\70\41\4\0\1\42\123\0\2\161\1\162\1\163" + + "\40\0\1\44\74\0\1\50\1\164\1\50\1\165\3\50" + + "\1\0\5\50\2\0\6\50\2\0\4\50\1\0\1\164" + + "\2\50\23\0\3\50\10\0\1\46\1\0\1\46\30\0" + + "\1\46\1\0\1\46\35\0\1\50\1\166\1\50\1\166" + "\3\50\1\0\5\50\2\0\6\50\2\0\4\50\1\0" + - "\1\162\2\50\23\0\3\50\6\0\1\46\1\0\1\46" + - "\30\0\1\46\1\0\1\46\33\0\1\50\1\164\1\50" + - "\1\164\3\50\1\0\5\50\2\0\6\50\2\0\4\50" + - "\1\0\1\164\2\50\23\0\3\50\5\0\7\50\1\0" + - "\5\50\2\0\6\50\2\0\4\50\1\0\3\50\23\0" + - "\3\50\5\0\7\50\1\0\3\50\1\165\1\50\2\0" + - "\6\50\2\0\1\50\1\165\2\50\1\0\3\50\23\0" + - "\3\50\5\0\7\50\1\0\5\50\2\0\3\50\1\166" + - "\2\50\2\0\4\50\1\0\3\50\23\0\1\163\2\50" + - "\5\0\4\167\4\0\1\167\10\0\1\167\5\0\1\167" + - "\4\0\3\167\25\0\1\167\5\0\7\50\1\0\5\50" + - "\2\0\2\50\1\170\3\50\2\0\4\50\1\0\3\50" + - "\23\0\3\50\41\0\1\171\36\0\1\172\1\0\1\172" + - "\30\0\1\172\30\0\2\173\2\0\27\173\1\174\11\173" + - "\1\175\24\173\2\176\2\0\27\176\1\177\12\176\1\175" + - "\23\176\2\200\2\0\27\200\1\201\13\200\1\175\22\200" + - "\5\0\7\50\1\0\5\50\2\0\2\50\1\202\3\50" + - "\2\0\4\50\1\0\3\50\23\0\3\50\5\0\7\50" + - "\1\0\5\50\2\0\6\50\2\0\1\203\3\50\1\0" + - "\3\50\23\0\2\50\1\203\22\0\1\204\71\0\1\205" + - "\25\0\1\206\1\207\42\0\1\210\26\0\1\211\42\0" + - "\1\207\133\0\1\212\72\0\1\213\72\0\1\77\21\0" + - "\1\214\70\0\1\215\61\0\7\121\1\0\5\121\1\0" + - "\7\121\1\0\5\121\1\0\3\121\23\0\3\121\2\122" + - "\3\0\25\122\1\0\17\122\1\0\17\122\2\124\2\0" + - "\1\216\25\124\1\216\1\217\11\124\1\122\4\124\1\216" + - "\17\124\2\125\2\0\1\220\25\125\1\220\1\221\12\125" + - "\1\122\3\125\1\220\17\125\2\126\2\0\1\222\25\126" + - "\1\222\1\223\13\126\1\122\2\126\1\222\17\126\2\127" + - "\2\0\1\224\25\127\1\224\1\225\15\127\1\122\1\224" + - "\17\127\2\130\2\0\66\130\2\0\1\132\74\0\7\134" + - "\1\0\5\134\3\0\5\134\2\0\4\134\1\0\3\134" + - "\23\0\3\134\5\0\1\226\6\134\1\0\5\134\3\0" + - "\5\134\2\0\4\134\1\0\3\134\23\0\3\134\1\136" + - "\3\0\66\136\2\137\2\0\26\137\1\0\37\137\2\0" + - "\1\141\67\0\2\137\2\0\1\143\10\137\1\227\14\137" + - "\1\0\37\137\4\0\1\145\10\0\1\230\2\0\1\231" + - "\1\0\1\147\2\0\1\232\7\0\1\231\40\0\1\145" + - "\7\0\1\233\5\0\1\147\2\0\1\232\50\0\1\147" + - "\101\0\1\234\62\0\7\151\1\234\5\151\3\0\5\151" + - "\2\0\4\151\1\0\3\151\23\0\3\151\14\0\1\235" + - "\55\0\1\236\3\0\66\236\14\0\1\237\62\0\7\155" + - "\1\237\5\155\3\0\5\155\2\0\4\155\1\0\3\155" + - "\23\0\3\155\5\0\1\30\1\31\1\30\1\31\1\30" + - "\2\31\1\152\5\30\1\0\1\153\1\154\1\30\1\240" + - "\3\30\2\0\4\30\1\0\1\31\1\30\1\31\23\0" + - "\3\30\5\0\7\50\1\0\5\50\2\0\6\50\2\0" + - "\4\50\1\0\3\50\23\0\1\241\2\50\5\0\7\50" + - "\1\0\5\50\2\0\3\50\1\242\2\50\2\0\4\50" + - "\1\0\3\50\23\0\3\50\1\173\3\0\66\173\1\176" + - "\3\0\66\176\1\200\3\0\66\200\5\0\7\50\1\0" + - "\5\50\2\0\3\50\1\243\2\50\2\0\4\50\1\0" + - "\3\50\23\0\3\50\17\0\1\244\73\0\1\244\50\0" + - "\2\216\2\0\27\216\1\245\11\216\1\246\24\216\1\124" + - "\1\122\2\0\1\216\25\124\1\216\17\124\1\216\17\124" + - "\2\220\2\0\27\220\1\247\12\220\1\246\23\220\1\125" + - "\1\122\2\0\1\220\25\125\1\220\17\125\1\220\17\125" + - "\2\222\2\0\27\222\1\250\13\222\1\246\22\222\1\126" + - "\1\122\2\0\1\222\25\126\1\222\17\126\1\222\17\126" + - "\2\224\2\0\27\224\1\251\15\224\1\246\20\224\1\127" + - "\1\122\2\0\1\224\25\127\1\224\17\127\1\224\17\127" + - "\5\0\7\134\1\0\5\134\3\0\1\134\1\252\3\134" + - "\2\0\4\134\1\0\3\134\23\0\3\134\2\137\2\0" + - "\25\137\1\253\1\0\37\137\16\0\1\254\70\0\1\255" + - "\61\0\1\256\71\0\1\30\1\31\1\30\1\31\1\30" + - "\2\31\1\152\5\30\1\0\1\153\1\154\2\30\1\257" + - "\2\30\2\0\4\30\1\0\1\31\1\30\1\31\23\0" + - "\3\30\1\216\3\0\66\216\1\220\3\0\66\220\1\222" + - "\3\0\66\222\1\224\3\0\66\224\5\0\7\134\1\0" + - "\5\134\3\0\2\134\1\260\2\134\2\0\4\134\1\0" + - "\3\134\23\0\3\134\2\137\2\0\3\137\1\261\22\137" + - "\1\0\37\137\17\0\1\262\73\0\1\262\76\0\1\263" + - "\50\0\1\30\1\31\1\30\1\31\1\30\2\31\1\152" + - "\5\30\1\0\1\153\1\154\3\30\1\264\1\30\2\0" + - "\4\30\1\0\1\31\1\30\1\31\23\0\3\30\5\0" + - "\7\134\1\0\5\134\3\0\3\134\1\265\1\134\2\0" + - "\4\134\1\0\3\134\23\0\3\134\2\137\2\0\21\137" + - "\1\266\4\137\1\0\37\137\27\0\1\267\42\0\2\266" + - "\2\0\26\266\1\0\37\266\30\0\1\270\45\0\1\270" + - "\65\0"; + "\1\166\2\50\23\0\3\50\7\0\7\50\1\0\5\50" + + "\2\0\6\50\2\0\4\50\1\0\3\50\23\0\3\50" + + "\7\0\7\50\1\0\3\50\1\167\1\50\2\0\6\50" + + "\2\0\1\50\1\167\2\50\1\0\3\50\23\0\3\50" + + "\7\0\7\50\1\0\5\50\2\0\3\50\1\170\2\50" + + "\2\0\4\50\1\0\3\50\23\0\1\165\2\50\7\0" + + "\4\171\4\0\1\171\10\0\1\171\5\0\1\171\4\0" + + "\3\171\25\0\1\171\7\0\7\50\1\0\5\50\2\0" + + "\2\50\1\172\3\50\2\0\4\50\1\0\3\50\23\0" + + "\3\50\43\0\1\173\40\0\1\174\1\0\1\174\30\0" + + "\1\174\32\0\2\175\2\0\27\175\1\176\11\175\1\177" + + "\26\175\2\200\2\0\27\200\1\201\12\200\1\177\25\200" + + "\2\202\2\0\27\202\1\203\13\202\1\177\24\202\5\0" + + "\7\50\1\0\5\50\2\0\2\50\1\204\3\50\2\0" + + "\4\50\1\0\3\50\23\0\3\50\7\0\7\50\1\0" + + "\5\50\2\0\6\50\2\0\1\205\3\50\1\0\3\50" + + "\23\0\2\50\1\205\24\0\1\206\73\0\1\207\25\0" + + "\1\210\1\211\44\0\1\212\26\0\1\213\44\0\1\211" + + "\135\0\1\214\74\0\1\215\74\0\1\100\23\0\1\216" + + "\72\0\1\217\63\0\7\123\1\0\5\123\1\0\7\123" + + "\1\0\5\123\1\0\3\123\23\0\3\123\2\0\2\124" + + "\3\0\25\124\1\0\17\124\1\0\21\124\2\126\2\0" + + "\1\220\25\126\1\220\1\221\11\126\1\124\4\126\1\220" + + "\21\126\2\127\2\0\1\222\25\127\1\222\1\223\12\127" + + "\1\124\3\127\1\222\21\127\2\130\2\0\1\224\25\130" + + "\1\224\1\225\13\130\1\124\2\130\1\224\21\130\2\131" + + "\2\0\1\226\25\131\1\226\1\227\15\131\1\124\1\226" + + "\21\131\2\132\2\0\70\132\2\0\1\134\76\0\7\136" + + "\1\0\5\136\3\0\5\136\2\0\4\136\1\0\3\136" + + "\23\0\3\136\7\0\1\230\6\136\1\0\5\136\3\0" + + "\5\136\2\0\4\136\1\0\3\136\23\0\3\136\2\0" + + "\1\140\3\0\70\140\2\141\2\0\26\141\1\0\41\141" + + "\2\0\1\143\71\0\2\141\2\0\1\145\10\141\1\231" + + "\14\141\1\0\41\141\4\0\1\147\10\0\1\232\2\0" + + "\1\233\1\0\1\151\2\0\1\234\7\0\1\233\42\0" + + "\1\147\7\0\1\235\5\0\1\151\2\0\1\234\52\0" + + "\1\151\103\0\1\236\64\0\7\153\1\236\5\153\3\0" + + "\5\153\2\0\4\153\1\0\3\153\23\0\3\153\16\0" + + "\1\237\57\0\1\240\3\0\70\240\14\0\1\241\64\0" + + "\7\157\1\241\5\157\3\0\5\157\2\0\4\157\1\0" + + "\3\157\23\0\3\157\7\0\1\30\1\31\1\30\1\31" + + "\1\30\2\31\1\154\5\30\1\0\1\155\1\156\1\30" + + "\1\242\3\30\2\0\4\30\1\0\1\31\1\30\1\31" + + "\23\0\3\30\7\0\7\50\1\0\5\50\2\0\6\50" + + "\2\0\4\50\1\0\3\50\23\0\1\243\2\50\7\0" + + "\7\50\1\0\5\50\2\0\3\50\1\244\2\50\2\0" + + "\4\50\1\0\3\50\23\0\3\50\2\0\1\175\3\0" + + "\70\175\1\200\3\0\70\200\1\202\3\0\70\202\5\0" + + "\7\50\1\0\5\50\2\0\3\50\1\245\2\50\2\0" + + "\4\50\1\0\3\50\23\0\3\50\21\0\1\246\75\0" + + "\1\246\52\0\2\220\2\0\27\220\1\247\11\220\1\250" + + "\26\220\1\126\1\124\2\0\1\220\25\126\1\220\17\126" + + "\1\220\21\126\2\222\2\0\27\222\1\251\12\222\1\250" + + "\25\222\1\127\1\124\2\0\1\222\25\127\1\222\17\127" + + "\1\222\21\127\2\224\2\0\27\224\1\252\13\224\1\250" + + "\24\224\1\130\1\124\2\0\1\224\25\130\1\224\17\130" + + "\1\224\21\130\2\226\2\0\27\226\1\253\15\226\1\250" + + "\22\226\1\131\1\124\2\0\1\226\25\131\1\226\17\131" + + "\1\226\21\131\5\0\7\136\1\0\5\136\3\0\1\136" + + "\1\254\3\136\2\0\4\136\1\0\3\136\23\0\3\136" + + "\2\0\2\141\2\0\25\141\1\255\1\0\41\141\16\0" + + "\1\256\72\0\1\257\63\0\1\260\73\0\1\30\1\31" + + "\1\30\1\31\1\30\2\31\1\154\5\30\1\0\1\155" + + "\1\156\2\30\1\261\2\30\2\0\4\30\1\0\1\31" + + "\1\30\1\31\23\0\3\30\2\0\1\220\3\0\70\220" + + "\1\222\3\0\70\222\1\224\3\0\70\224\1\226\3\0" + + "\70\226\5\0\7\136\1\0\5\136\3\0\2\136\1\262" + + "\2\136\2\0\4\136\1\0\3\136\23\0\3\136\2\0" + + "\2\141\2\0\3\141\1\263\22\141\1\0\41\141\17\0" + + "\1\264\75\0\1\264\100\0\1\265\52\0\1\30\1\31" + + "\1\30\1\31\1\30\2\31\1\154\5\30\1\0\1\155" + + "\1\156\3\30\1\266\1\30\2\0\4\30\1\0\1\31" + + "\1\30\1\31\23\0\3\30\7\0\7\136\1\0\5\136" + + "\3\0\3\136\1\267\1\136\2\0\4\136\1\0\3\136" + + "\23\0\3\136\2\0\2\141\2\0\21\141\1\270\4\141" + + "\1\0\41\141\27\0\1\271\44\0\2\270\2\0\26\270" + + "\1\0\41\270\30\0\1\272\47\0\1\272\67\0"; private static int[] zzUnpackTrans() { - int[] result = new int[6902]; + int[] result = new int[7140]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -466,15 +469,16 @@ public class _M68kLexer implements FlexLexer { private static final String ZZ_ATTRIBUTE_PACKED_0 = "\17\0\2\11\12\1\1\11\3\1\1\11\21\1\12\11" + - "\3\1\1\11\2\1\4\11\1\1\4\11\5\1\1\11" + - "\11\1\1\11\6\1\1\11\3\1\1\0\5\1\3\0" + - "\1\1\3\11\11\1\2\0\1\11\4\0\2\1\10\11" + - "\3\0\1\1\1\0\1\1\1\0\1\1\1\0\3\1" + - "\3\0\5\11\4\1\1\11\1\0\1\11\3\0\2\1" + - "\3\0\3\1\2\0\3\1\1\0\1\1"; + "\2\1\1\11\1\1\1\11\2\1\4\11\1\1\4\11" + + "\3\1\1\11\2\1\1\11\11\1\1\11\6\1\1\11" + + "\3\1\1\0\5\1\3\0\1\1\3\11\11\1\2\0" + + "\1\11\4\0\2\1\10\11\3\0\1\1\1\0\1\1" + + "\1\0\1\1\1\0\3\1\3\0\5\11\4\1\1\11" + + "\1\0\1\11\3\0\2\1\3\0\3\1\2\0\3\1" + + "\1\0\1\1"; private static int[] zzUnpackAttribute() { - int[] result = new int[184]; + int[] result = new int[186]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -814,14 +818,14 @@ public class _M68kLexer implements FlexLexer { return BAD_CHARACTER; } // fall through - case 81: + case 83: break; case 2: { yybegin(YYINITIAL); return WHITE_SPACE; } // fall through - case 82: + case 84: break; case 3: { yybegin(NOSOL); @@ -829,7 +833,7 @@ public class _M68kLexer implements FlexLexer { return WHITE_SPACE; } // fall through - case 83: + case 85: break; case 4: { yybegin(INSTRPART); @@ -838,7 +842,7 @@ public class _M68kLexer implements FlexLexer { return GLOBAL_LABEL_DEF; } // fall through - case 84: + case 86: break; case 5: { yybegin(INSTRPART); @@ -846,20 +850,20 @@ public class _M68kLexer implements FlexLexer { return LOCAL_LABEL_DEF; } // fall through - case 85: + case 87: break; case 6: { yybegin(YYINITIAL); return COMMENT; } // fall through - case 86: + case 88: break; case 7: { return WHITE_SPACE; } // fall through - case 87: + case 89: break; case 8: { if (isAsmMnemonicWithSize(yytext())) { @@ -887,498 +891,510 @@ public class _M68kLexer implements FlexLexer { return handleMacroMode(this); } // fall through - case 88: + case 90: break; case 9: { return handleMacroMode(this); } // fall through - case 89: + case 91: break; case 10: { yybegin(YYINITIAL); return EOL; } // fall through - case 90: + case 92: break; case 11: { return COLON; } // fall through - case 91: + case 93: break; case 12: { yybegin(WAITEOL); return COMMENT; } // fall through - case 92: + case 94: break; case 13: { startExpr(ASMOPS, ASMOPS_OP); return WHITE_SPACE; } // fall through - case 93: + case 95: break; case 14: { return handleEolCommentWhitespace(this); } // fall through - case 94: + case 96: break; case 15: { yybegin(exprOpState); return SYMBOL; } // fall through - case 95: + case 97: break; case 16: { yybegin(exprOpState); return DECIMAL; } // fall through - case 96: + case 98: break; case 17: { return SEPARATOR; } // fall through - case 97: + case 99: break; case 18: { return HASH; } // fall through - case 98: + case 100: break; case 19: { return OP_BITWISE_XOR; } // fall through - case 99: + case 101: break; case 20: { return ROUND_L; } // fall through - case 100: + case 102: break; case 21: { yybegin(exprOpState); return ROUND_R; } // fall through - case 101: + case 103: break; case 22: { return OP_UNARY_NOT; } // fall through - case 102: + case 104: break; case 23: { return OP_UNARY_COMPL; } // fall through - case 103: + case 105: break; case 24: { return OP_PLUS; } // fall through - case 104: + case 106: break; case 25: { return OP_MINUS; } // fall through - case 105: + case 107: break; case 26: { yybegin(exprOpState); return CURRENT_PC_SYMBOL; } // fall through - case 106: - break; - case 27: { - yybegin(exprState); - return OP_CMP_EQ; - } - // fall through - case 107: - break; - case 28: { - yybegin(exprState); - return OP_AR_MOD; - } - // fall through case 108: break; - case 29: { - yybegin(exprState); - return OP_CMP_LT; + case 27: { + return SQUARE_L; } // fall through case 109: break; - case 30: { + case 28: { yybegin(exprState); - return OP_CMP_GT; + return OP_CMP_EQ; } // fall through case 110: break; - case 31: { + case 29: { yybegin(exprState); - return SEPARATOR; + return OP_AR_MOD; } // fall through case 111: break; - case 32: { + case 30: { yybegin(exprState); - return OP_BITWISE_XOR; + return OP_CMP_LT; } // fall through case 112: break; - case 33: { + case 31: { yybegin(exprState); - return ROUND_L; + return OP_CMP_GT; } // fall through case 113: break; - case 34: { - return ROUND_R; + case 32: { + yybegin(exprState); + return SEPARATOR; } // fall through case 114: break; - case 35: { + case 33: { yybegin(exprState); - return OP_BITWISE_OR; + return OP_BITWISE_XOR; } // fall through case 115: break; - case 36: { + case 34: { yybegin(exprState); - return OP_UNARY_COMPL; + return ROUND_L; } // fall through case 116: break; - case 37: { - yybegin(exprState); - return OP_PLUS; + case 35: { + return ROUND_R; } // fall through case 117: break; - case 38: { + case 36: { yybegin(exprState); - return OP_MINUS; + return OP_BITWISE_OR; } // fall through case 118: break; - case 39: { + case 37: { yybegin(exprState); - return OP_AR_MUL; + return OP_UNARY_COMPL; } // fall through case 119: break; - case 40: { + case 38: { yybegin(exprState); - return OP_BITWISE_AND; + return OP_PLUS; } // fall through case 120: break; - case 41: { + case 39: { yybegin(exprState); - return OP_AR_DIV; + return OP_MINUS; } // fall through case 121: break; - case 42: { - startExpr(EXPR, EXPR_OP); - return OP_ASSIGN; + case 40: { + yybegin(exprState); + return OP_AR_MUL; } // fall through case 122: break; - case 43: { - return STRINGLIT; + case 41: { + yybegin(exprState); + return OP_BITWISE_AND; } // fall through case 123: break; - case 44: { - return COMMENT; + case 42: { + yybegin(exprState); + return OP_AR_DIV; } // fall through case 124: break; + case 43: { + return SQUARE_R; + } + // fall through + case 125: + break; + case 44: { + startExpr(EXPR, EXPR_OP); + return OP_ASSIGN; + } + // fall through + case 126: + break; case 45: { + return STRINGLIT; + } + // fall through + case 127: + break; + case 46: { + return COMMENT; + } + // fall through + case 128: + break; + case 47: { yybegin(MACROLINE); macroLines = 0; return WHITE_SPACE; } // fall through - case 125: + case 129: break; - case 46: { + case 48: { return MACRO_NAME; } // fall through - case 126: + case 130: break; - case 47: { + case 49: { yybegin(MACROWAITEOL); return COMMENT; } // fall through - case 127: + case 131: break; - case 48: { + case 50: { return MACRO_LINE; } // fall through - case 128: + case 132: break; - case 49: { + case 51: { return handleMacroLineEol(this); } // fall through - case 129: + case 133: break; - case 50: { + case 52: { yybegin(ASSIGNMENT); eatOneWhitespace = true; yypushback(pushbackAssignment(yytext())); return SYMBOLDEF; } // fall through - case 130: + case 134: break; - case 51: { + case 53: { yybegin(INSTRPART); eatOneWhitespace = false; yypushback(pushbackLabelColons(yytext())); return LOCAL_LABEL_DEF; } // fall through - case 131: + case 135: break; - case 52: { + case 54: { yybegin(INSTRPART); yypushback(pushbackLabelColons(yytext())); return GLOBAL_LABEL_DEF; } // fall through - case 132: - break; - case 53: { - return OPSIZE_BS; - } - // fall through - case 133: - break; - case 54: { - return OPSIZE_W; - } - // fall through - case 134: - break; - case 55: { - return OPSIZE_L; - } - // fall through - case 135: - break; - case 56: { - yybegin(exprOpState); - return AREG; - } - // fall through case 136: break; - case 57: { - yybegin(exprOpState); - return REG_SP; + case 55: { + return OPSIZE_BS; } // fall through case 137: break; - case 58: { - yybegin(exprOpState); - return DREG; + case 56: { + return OPSIZE_W; } // fall through case 138: break; - case 59: { - yybegin(exprOpState); - return REG_SR; + case 57: { + return OPSIZE_L; } // fall through case 139: break; - case 60: { + case 58: { yybegin(exprOpState); - return HEXADECIMAL; + return AREG; } // fall through case 140: break; - case 61: { + case 59: { yybegin(exprOpState); - return BINARY; + return REG_SP; } // fall through case 141: break; - case 62: { + case 60: { yybegin(exprOpState); - return OCTAL; + return DREG; } // fall through case 142: break; - case 63: { + case 61: { yybegin(exprOpState); - return STRINGLIT; + return REG_SR; } // fall through case 143: break; - case 64: { + case 62: { yybegin(exprOpState); - return PC; + return HEXADECIMAL; } // fall through case 144: break; - case 65: { - yybegin(exprState); - return OP_CMP_LT_EQ; + case 63: { + yybegin(exprOpState); + return BINARY; } // fall through case 145: break; - case 66: { - yybegin(exprState); - return OP_AR_SHIFT_L; + case 64: { + yybegin(exprOpState); + return OCTAL; } // fall through case 146: break; - case 67: { - yybegin(exprState); - return OP_CMP_NOT_EQ; + case 65: { + yybegin(exprOpState); + return STRINGLIT; } // fall through case 147: break; - case 68: { - yybegin(exprState); - return OP_CMP_GT_EQ; + case 66: { + yybegin(exprOpState); + return PC; } // fall through case 148: break; - case 69: { + case 67: { yybegin(exprState); - return OP_AR_SHIFT_R; + return OP_CMP_LT_EQ; } // fall through case 149: break; - case 70: { + case 68: { yybegin(exprState); - return OP_LOGICAL_AND; + return OP_AR_SHIFT_L; } // fall through case 150: break; - case 71: { + case 69: { yybegin(exprState); - return OP_LOGICAL_OR; + return OP_CMP_NOT_EQ; } // fall through case 151: break; + case 70: { + yybegin(exprState); + return OP_CMP_GT_EQ; + } + // fall through + case 152: + break; + case 71: { + yybegin(exprState); + return OP_AR_SHIFT_R; + } + // fall through + case 153: + break; case 72: { + yybegin(exprState); + return OP_LOGICAL_AND; + } + // fall through + case 154: + break; + case 73: { + yybegin(exprState); + return OP_LOGICAL_OR; + } + // fall through + case 155: + break; + case 74: { yybegin(INSTRPART); yypushback(pushbackLabelColons(yytext())); return LOCAL_LABEL_DEF; } // fall through - case 152: + case 156: break; - case 73: { + case 75: { yybegin(exprOpState); return REG_USP; } // fall through - case 153: + case 157: break; - case 74: { + case 76: { yybegin(exprOpState); return REG_CCR; } // fall through - case 154: + case 158: break; - case 75: { + case 77: { yybegin(exprOpState); return REG_VBR; } // fall through - case 155: + case 159: break; - case 76: { + case 78: { startExpr(EXPR, EXPR_OP); return EQU; } // fall through - case 156: + case 160: break; - case 77: { + case 79: { yybegin(MACRODEF); return MACRO_TAG; } // fall through - case 157: + case 161: break; - case 78: { + case 80: { return MACRO_TAG; } // fall through - case 158: + case 162: break; - case 79: { + case 81: { yybegin(MACROTERMINATION); return MACRO_END_TAG; } // fall through - case 159: + case 163: break; - case 80: { + case 82: { yybegin(MACRODEF); yypushback(pushbackAfterFirstToken(yytext())); return MACRO_NAME; } // fall through - case 160: + case 164: 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 index 534b379..07a6d7d 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 @@ -41,8 +41,9 @@ public class M68kParser implements PsiParser, LightPsiParser { 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, - REGISTER_LIST_ADDRESSING_MODE, SPECIAL_REGISTER_DIRECT_ADDRESSING_MODE), + MEMORY_INDIRECT_ADDRESSING_MODE, MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE, MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE, 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, PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE, + PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE, PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE, REGISTER_LIST_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, @@ -288,6 +289,12 @@ public class M68kParser implements PsiParser, LightPsiParser { // | AddressRegisterIndirectAddressingMode // | AddressRegisterIndirectWithDisplacementNewAddressingMode // | ProgramCounterIndirectWithDisplacementNewAddressingMode + // | MemoryIndirectAddressingMode + // | ProgramCounterMemoryIndirectAddressingMode + // | MemoryIndirectPostIndexedAddressingMode + // | ProgramCounterMemoryIndirectPostIndexedAddressingMode + // | MemoryIndirectPreIndexedAddressingMode + // | ProgramCounterMemoryIndirectPreIndexedAddressingMode // | AddressRegisterIndirectWithIndexNewAddressingMode // | ProgramCounterIndirectWithIndexNewAddressingMode // | AddressRegisterIndirectWithDisplacementOldAddressingMode @@ -309,6 +316,12 @@ public class M68kParser implements PsiParser, LightPsiParser { if (!r) r = AddressRegisterIndirectAddressingMode(b, l + 1); if (!r) r = AddressRegisterIndirectWithDisplacementNewAddressingMode(b, l + 1); if (!r) r = ProgramCounterIndirectWithDisplacementNewAddressingMode(b, l + 1); + if (!r) r = MemoryIndirectAddressingMode(b, l + 1); + if (!r) r = ProgramCounterMemoryIndirectAddressingMode(b, l + 1); + if (!r) r = MemoryIndirectPostIndexedAddressingMode(b, l + 1); + if (!r) r = ProgramCounterMemoryIndirectPostIndexedAddressingMode(b, l + 1); + if (!r) r = MemoryIndirectPreIndexedAddressingMode(b, l + 1); + if (!r) r = ProgramCounterMemoryIndirectPreIndexedAddressingMode(b, l + 1); if (!r) r = AddressRegisterIndirectWithIndexNewAddressingMode(b, l + 1); if (!r) r = ProgramCounterIndirectWithIndexNewAddressingMode(b, l + 1); if (!r) r = AddressRegisterIndirectWithDisplacementOldAddressingMode(b, l + 1); @@ -794,6 +807,186 @@ public class M68kParser implements PsiParser, LightPsiParser { return r; } + /* ********************************************************** */ + // ROUND_L SQUARE_L (expr SEPARATOR)? AddressRegister SQUARE_R (SEPARATOR expr)? ROUND_R + public static boolean MemoryIndirectAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, MEMORY_INDIRECT_ADDRESSING_MODE, ""); + r = consumeTokens(b, 0, ROUND_L, SQUARE_L); + r = r && MemoryIndirectAddressingMode_2(b, l + 1); + r = r && AddressRegister(b, l + 1); + r = r && consumeToken(b, SQUARE_R); + r = r && MemoryIndirectAddressingMode_5(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + // (expr SEPARATOR)? + private static boolean MemoryIndirectAddressingMode_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectAddressingMode_2")) return false; + MemoryIndirectAddressingMode_2_0(b, l + 1); + return true; + } + + // expr SEPARATOR + private static boolean MemoryIndirectAddressingMode_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectAddressingMode_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = expr(b, l + 1, -1); + r = r && consumeToken(b, SEPARATOR); + exit_section_(b, m, null, r); + return r; + } + + // (SEPARATOR expr)? + private static boolean MemoryIndirectAddressingMode_5(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectAddressingMode_5")) return false; + MemoryIndirectAddressingMode_5_0(b, l + 1); + return true; + } + + // SEPARATOR expr + private static boolean MemoryIndirectAddressingMode_5_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectAddressingMode_5_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokenFast(b, SEPARATOR); + r = r && expr(b, l + 1, -1); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // ROUND_L (SQUARE_L (expr SEPARATOR)? AddressRegister SQUARE_R SEPARATOR)? IndexRegister (SEPARATOR expr)? ROUND_R + public static boolean MemoryIndirectPostIndexedAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPostIndexedAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE, ""); + r = consumeTokenFast(b, ROUND_L); + r = r && MemoryIndirectPostIndexedAddressingMode_1(b, l + 1); + r = r && IndexRegister(b, l + 1); + r = r && MemoryIndirectPostIndexedAddressingMode_3(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + // (SQUARE_L (expr SEPARATOR)? AddressRegister SQUARE_R SEPARATOR)? + private static boolean MemoryIndirectPostIndexedAddressingMode_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPostIndexedAddressingMode_1")) return false; + MemoryIndirectPostIndexedAddressingMode_1_0(b, l + 1); + return true; + } + + // SQUARE_L (expr SEPARATOR)? AddressRegister SQUARE_R SEPARATOR + private static boolean MemoryIndirectPostIndexedAddressingMode_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPostIndexedAddressingMode_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokenFast(b, SQUARE_L); + r = r && MemoryIndirectPostIndexedAddressingMode_1_0_1(b, l + 1); + r = r && AddressRegister(b, l + 1); + r = r && consumeTokens(b, 0, SQUARE_R, SEPARATOR); + exit_section_(b, m, null, r); + return r; + } + + // (expr SEPARATOR)? + private static boolean MemoryIndirectPostIndexedAddressingMode_1_0_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPostIndexedAddressingMode_1_0_1")) return false; + MemoryIndirectPostIndexedAddressingMode_1_0_1_0(b, l + 1); + return true; + } + + // expr SEPARATOR + private static boolean MemoryIndirectPostIndexedAddressingMode_1_0_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPostIndexedAddressingMode_1_0_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = expr(b, l + 1, -1); + r = r && consumeToken(b, SEPARATOR); + exit_section_(b, m, null, r); + return r; + } + + // (SEPARATOR expr)? + private static boolean MemoryIndirectPostIndexedAddressingMode_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPostIndexedAddressingMode_3")) return false; + MemoryIndirectPostIndexedAddressingMode_3_0(b, l + 1); + return true; + } + + // SEPARATOR expr + private static boolean MemoryIndirectPostIndexedAddressingMode_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPostIndexedAddressingMode_3_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokenFast(b, SEPARATOR); + r = r && expr(b, l + 1, -1); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // ROUND_L SQUARE_L (expr SEPARATOR)? AddressRegister SEPARATOR IndexRegister SQUARE_R (SEPARATOR expr)? ROUND_R + public static boolean MemoryIndirectPreIndexedAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPreIndexedAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE, ""); + r = consumeTokens(b, 0, ROUND_L, SQUARE_L); + r = r && MemoryIndirectPreIndexedAddressingMode_2(b, l + 1); + r = r && AddressRegister(b, l + 1); + r = r && consumeToken(b, SEPARATOR); + r = r && IndexRegister(b, l + 1); + r = r && consumeToken(b, SQUARE_R); + r = r && MemoryIndirectPreIndexedAddressingMode_7(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + // (expr SEPARATOR)? + private static boolean MemoryIndirectPreIndexedAddressingMode_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPreIndexedAddressingMode_2")) return false; + MemoryIndirectPreIndexedAddressingMode_2_0(b, l + 1); + return true; + } + + // expr SEPARATOR + private static boolean MemoryIndirectPreIndexedAddressingMode_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPreIndexedAddressingMode_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = expr(b, l + 1, -1); + r = r && consumeToken(b, SEPARATOR); + exit_section_(b, m, null, r); + return r; + } + + // (SEPARATOR expr)? + private static boolean MemoryIndirectPreIndexedAddressingMode_7(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPreIndexedAddressingMode_7")) return false; + MemoryIndirectPreIndexedAddressingMode_7_0(b, l + 1); + return true; + } + + // SEPARATOR expr + private static boolean MemoryIndirectPreIndexedAddressingMode_7_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "MemoryIndirectPreIndexedAddressingMode_7_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokenFast(b, SEPARATOR); + r = r && expr(b, l + 1, -1); + exit_section_(b, m, null, r); + return r; + } + /* ********************************************************** */ // OPSIZE_BS|OPSIZE_W|OPSIZE_L public static boolean OperandSize(PsiBuilder b, int l) { @@ -1034,6 +1227,183 @@ public class M68kParser implements PsiParser, LightPsiParser { return true; } + /* ********************************************************** */ + // ROUND_L SQUARE_L (expr SEPARATOR)? PC SQUARE_R (SEPARATOR expr)? ROUND_R + public static boolean ProgramCounterMemoryIndirectAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE, ""); + r = consumeTokens(b, 0, ROUND_L, SQUARE_L); + r = r && ProgramCounterMemoryIndirectAddressingMode_2(b, l + 1); + r = r && consumeTokens(b, 0, PC, SQUARE_R); + r = r && ProgramCounterMemoryIndirectAddressingMode_5(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + // (expr SEPARATOR)? + private static boolean ProgramCounterMemoryIndirectAddressingMode_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectAddressingMode_2")) return false; + ProgramCounterMemoryIndirectAddressingMode_2_0(b, l + 1); + return true; + } + + // expr SEPARATOR + private static boolean ProgramCounterMemoryIndirectAddressingMode_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectAddressingMode_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = expr(b, l + 1, -1); + r = r && consumeToken(b, SEPARATOR); + exit_section_(b, m, null, r); + return r; + } + + // (SEPARATOR expr)? + private static boolean ProgramCounterMemoryIndirectAddressingMode_5(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectAddressingMode_5")) return false; + ProgramCounterMemoryIndirectAddressingMode_5_0(b, l + 1); + return true; + } + + // SEPARATOR expr + private static boolean ProgramCounterMemoryIndirectAddressingMode_5_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectAddressingMode_5_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokenFast(b, SEPARATOR); + r = r && expr(b, l + 1, -1); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // ROUND_L (SQUARE_L (expr SEPARATOR)? PC SQUARE_R SEPARATOR)? IndexRegister (SEPARATOR expr)? ROUND_R + public static boolean ProgramCounterMemoryIndirectPostIndexedAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPostIndexedAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE, ""); + r = consumeTokenFast(b, ROUND_L); + r = r && ProgramCounterMemoryIndirectPostIndexedAddressingMode_1(b, l + 1); + r = r && IndexRegister(b, l + 1); + r = r && ProgramCounterMemoryIndirectPostIndexedAddressingMode_3(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + // (SQUARE_L (expr SEPARATOR)? PC SQUARE_R SEPARATOR)? + private static boolean ProgramCounterMemoryIndirectPostIndexedAddressingMode_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPostIndexedAddressingMode_1")) return false; + ProgramCounterMemoryIndirectPostIndexedAddressingMode_1_0(b, l + 1); + return true; + } + + // SQUARE_L (expr SEPARATOR)? PC SQUARE_R SEPARATOR + private static boolean ProgramCounterMemoryIndirectPostIndexedAddressingMode_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPostIndexedAddressingMode_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokenFast(b, SQUARE_L); + r = r && ProgramCounterMemoryIndirectPostIndexedAddressingMode_1_0_1(b, l + 1); + r = r && consumeTokens(b, 0, PC, SQUARE_R, SEPARATOR); + exit_section_(b, m, null, r); + return r; + } + + // (expr SEPARATOR)? + private static boolean ProgramCounterMemoryIndirectPostIndexedAddressingMode_1_0_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPostIndexedAddressingMode_1_0_1")) return false; + ProgramCounterMemoryIndirectPostIndexedAddressingMode_1_0_1_0(b, l + 1); + return true; + } + + // expr SEPARATOR + private static boolean ProgramCounterMemoryIndirectPostIndexedAddressingMode_1_0_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPostIndexedAddressingMode_1_0_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = expr(b, l + 1, -1); + r = r && consumeToken(b, SEPARATOR); + exit_section_(b, m, null, r); + return r; + } + + // (SEPARATOR expr)? + private static boolean ProgramCounterMemoryIndirectPostIndexedAddressingMode_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPostIndexedAddressingMode_3")) return false; + ProgramCounterMemoryIndirectPostIndexedAddressingMode_3_0(b, l + 1); + return true; + } + + // SEPARATOR expr + private static boolean ProgramCounterMemoryIndirectPostIndexedAddressingMode_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPostIndexedAddressingMode_3_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokenFast(b, SEPARATOR); + r = r && expr(b, l + 1, -1); + exit_section_(b, m, null, r); + return r; + } + + /* ********************************************************** */ + // ROUND_L SQUARE_L (expr SEPARATOR)? PC SEPARATOR IndexRegister SQUARE_R (SEPARATOR expr)? ROUND_R + public static boolean ProgramCounterMemoryIndirectPreIndexedAddressingMode(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPreIndexedAddressingMode")) return false; + if (!nextTokenIsFast(b, ROUND_L)) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE, ""); + r = consumeTokens(b, 0, ROUND_L, SQUARE_L); + r = r && ProgramCounterMemoryIndirectPreIndexedAddressingMode_2(b, l + 1); + r = r && consumeTokens(b, 0, PC, SEPARATOR); + r = r && IndexRegister(b, l + 1); + r = r && consumeToken(b, SQUARE_R); + r = r && ProgramCounterMemoryIndirectPreIndexedAddressingMode_7(b, l + 1); + r = r && consumeToken(b, ROUND_R); + exit_section_(b, l, m, r, false, null); + return r; + } + + // (expr SEPARATOR)? + private static boolean ProgramCounterMemoryIndirectPreIndexedAddressingMode_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPreIndexedAddressingMode_2")) return false; + ProgramCounterMemoryIndirectPreIndexedAddressingMode_2_0(b, l + 1); + return true; + } + + // expr SEPARATOR + private static boolean ProgramCounterMemoryIndirectPreIndexedAddressingMode_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPreIndexedAddressingMode_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = expr(b, l + 1, -1); + r = r && consumeToken(b, SEPARATOR); + exit_section_(b, m, null, r); + return r; + } + + // (SEPARATOR expr)? + private static boolean ProgramCounterMemoryIndirectPreIndexedAddressingMode_7(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPreIndexedAddressingMode_7")) return false; + ProgramCounterMemoryIndirectPreIndexedAddressingMode_7_0(b, l + 1); + return true; + } + + // SEPARATOR expr + private static boolean ProgramCounterMemoryIndirectPreIndexedAddressingMode_7_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ProgramCounterMemoryIndirectPreIndexedAddressingMode_7_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokenFast(b, SEPARATOR); + r = r && expr(b, l + 1, -1); + exit_section_(b, m, null, r); + return r; + } + /* ********************************************************** */ // CURRENT_PC_SYMBOL public static boolean ProgramCounterReference(PsiBuilder b, int l) { diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMemoryIndirectAddressingMode.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMemoryIndirectAddressingMode.java new file mode 100644 index 0000000..c70de59 --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMemoryIndirectAddressingMode.java @@ -0,0 +1,23 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public interface M68kMemoryIndirectAddressingMode extends M68kAddressingMode, M68kWithAddressRegisterIndirect, M68kWithBaseDisplacement, M68kWithOuterDisplacement { + + @NotNull + M68kAddressRegister getAddressRegister(); + + @NotNull + List getExprList(); + + @Nullable + M68kExpr getBaseDisplacement(); + + @Nullable + M68kExpr getOuterDisplacement(); + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMemoryIndirectPostIndexedAddressingMode.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMemoryIndirectPostIndexedAddressingMode.java new file mode 100644 index 0000000..68a9d8b --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMemoryIndirectPostIndexedAddressingMode.java @@ -0,0 +1,26 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public interface M68kMemoryIndirectPostIndexedAddressingMode extends M68kAddressingMode, M68kWithAddressRegisterIndirect, M68kWithBaseDisplacement, M68kWithIndexRegister, M68kWithOuterDisplacement { + + @Nullable + M68kAddressRegister getAddressRegister(); + + @NotNull + M68kIndexRegister getIndexRegister(); + + @NotNull + List getExprList(); + + @Nullable + M68kExpr getBaseDisplacement(); + + @Nullable + M68kExpr getOuterDisplacement(); + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMemoryIndirectPreIndexedAddressingMode.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMemoryIndirectPreIndexedAddressingMode.java new file mode 100644 index 0000000..ebbadac --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kMemoryIndirectPreIndexedAddressingMode.java @@ -0,0 +1,26 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public interface M68kMemoryIndirectPreIndexedAddressingMode extends M68kAddressingMode, M68kWithAddressRegisterIndirect, M68kWithBaseDisplacement, M68kWithIndexRegister, M68kWithOuterDisplacement { + + @NotNull + M68kAddressRegister getAddressRegister(); + + @NotNull + M68kIndexRegister getIndexRegister(); + + @NotNull + List getExprList(); + + @Nullable + M68kExpr getBaseDisplacement(); + + @Nullable + M68kExpr getOuterDisplacement(); + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterMemoryIndirectAddressingMode.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterMemoryIndirectAddressingMode.java new file mode 100644 index 0000000..41cfecc --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterMemoryIndirectAddressingMode.java @@ -0,0 +1,20 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public interface M68kProgramCounterMemoryIndirectAddressingMode extends M68kAddressingMode, M68kWithBaseDisplacement, M68kWithOuterDisplacement { + + @NotNull + List getExprList(); + + @Nullable + M68kExpr getBaseDisplacement(); + + @Nullable + M68kExpr getOuterDisplacement(); + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterMemoryIndirectPostIndexedAddressingMode.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterMemoryIndirectPostIndexedAddressingMode.java new file mode 100644 index 0000000..62eb448 --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterMemoryIndirectPostIndexedAddressingMode.java @@ -0,0 +1,23 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public interface M68kProgramCounterMemoryIndirectPostIndexedAddressingMode extends M68kAddressingMode, M68kWithBaseDisplacement, M68kWithIndexRegister, M68kWithOuterDisplacement { + + @NotNull + M68kIndexRegister getIndexRegister(); + + @NotNull + List getExprList(); + + @Nullable + M68kExpr getBaseDisplacement(); + + @Nullable + M68kExpr getOuterDisplacement(); + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterMemoryIndirectPreIndexedAddressingMode.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterMemoryIndirectPreIndexedAddressingMode.java new file mode 100644 index 0000000..97ea0ee --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kProgramCounterMemoryIndirectPreIndexedAddressingMode.java @@ -0,0 +1,23 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public interface M68kProgramCounterMemoryIndirectPreIndexedAddressingMode extends M68kAddressingMode, M68kWithBaseDisplacement, M68kWithIndexRegister, M68kWithOuterDisplacement { + + @NotNull + M68kIndexRegister getIndexRegister(); + + @NotNull + List getExprList(); + + @Nullable + M68kExpr getBaseDisplacement(); + + @Nullable + M68kExpr getOuterDisplacement(); + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java index 54059ad..d30f6e7 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java @@ -56,6 +56,9 @@ public interface M68kTypes { IElementType MACRO_DEFINITION = M68kStubElementTypeFactory.stubFactory("MACRO_DEFINITION"); IElementType MACRO_NAME_DEFINITION = new M68kElementType("MACRO_NAME_DEFINITION"); IElementType MACRO_PLAIN_LINE = new M68kElementType("MACRO_PLAIN_LINE"); + IElementType MEMORY_INDIRECT_ADDRESSING_MODE = new M68kElementType("MEMORY_INDIRECT_ADDRESSING_MODE"); + IElementType MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE = new M68kElementType("MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE"); + IElementType MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE = new M68kElementType("MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE"); IElementType OPERAND_SIZE = new M68kElementType("OPERAND_SIZE"); IElementType PAREN_EXPR = new M68kElementType("PAREN_EXPR"); IElementType PREPROCESSOR_DIRECTIVE = new M68kElementType("PREPROCESSOR_DIRECTIVE"); @@ -64,6 +67,9 @@ public interface M68kTypes { IElementType PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE"); IElementType PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE"); IElementType PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE"); + IElementType PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE"); + IElementType PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE"); + IElementType PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE"); IElementType PROGRAM_COUNTER_REFERENCE = new M68kElementType("PROGRAM_COUNTER_REFERENCE"); IElementType REF_EXPR = new M68kElementType("REF_EXPR"); IElementType REGISTER = new M68kElementType("REGISTER"); @@ -134,6 +140,8 @@ public interface M68kTypes { IElementType ROUND_L = new M68kTokenType("ROUND_L"); IElementType ROUND_R = new M68kTokenType("ROUND_R"); IElementType SEPARATOR = new M68kTokenType("SEPARATOR"); + IElementType SQUARE_L = new M68kTokenType("SQUARE_L"); + IElementType SQUARE_R = new M68kTokenType("SQUARE_R"); IElementType STRINGLIT = new M68kTokenType("STRINGLIT"); IElementType SYMBOL = new M68kTokenType("SYMBOL"); IElementType SYMBOLDEF = new M68kTokenType("SYMBOLDEF"); @@ -231,6 +239,12 @@ public interface M68kTypes { return new M68kMacroNameDefinitionImpl(node); } else if (type == MACRO_PLAIN_LINE) { return new M68kMacroPlainLineImpl(node); + } else if (type == MEMORY_INDIRECT_ADDRESSING_MODE) { + return new M68kMemoryIndirectAddressingModeImpl(node); + } else if (type == MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) { + return new M68kMemoryIndirectPostIndexedAddressingModeImpl(node); + } else if (type == MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) { + return new M68kMemoryIndirectPreIndexedAddressingModeImpl(node); } else if (type == OPERAND_SIZE) { return new M68kOperandSizeImpl(node); } else if (type == PAREN_EXPR) { @@ -247,6 +261,12 @@ public interface M68kTypes { return new M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(node); } else if (type == PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) { return new M68kProgramCounterIndirectWithIndexOldAddressingModeImpl(node); + } else if (type == PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE) { + return new M68kProgramCounterMemoryIndirectAddressingModeImpl(node); + } else if (type == PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) { + return new M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl(node); + } else if (type == PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) { + return new M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl(node); } else if (type == PROGRAM_COUNTER_REFERENCE) { return new M68kProgramCounterReferenceImpl(node); } else if (type == REF_EXPR) { diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java index 73746e2..39f8035 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java @@ -127,6 +127,29 @@ public class M68kVisitor extends PsiElementVisitor { visitPsiElement(o); } + public void visitMemoryIndirectAddressingMode(@NotNull M68kMemoryIndirectAddressingMode o) { + visitAddressingMode(o); + // visitWithAddressRegisterIndirect(o); + // visitWithBaseDisplacement(o); + // visitWithOuterDisplacement(o); + } + + public void visitMemoryIndirectPostIndexedAddressingMode(@NotNull M68kMemoryIndirectPostIndexedAddressingMode o) { + visitAddressingMode(o); + // visitWithAddressRegisterIndirect(o); + // visitWithBaseDisplacement(o); + // visitWithIndexRegister(o); + // visitWithOuterDisplacement(o); + } + + public void visitMemoryIndirectPreIndexedAddressingMode(@NotNull M68kMemoryIndirectPreIndexedAddressingMode o) { + visitAddressingMode(o); + // visitWithAddressRegisterIndirect(o); + // visitWithBaseDisplacement(o); + // visitWithIndexRegister(o); + // visitWithOuterDisplacement(o); + } + public void visitOperandSize(@NotNull M68kOperandSize o) { visitPsiElement(o); } @@ -161,6 +184,26 @@ public class M68kVisitor extends PsiElementVisitor { // visitWithIndexRegister(o); } + public void visitProgramCounterMemoryIndirectAddressingMode(@NotNull M68kProgramCounterMemoryIndirectAddressingMode o) { + visitAddressingMode(o); + // visitWithBaseDisplacement(o); + // visitWithOuterDisplacement(o); + } + + public void visitProgramCounterMemoryIndirectPostIndexedAddressingMode(@NotNull M68kProgramCounterMemoryIndirectPostIndexedAddressingMode o) { + visitAddressingMode(o); + // visitWithBaseDisplacement(o); + // visitWithIndexRegister(o); + // visitWithOuterDisplacement(o); + } + + public void visitProgramCounterMemoryIndirectPreIndexedAddressingMode(@NotNull M68kProgramCounterMemoryIndirectPreIndexedAddressingMode o) { + visitAddressingMode(o); + // visitWithBaseDisplacement(o); + // visitWithIndexRegister(o); + // visitWithOuterDisplacement(o); + } + public void visitProgramCounterReference(@NotNull M68kProgramCounterReference o) { visitPsiElement(o); } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMemoryIndirectAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMemoryIndirectAddressingModeImpl.java new file mode 100644 index 0000000..1bb31d2 --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMemoryIndirectAddressingModeImpl.java @@ -0,0 +1,59 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi.impl; + +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import de.platon42.intellij.plugins.m68k.psi.M68kAddressRegister; +import de.platon42.intellij.plugins.m68k.psi.M68kExpr; +import de.platon42.intellij.plugins.m68k.psi.M68kMemoryIndirectAddressingMode; +import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public class M68kMemoryIndirectAddressingModeImpl extends M68kAddressingModeImpl implements M68kMemoryIndirectAddressingMode { + + public M68kMemoryIndirectAddressingModeImpl(@NotNull ASTNode node) { + super(node); + } + + @Override + public void accept(@NotNull M68kVisitor visitor) { + visitor.visitMemoryIndirectAddressingMode(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof M68kVisitor) accept((M68kVisitor) visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public M68kAddressRegister getAddressRegister() { + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); + } + + @Override + @NotNull + public List getExprList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kExpr.class); + } + + @Override + @Nullable + public M68kExpr getBaseDisplacement() { + List p1 = getExprList(); + return p1.size() < 1 ? null : p1.get(0); + } + + @Override + @Nullable + public M68kExpr getOuterDisplacement() { + List p1 = getExprList(); + return p1.size() < 2 ? null : p1.get(1); + } + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMemoryIndirectPostIndexedAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMemoryIndirectPostIndexedAddressingModeImpl.java new file mode 100644 index 0000000..9504ff9 --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMemoryIndirectPostIndexedAddressingModeImpl.java @@ -0,0 +1,62 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi.impl; + +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import de.platon42.intellij.plugins.m68k.psi.*; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public class M68kMemoryIndirectPostIndexedAddressingModeImpl extends M68kAddressingModeImpl implements M68kMemoryIndirectPostIndexedAddressingMode { + + public M68kMemoryIndirectPostIndexedAddressingModeImpl(@NotNull ASTNode node) { + super(node); + } + + @Override + public void accept(@NotNull M68kVisitor visitor) { + visitor.visitMemoryIndirectPostIndexedAddressingMode(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof M68kVisitor) accept((M68kVisitor) visitor); + else super.accept(visitor); + } + + @Override + @Nullable + public M68kAddressRegister getAddressRegister() { + return PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class); + } + + @Override + @NotNull + public M68kIndexRegister getIndexRegister() { + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kIndexRegister.class)); + } + + @Override + @NotNull + public List getExprList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kExpr.class); + } + + @Override + @Nullable + public M68kExpr getBaseDisplacement() { + List p1 = getExprList(); + return p1.size() < 1 ? null : p1.get(0); + } + + @Override + @Nullable + public M68kExpr getOuterDisplacement() { + List p1 = getExprList(); + return p1.size() < 2 ? null : p1.get(1); + } + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMemoryIndirectPreIndexedAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMemoryIndirectPreIndexedAddressingModeImpl.java new file mode 100644 index 0000000..5290370 --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kMemoryIndirectPreIndexedAddressingModeImpl.java @@ -0,0 +1,62 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi.impl; + +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import de.platon42.intellij.plugins.m68k.psi.*; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public class M68kMemoryIndirectPreIndexedAddressingModeImpl extends M68kAddressingModeImpl implements M68kMemoryIndirectPreIndexedAddressingMode { + + public M68kMemoryIndirectPreIndexedAddressingModeImpl(@NotNull ASTNode node) { + super(node); + } + + @Override + public void accept(@NotNull M68kVisitor visitor) { + visitor.visitMemoryIndirectPreIndexedAddressingMode(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof M68kVisitor) accept((M68kVisitor) visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public M68kAddressRegister getAddressRegister() { + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kAddressRegister.class)); + } + + @Override + @NotNull + public M68kIndexRegister getIndexRegister() { + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kIndexRegister.class)); + } + + @Override + @NotNull + public List getExprList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kExpr.class); + } + + @Override + @Nullable + public M68kExpr getBaseDisplacement() { + List p1 = getExprList(); + return p1.size() < 1 ? null : p1.get(0); + } + + @Override + @Nullable + public M68kExpr getOuterDisplacement() { + List p1 = getExprList(); + return p1.size() < 2 ? null : p1.get(1); + } + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterMemoryIndirectAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterMemoryIndirectAddressingModeImpl.java new file mode 100644 index 0000000..dad4854 --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterMemoryIndirectAddressingModeImpl.java @@ -0,0 +1,52 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi.impl; + +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import de.platon42.intellij.plugins.m68k.psi.M68kExpr; +import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterMemoryIndirectAddressingMode; +import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public class M68kProgramCounterMemoryIndirectAddressingModeImpl extends M68kAddressingModeImpl implements M68kProgramCounterMemoryIndirectAddressingMode { + + public M68kProgramCounterMemoryIndirectAddressingModeImpl(@NotNull ASTNode node) { + super(node); + } + + @Override + public void accept(@NotNull M68kVisitor visitor) { + visitor.visitProgramCounterMemoryIndirectAddressingMode(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof M68kVisitor) accept((M68kVisitor) visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public List getExprList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kExpr.class); + } + + @Override + @Nullable + public M68kExpr getBaseDisplacement() { + List p1 = getExprList(); + return p1.size() < 1 ? null : p1.get(0); + } + + @Override + @Nullable + public M68kExpr getOuterDisplacement() { + List p1 = getExprList(); + return p1.size() < 2 ? null : p1.get(1); + } + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl.java new file mode 100644 index 0000000..3a0e2bf --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl.java @@ -0,0 +1,59 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi.impl; + +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import de.platon42.intellij.plugins.m68k.psi.M68kExpr; +import de.platon42.intellij.plugins.m68k.psi.M68kIndexRegister; +import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterMemoryIndirectPostIndexedAddressingMode; +import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public class M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl extends M68kAddressingModeImpl implements M68kProgramCounterMemoryIndirectPostIndexedAddressingMode { + + public M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl(@NotNull ASTNode node) { + super(node); + } + + @Override + public void accept(@NotNull M68kVisitor visitor) { + visitor.visitProgramCounterMemoryIndirectPostIndexedAddressingMode(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof M68kVisitor) accept((M68kVisitor) visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public M68kIndexRegister getIndexRegister() { + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kIndexRegister.class)); + } + + @Override + @NotNull + public List getExprList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kExpr.class); + } + + @Override + @Nullable + public M68kExpr getBaseDisplacement() { + List p1 = getExprList(); + return p1.size() < 1 ? null : p1.get(0); + } + + @Override + @Nullable + public M68kExpr getOuterDisplacement() { + List p1 = getExprList(); + return p1.size() < 2 ? null : p1.get(1); + } + +} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl.java new file mode 100644 index 0000000..f23f528 --- /dev/null +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl.java @@ -0,0 +1,59 @@ +// This is a generated file. Not intended for manual editing. +package de.platon42.intellij.plugins.m68k.psi.impl; + +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import de.platon42.intellij.plugins.m68k.psi.M68kExpr; +import de.platon42.intellij.plugins.m68k.psi.M68kIndexRegister; +import de.platon42.intellij.plugins.m68k.psi.M68kProgramCounterMemoryIndirectPreIndexedAddressingMode; +import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public class M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl extends M68kAddressingModeImpl implements M68kProgramCounterMemoryIndirectPreIndexedAddressingMode { + + public M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl(@NotNull ASTNode node) { + super(node); + } + + @Override + public void accept(@NotNull M68kVisitor visitor) { + visitor.visitProgramCounterMemoryIndirectPreIndexedAddressingMode(this); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof M68kVisitor) accept((M68kVisitor) visitor); + else super.accept(visitor); + } + + @Override + @NotNull + public M68kIndexRegister getIndexRegister() { + return notNullChild(PsiTreeUtil.getChildOfType(this, M68kIndexRegister.class)); + } + + @Override + @NotNull + public List getExprList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kExpr.class); + } + + @Override + @Nullable + public M68kExpr getBaseDisplacement() { + List p1 = getExprList(); + return p1.size() < 1 ? null : p1.get(0); + } + + @Override + @Nullable + public M68kExpr getOuterDisplacement() { + List p1 = getExprList(); + return p1.size() < 2 ? null : p1.get(1); + } + +} diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/asm/M68kIsa.kt b/src/main/java/de/platon42/intellij/plugins/m68k/asm/M68kIsa.kt index aa5241b..f3133b4 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/asm/M68kIsa.kt +++ b/src/main/java/de/platon42/intellij/plugins/m68k/asm/M68kIsa.kt @@ -46,6 +46,12 @@ enum class AddressMode(val description: String, val syntax: String) { ADDRESS_REGISTER_INDIRECT_WITH_SCALED_INDEX("address register indirect with scaled index", "(d8,An,Xn*s)"), PROGRAM_COUNTER_INDIRECT_WITH_INDEX("program counter indirect with index", "(d8,PC,Xn)"), PROGRAM_COUNTER_INDIRECT_WITH_SCALED_INDEX("program counter indirect with scaled index", "(d8,PC,Xn*s)"), + MEMORY_INDIRECT("memory indirect", "([bd,An],od)"), + MEMORY_INDIRECT_POSTINDEXED("memory indirect postindexed", "([bd,An],Xn*s,od)"), + MEMORY_INDIRECT_PREINDEXED("memory indirect preindexed", "([bd,An,Xn*s],od)"), + PROGRAM_COUNTER_MEMORY_INDIRECT("program counter memory indirect", "([bd,PC],od)"), + PROGRAM_COUNTER_MEMORY_INDIRECT_POSTINDEXED("program counter memory indirect postindexed", "([bd,PC],Xn*s,od)"), + PROGRAM_COUNTER_MEMORY_INDIRECT_PREINDEXED("program counter memory indirect preindexed", "([bd,PC,Xn*s],od)"), SPECIAL_REGISTER_DIRECT("special register", "sr|ccr|usp|vbr"), REGISTER_LIST("register list", "list"), IMMEDIATE_DATA("immediate", "#"), diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.flex b/src/main/java/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.flex index 1a090bf..488ab82 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.flex +++ b/src/main/java/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.flex @@ -168,7 +168,6 @@ PLAIN_MACRO_LINE=[^;\r\n]+ "+" { return OP_PLUS; } "-" { return OP_MINUS; } "*" { yybegin(exprOpState); return CURRENT_PC_SYMBOL; } - } { @@ -218,6 +217,8 @@ PLAIN_MACRO_LINE=[^;\r\n]+ "vbr" { yybegin(exprOpState); return REG_VBR; } "#" { return HASH; } + "\[" { return SQUARE_L; } +// "\]" { return SQUARE_R; } {SYMBOL} { yybegin(exprOpState); return SYMBOL; } } @@ -226,6 +227,8 @@ PLAIN_MACRO_LINE=[^;\r\n]+ {OPSIZE_BS} { return OPSIZE_BS; } {OPSIZE_W} { return OPSIZE_W; } {OPSIZE_L} { return OPSIZE_L; } + "\[" { return SQUARE_L; } + "\]" { return SQUARE_R; } } diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf b/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf index 611a5cb..ed432b1 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf +++ b/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf @@ -259,6 +259,12 @@ AddressingMode ::= ImmediateData | AddressRegisterIndirectAddressingMode | AddressRegisterIndirectWithDisplacementNewAddressingMode | ProgramCounterIndirectWithDisplacementNewAddressingMode + | MemoryIndirectAddressingMode + | ProgramCounterMemoryIndirectAddressingMode + | MemoryIndirectPostIndexedAddressingMode + | ProgramCounterMemoryIndirectPostIndexedAddressingMode + | MemoryIndirectPreIndexedAddressingMode + | ProgramCounterMemoryIndirectPreIndexedAddressingMode | AddressRegisterIndirectWithIndexNewAddressingMode | ProgramCounterIndirectWithIndexNewAddressingMode | AddressRegisterIndirectWithDisplacementOldAddressingMode @@ -324,6 +330,47 @@ AddressRegisterIndirectWithIndexNewAddressingMode ::= ROUND_L (expr SEPARATOR)? ] } +MemoryIndirectAddressingMode ::= ROUND_L SQUARE_L (expr SEPARATOR)? AddressRegister SQUARE_R (SEPARATOR expr)? ROUND_R +{ + implements = [ + "de.platon42.intellij.plugins.m68k.psi.M68kWithAddressRegisterIndirect" + "de.platon42.intellij.plugins.m68k.psi.M68kWithBaseDisplacement" + "de.platon42.intellij.plugins.m68k.psi.M68kWithOuterDisplacement" + ] + methods = [ + baseDisplacement = "expr[0]" + outerDisplacement = "expr[1]" + ] +} + +MemoryIndirectPostIndexedAddressingMode ::= ROUND_L (SQUARE_L (expr SEPARATOR)? AddressRegister SQUARE_R SEPARATOR)? IndexRegister (SEPARATOR expr)? ROUND_R +{ + implements = [ + "de.platon42.intellij.plugins.m68k.psi.M68kWithAddressRegisterIndirect" + "de.platon42.intellij.plugins.m68k.psi.M68kWithBaseDisplacement" + "de.platon42.intellij.plugins.m68k.psi.M68kWithIndexRegister" + "de.platon42.intellij.plugins.m68k.psi.M68kWithOuterDisplacement" + ] + methods = [ + baseDisplacement = "expr[0]" + outerDisplacement = "expr[1]" + ] +} + +MemoryIndirectPreIndexedAddressingMode ::= ROUND_L SQUARE_L (expr SEPARATOR)? AddressRegister SEPARATOR IndexRegister SQUARE_R (SEPARATOR expr)? ROUND_R +{ + implements = [ + "de.platon42.intellij.plugins.m68k.psi.M68kWithAddressRegisterIndirect" + "de.platon42.intellij.plugins.m68k.psi.M68kWithBaseDisplacement" + "de.platon42.intellij.plugins.m68k.psi.M68kWithIndexRegister" + "de.platon42.intellij.plugins.m68k.psi.M68kWithOuterDisplacement" + ] + methods = [ + baseDisplacement = "expr[0]" + outerDisplacement = "expr[1]" + ] +} + ProgramCounterIndirectWithDisplacementOldAddressingMode ::= (ROUND_L PC ROUND_R) | (expr ROUND_L PC ROUND_R) { implements = ["de.platon42.intellij.plugins.m68k.psi.M68kWithDisplacement"] @@ -362,6 +409,44 @@ ProgramCounterIndirectWithIndexNewAddressingMode ::= ROUND_L (expr SEPARATOR)? P ] } +ProgramCounterMemoryIndirectAddressingMode ::= ROUND_L SQUARE_L (expr SEPARATOR)? PC SQUARE_R (SEPARATOR expr)? ROUND_R +{ + implements = [ + "de.platon42.intellij.plugins.m68k.psi.M68kWithBaseDisplacement" + "de.platon42.intellij.plugins.m68k.psi.M68kWithOuterDisplacement" + ] + methods = [ + baseDisplacement = "expr[0]" + outerDisplacement = "expr[1]" + ] +} + +ProgramCounterMemoryIndirectPostIndexedAddressingMode ::= ROUND_L (SQUARE_L (expr SEPARATOR)? PC SQUARE_R SEPARATOR)? IndexRegister (SEPARATOR expr)? ROUND_R +{ + implements = [ + "de.platon42.intellij.plugins.m68k.psi.M68kWithBaseDisplacement" + "de.platon42.intellij.plugins.m68k.psi.M68kWithIndexRegister" + "de.platon42.intellij.plugins.m68k.psi.M68kWithOuterDisplacement" + ] + methods = [ + baseDisplacement = "expr[0]" + outerDisplacement = "expr[1]" + ] +} + +ProgramCounterMemoryIndirectPreIndexedAddressingMode ::= ROUND_L SQUARE_L (expr SEPARATOR)? PC SEPARATOR IndexRegister SQUARE_R (SEPARATOR expr)? ROUND_R +{ + implements = [ + "de.platon42.intellij.plugins.m68k.psi.M68kWithBaseDisplacement" + "de.platon42.intellij.plugins.m68k.psi.M68kWithIndexRegister" + "de.platon42.intellij.plugins.m68k.psi.M68kWithOuterDisplacement" + ] + methods = [ + baseDisplacement = "expr[0]" + outerDisplacement = "expr[1]" + ] +} + AbsoluteAddressAddressingMode ::= expr AddressSize? !ROUND_L RegisterRange ::= (DataRegister OP_MINUS DataRegister) | (AddressRegister OP_MINUS AddressRegister) | (DataRegister OP_MINUS AddressRegister) { diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kAddressModeUtil.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kAddressModeUtil.kt index 689ed48..d2f3d89 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kAddressModeUtil.kt +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kAddressModeUtil.kt @@ -18,6 +18,12 @@ object M68kAddressModeUtil { is M68kProgramCounterIndirectWithDisplacementOldAddressingMode -> AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT is M68kProgramCounterIndirectWithIndexNewAddressingMode -> if (hasScale(addressingMode)) AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_SCALED_INDEX else AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_INDEX is M68kProgramCounterIndirectWithIndexOldAddressingMode -> if (hasScale(addressingMode)) AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_SCALED_INDEX else AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_INDEX + is M68kMemoryIndirectAddressingMode -> AddressMode.MEMORY_INDIRECT + is M68kMemoryIndirectPreIndexedAddressingMode -> AddressMode.MEMORY_INDIRECT_PREINDEXED + is M68kMemoryIndirectPostIndexedAddressingMode -> AddressMode.MEMORY_INDIRECT_POSTINDEXED + is M68kProgramCounterMemoryIndirectAddressingMode -> AddressMode.PROGRAM_COUNTER_MEMORY_INDIRECT + is M68kProgramCounterMemoryIndirectPreIndexedAddressingMode -> AddressMode.PROGRAM_COUNTER_MEMORY_INDIRECT_PREINDEXED + is M68kProgramCounterMemoryIndirectPostIndexedAddressingMode -> AddressMode.PROGRAM_COUNTER_MEMORY_INDIRECT_POSTINDEXED is M68kSpecialRegisterDirectAddressingMode -> AddressMode.SPECIAL_REGISTER_DIRECT is M68kDataRegisterDirectAddressingMode -> AddressMode.DATA_REGISTER_DIRECT is M68kAddressRegisterDirectAddressingMode -> AddressMode.ADDRESS_REGISTER_DIRECT @@ -27,6 +33,7 @@ object M68kAddressModeUtil { } } + // TODO add evaluation of constant expressions and allow scale == 1 as false private fun hasScale(addressingMode: M68kWithIndexRegister) = addressingMode.indexRegister.indexScale != null fun getOtherReadWriteModifyRegisters(rwm: Int): List> { diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kWithBaseDisplacement.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kWithBaseDisplacement.kt new file mode 100644 index 0000000..d95462a --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kWithBaseDisplacement.kt @@ -0,0 +1,6 @@ +package de.platon42.intellij.plugins.m68k.psi + +interface M68kWithBaseDisplacement : M68kAddressingMode { + + val baseDisplacement: M68kExpr? +} \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kWithOuterDisplacement.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kWithOuterDisplacement.kt new file mode 100644 index 0000000..c8367d6 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kWithOuterDisplacement.kt @@ -0,0 +1,6 @@ +package de.platon42.intellij.plugins.m68k.psi + +interface M68kWithOuterDisplacement : M68kAddressingMode { + + val outerDisplacement: M68kExpr? +} \ No newline at end of file diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/parser/AddressingModesTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/parser/AddressingModesTest.kt index 0d6a9f7..6801d73 100644 --- a/src/test/java/de/platon42/intellij/plugins/m68k/parser/AddressingModesTest.kt +++ b/src/test/java/de/platon42/intellij/plugins/m68k/parser/AddressingModesTest.kt @@ -92,6 +92,127 @@ internal class AddressingModesTest : AbstractParsingTest() { testGoodSyntax(testCase, " move.l (pc,d0.w),(pc,a3)\n") } + @Test + internal fun memory_indirect_with_all_params(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,a1],124),([-12,a0],-120)\n") + } + + @Test + internal fun memory_indirect_without_base_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([a1],124),([a0],-120)\n") + } + + @Test + internal fun memory_indirect_without_outer_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,a1]),([-12,a0])\n") + } + + @Test + internal fun memory_indirect_minimal(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([a1]),([a0])\n") + } + + @Test + internal fun memory_indirect_post_indexed_with_all_params(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,a1],a0.w*4,124),([-12,a0],d0.l*8,-120)\n") + } + + @Test + internal fun memory_indirect_post_indexed_without_base_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([a1],a0,124),([a0],d0.l*8,-120)\n") + } + + @Test + internal fun memory_indirect_post_indexed_without_outer_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,a1],a0),([-12,a0],d0.l*8)\n") + } + + @Test + internal fun memory_indirect_post_indexed_minimal(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([a1],a0),([a0],d0)\n") + } + + @Test + internal fun memory_indirect_pre_indexed_with_all_params(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,a1,a0.w*4],124),([-12,a0,d0.l*8],-120)\n") + } + + @Test + internal fun memory_indirect_pre_indexed_without_base_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([a1,a0],124),([a0,d0.l*8],-120)\n") + } + + @Test + internal fun memory_indirect_pre_indexed_without_outer_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,a1,a0]),([-12,a0,d0.l*8])\n") + } + + @Test + internal fun memory_indirect_pre_indexed_minimal(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([a1,a0]),([a0,d0])\n") + } + + + @Test + internal fun pc_memory_indirect_with_all_params(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,pc],124),d0\n") + } + + @Test + internal fun pc_memory_indirect_without_base_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([pc],124),d0\n") + } + + @Test + internal fun pc_memory_indirect_without_outer_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,pc]),d0\n") + } + + @Test + internal fun pc_memory_indirect_minimal(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([pc]),d0\n") + } + + @Test + internal fun pc_memory_indirect_post_indexed_with_all_params(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,pc],a0.w*4,124),d0\n") + } + + @Test + internal fun pc_memory_indirect_post_indexed_without_base_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([pc],a0.l*4,124),d0\n") + } + + @Test + internal fun pc_memory_indirect_post_indexed_without_outer_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,pc],a0),d0\n") + } + + @Test + internal fun pc_memory_indirect_post_indexed_minimal(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([pc],a0*4),d0\n") + } + + @Test + internal fun pc_memory_indirect_pre_indexed_with_all_params(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,pc,a0.w*4],124),d0\n") + } + + @Test + internal fun pc_memory_indirect_pre_indexed_without_base_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([pc,a0*4],124),d0\n") + } + + @Test + internal fun pc_memory_indirect_pre_indexed_without_outer_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([1234,pc,a0]),d0\n") + } + + @Test + internal fun pc_memory_indirect_pre_indexed_minimal(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " move.l ([pc,a0.l*4]),d0\n") + } + @Test internal fun absolute_address(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { testGoodSyntax(testCase, " move.l 4.w,a6\n") diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_minimal.txt b/src/test/resources/parser/addressingmodes/memory_indirect_minimal.txt new file mode 100644 index 0000000..a4800a9 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_minimal.txt @@ -0,0 +1,25 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectAddressingModeImpl(MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectAddressingModeImpl(MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_minimal.txt b/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_minimal.txt new file mode 100644 index 0000000..91b7a3b --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_minimal.txt @@ -0,0 +1,33 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectPostIndexedAddressingModeImpl(MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectPostIndexedAddressingModeImpl(MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_with_all_params.txt b/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_with_all_params.txt new file mode 100644 index 0000000..3142b0e --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_with_all_params.txt @@ -0,0 +1,61 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectPostIndexedAddressingModeImpl(MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_W)('.w') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectPostIndexedAddressingModeImpl(MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('12') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('8') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('120') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_without_base_displacement.txt b/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_without_base_displacement.txt new file mode 100644 index 0000000..f51729d --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_without_base_displacement.txt @@ -0,0 +1,47 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectPostIndexedAddressingModeImpl(MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectPostIndexedAddressingModeImpl(MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('8') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('120') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_without_outer_displacement.txt b/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_without_outer_displacement.txt new file mode 100644 index 0000000..3ae5b35 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_post_indexed_without_outer_displacement.txt @@ -0,0 +1,47 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectPostIndexedAddressingModeImpl(MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectPostIndexedAddressingModeImpl(MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('12') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('8') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_minimal.txt b/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_minimal.txt new file mode 100644 index 0000000..69b503b --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_minimal.txt @@ -0,0 +1,33 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectPreIndexedAddressingModeImpl(MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectPreIndexedAddressingModeImpl(MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_with_all_params.txt b/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_with_all_params.txt new file mode 100644 index 0000000..3bdcac0 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_with_all_params.txt @@ -0,0 +1,61 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectPreIndexedAddressingModeImpl(MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_W)('.w') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectPreIndexedAddressingModeImpl(MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('12') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('8') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('120') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_without_base_displacement.txt b/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_without_base_displacement.txt new file mode 100644 index 0000000..f5f7de6 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_without_base_displacement.txt @@ -0,0 +1,47 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectPreIndexedAddressingModeImpl(MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectPreIndexedAddressingModeImpl(MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('8') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('120') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_without_outer_displacement.txt b/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_without_outer_displacement.txt new file mode 100644 index 0000000..d016177 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_pre_indexed_without_outer_displacement.txt @@ -0,0 +1,47 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectPreIndexedAddressingModeImpl(MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectPreIndexedAddressingModeImpl(MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('12') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('8') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_with_all_params.txt b/src/test/resources/parser/addressingmodes/memory_indirect_with_all_params.txt new file mode 100644 index 0000000..471cd1e --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_with_all_params.txt @@ -0,0 +1,41 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectAddressingModeImpl(MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectAddressingModeImpl(MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('12') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('120') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_without_base_displacement.txt b/src/test/resources/parser/addressingmodes/memory_indirect_without_base_displacement.txt new file mode 100644 index 0000000..cf3095a --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_without_base_displacement.txt @@ -0,0 +1,33 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectAddressingModeImpl(MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectAddressingModeImpl(MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('120') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/memory_indirect_without_outer_displacement.txt b/src/test/resources/parser/addressingmodes/memory_indirect_without_outer_displacement.txt new file mode 100644 index 0000000..e87cd14 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/memory_indirect_without_outer_displacement.txt @@ -0,0 +1,33 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kMemoryIndirectAddressingModeImpl(MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kMemoryIndirectAddressingModeImpl(MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('12') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_minimal.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_minimal.txt new file mode 100644 index 0000000..6a6bfa3 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_minimal.txt @@ -0,0 +1,20 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_minimal.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_minimal.txt new file mode 100644 index 0000000..5646493 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_minimal.txt @@ -0,0 +1,28 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_with_all_params.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_with_all_params.txt new file mode 100644 index 0000000..95da5ff --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_with_all_params.txt @@ -0,0 +1,36 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_W)('.w') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_without_base_displacement.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_without_base_displacement.txt new file mode 100644 index 0000000..21f1894 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_without_base_displacement.txt @@ -0,0 +1,33 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_without_outer_displacement.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_without_outer_displacement.txt new file mode 100644 index 0000000..2b0da2e --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_post_indexed_without_outer_displacement.txt @@ -0,0 +1,27 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectPostIndexedAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_minimal.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_minimal.txt new file mode 100644 index 0000000..47d8fd0 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_minimal.txt @@ -0,0 +1,30 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_with_all_params.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_with_all_params.txt new file mode 100644 index 0000000..57bda55 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_with_all_params.txt @@ -0,0 +1,36 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_W)('.w') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_without_base_displacement.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_without_base_displacement.txt new file mode 100644 index 0000000..62ec2b0 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_without_base_displacement.txt @@ -0,0 +1,31 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kIndexScaleImpl(INDEX_SCALE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_without_outer_displacement.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_without_outer_displacement.txt new file mode 100644 index 0000000..109633b --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_pre_indexed_without_outer_displacement.txt @@ -0,0 +1,27 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectPreIndexedAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kIndexRegisterImpl(INDEX_REGISTER) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_with_all_params.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_with_all_params.txt new file mode 100644 index 0000000..e58f34b --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_with_all_params.txt @@ -0,0 +1,26 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_without_base_displacement.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_without_base_displacement.txt new file mode 100644 index 0000000..ad0dd47 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_without_base_displacement.txt @@ -0,0 +1,23 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('124') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_memory_indirect_without_outer_displacement.txt b/src/test/resources/parser/addressingmodes/pc_memory_indirect_without_outer_displacement.txt new file mode 100644 index 0000000..ae31470 --- /dev/null +++ b/src/test/resources/parser/addressingmodes/pc_memory_indirect_without_outer_displacement.txt @@ -0,0 +1,23 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_L)('.l') + PsiWhiteSpace(' ') + M68kProgramCounterMemoryIndirectAddressingModeImpl(PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.SQUARE_L)('[') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiElement(M68kTokenType.SEPARATOR)(',') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SQUARE_R)(']') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file