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 934213c..1fa2b15 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 @@ -38,6 +38,7 @@ public class _M68kLexer implements FlexLexer { public static final int ASMINSTR = 6; public static final int ASMOPS = 8; public static final int ASSIGNMENT = 10; + public static final int WAITEOL = 12; /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l @@ -46,7 +47,7 @@ public class _M68kLexer implements FlexLexer { * l is of the form l = 2*k, k a non negative integer */ private static final int ZZ_LEXSTATE[] = { - 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5 + 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6 }; /** @@ -181,24 +182,24 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = - "\6\0\1\1\2\2\1\3\1\4\1\1\1\5\1\6" + - "\2\7\1\2\1\10\3\6\2\11\10\12\1\13\1\1" + - "\1\14\1\6\1\15\4\6\1\16\1\17\1\20\1\21" + - "\1\22\5\6\1\23\1\24\1\25\1\26\1\6\1\27" + - "\1\30\1\31\1\32\1\33\1\34\1\35\1\36\1\37" + - "\1\40\1\41\1\42\1\43\1\44\2\6\1\17\1\0" + - "\1\45\1\4\2\46\1\2\2\6\1\47\11\12\1\50" + - "\1\51\1\52\1\53\1\54\1\55\1\6\1\56\1\50" + - "\1\51\1\57\1\60\1\6\1\61\1\0\1\62\6\0" + - "\1\6\1\63\1\0\1\64\1\62\1\65\1\66\2\6" + - "\1\67\1\70\1\71\2\6\2\0\1\4\1\46\4\12" + - "\1\72\4\12\1\73\1\74\1\75\1\76\2\0\2\12" + - "\1\77\1\12\1\100\1\101\1\102\1\103\1\104\1\105" + - "\1\12\1\106\1\0\3\12\1\107\1\110\2\12\1\111" + - "\1\112"; + "\7\0\1\1\2\2\1\3\1\4\1\1\1\5\2\6" + + "\1\2\1\7\2\10\1\11\2\12\4\13\1\14\2\13" + + "\1\15\2\13\1\16\1\1\1\14\1\17\4\14\1\20" + + "\1\21\1\22\1\23\1\24\1\14\4\1\1\25\1\26" + + "\1\27\1\30\1\14\1\31\1\32\1\33\1\34\1\35" + + "\1\36\1\37\1\40\1\41\1\42\1\43\1\44\1\45" + + "\1\46\2\14\1\21\1\0\1\47\1\4\2\50\3\10" + + "\1\51\11\13\1\52\1\53\1\54\1\55\1\56\1\57" + + "\1\14\1\60\1\52\1\53\1\61\1\62\1\14\1\63" + + "\1\0\1\64\6\0\1\65\1\0\1\66\1\64\1\67" + + "\1\70\1\14\1\71\1\72\1\73\2\14\2\0\1\4" + + "\1\50\4\13\1\74\4\13\1\75\1\76\1\77\1\100" + + "\2\0\2\13\1\101\1\13\1\102\1\103\1\104\1\105" + + "\1\106\1\107\1\13\1\110\1\0\3\13\1\111\1\112" + + "\2\13\1\113\1\114"; private static int[] zzUnpackAction() { - int[] result = new int[167]; + int[] result = new int[166]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -223,30 +224,30 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\102\0\204\0\306\0\u0108\0\u014a\0\u018c\0\u018c" + - "\0\u01ce\0\u0210\0\u0252\0\u0294\0\u02d6\0\u0318\0\u018c\0\u035a" + - "\0\u039c\0\u03de\0\u0420\0\u0462\0\u04a4\0\u018c\0\u04e6\0\u0528" + + "\0\0\0\102\0\204\0\306\0\u0108\0\u014a\0\u018c\0\u01ce" + + "\0\u01ce\0\u0210\0\u0252\0\u0294\0\u02d6\0\u0318\0\u01ce\0\u035a" + + "\0\u039c\0\u03de\0\u0420\0\u0462\0\u04a4\0\u01ce\0\u04e6\0\u0528" + "\0\u056a\0\u05ac\0\u05ee\0\u0630\0\u0672\0\u06b4\0\u06f6\0\u0738" + "\0\u077a\0\u07bc\0\u07fe\0\u0840\0\u0882\0\u08c4\0\u0906\0\u0948" + - "\0\u098a\0\u09cc\0\u0318\0\u0a0e\0\u0a50\0\u0a92\0\u0ad4\0\u0b16" + - "\0\u0b58\0\u0b9a\0\u0bdc\0\u0c1e\0\u0c60\0\u0318\0\u0ca2\0\u0ce4" + - "\0\u0d26\0\u0d68\0\u0318\0\u0318\0\u0318\0\u0318\0\u0318\0\u0318" + - "\0\u0318\0\u0318\0\u0318\0\u0318\0\u0318\0\u0daa\0\u0dec\0\u0318" + - "\0\u0e2e\0\u0e70\0\u0eb2\0\u0ef4\0\u0f36\0\u0f78\0\u0fba\0\u0ffc" + - "\0\u103e\0\u1080\0\u10c2\0\u1104\0\u1146\0\u1188\0\u11ca\0\u120c" + - "\0\u124e\0\u1290\0\u018c\0\u018c\0\u0318\0\u0318\0\u0318\0\u0318" + - "\0\u12d2\0\u018c\0\u0318\0\u0318\0\u0a0e\0\u0a50\0\u1314\0\u0ad4" + - "\0\u1356\0\u018c\0\u1398\0\u13da\0\u141c\0\u145e\0\u14a0\0\u14e2" + - "\0\u1524\0\u14e2\0\u1566\0\u14e2\0\u14e2\0\u018c\0\u018c\0\u0c60" + - "\0\u15a8\0\u018c\0\u018c\0\u018c\0\u15ea\0\u162c\0\u166e\0\u16b0" + - "\0\u018c\0\u018c\0\u16f2\0\u1734\0\u1776\0\u17b8\0\u17fa\0\u183c" + - "\0\u187e\0\u18c0\0\u1902\0\u0318\0\u0318\0\u0318\0\u0318\0\u1944" + - "\0\u1986\0\u19c8\0\u1a0a\0\u05ac\0\u1a4c\0\u05ac\0\u05ac\0\u05ac" + - "\0\u05ac\0\u05ac\0\u05ac\0\u1a8e\0\u05ac\0\u0e70\0\u1ad0\0\u1b12" + - "\0\u1b54\0\u05ac\0\u05ac\0\u1b96\0\u1bd8\0\u05ac\0\u05ac"; + "\0\u098a\0\u09cc\0\u0a0e\0\u01ce\0\u0a50\0\u0a92\0\u0ad4\0\u0b16" + + "\0\u0b58\0\u0b9a\0\u0bdc\0\u0c1e\0\u0c60\0\u06f6\0\u01ce\0\u0ca2" + + "\0\u0ce4\0\u0d26\0\u0d68\0\u01ce\0\u01ce\0\u01ce\0\u01ce\0\u01ce" + + "\0\u01ce\0\u01ce\0\u01ce\0\u01ce\0\u01ce\0\u01ce\0\u0daa\0\u0dec" + + "\0\u0630\0\u0e2e\0\u0e70\0\u0eb2\0\u0ef4\0\u0f36\0\u0f78\0\u0fba" + + "\0\u0ffc\0\u103e\0\u1080\0\u10c2\0\u1104\0\u1146\0\u1188\0\u11ca" + + "\0\u120c\0\u124e\0\u1290\0\u01ce\0\u01ce\0\u0630\0\u0630\0\u0630" + + "\0\u0630\0\u12d2\0\u01ce\0\u0630\0\u0630\0\u0a50\0\u0a92\0\u1314" + + "\0\u0b16\0\u0b58\0\u01ce\0\u1356\0\u0b9a\0\u1398\0\u0bdc\0\u13da" + + "\0\u141c\0\u141c\0\u145e\0\u141c\0\u141c\0\u01ce\0\u01ce\0\u14a0" + + "\0\u01ce\0\u01ce\0\u01ce\0\u14e2\0\u1524\0\u1566\0\u15a8\0\u01ce" + + "\0\u01ce\0\u15ea\0\u162c\0\u166e\0\u16b0\0\u16f2\0\u1734\0\u1776" + + "\0\u17b8\0\u17fa\0\u0630\0\u0630\0\u0630\0\u0630\0\u183c\0\u187e" + + "\0\u18c0\0\u1902\0\u05ac\0\u1944\0\u05ac\0\u05ac\0\u05ac\0\u05ac" + + "\0\u05ac\0\u05ac\0\u1986\0\u05ac\0\u0e70\0\u19c8\0\u1a0a\0\u1a4c" + + "\0\u05ac\0\u05ac\0\u1a8e\0\u1ad0\0\u05ac\0\u05ac"; private static int[] zzUnpackRowMap() { - int[] result = new int[167]; + int[] result = new int[166]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -269,182 +270,166 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = - "\1\7\2\10\1\11\1\12\4\13\1\7\4\13\1\7" + - "\4\13\1\7\1\14\2\7\3\13\2\7\4\13\1\7" + - "\1\13\7\7\2\15\11\13\13\7\1\15\2\7\1\16" + - "\2\17\1\20\1\21\4\22\1\16\3\22\1\23\1\16" + - "\4\22\1\16\1\24\2\16\3\22\2\16\4\22\1\16" + - "\1\22\7\16\2\25\11\22\13\16\1\25\3\16\2\26" + - "\1\27\1\21\1\30\1\31\2\32\1\16\1\33\2\32" + - "\2\16\1\34\3\32\4\16\1\32\1\33\1\32\2\16" + - "\1\31\1\35\2\32\1\16\1\34\7\16\1\25\1\16" + - "\2\32\1\35\4\32\1\36\1\37\16\16\1\7\2\26" + - "\1\27\1\40\17\7\1\41\24\7\1\42\30\7\1\16" + - "\2\26\1\27\1\21\3\16\1\43\1\44\1\45\1\46" + - "\1\47\4\16\1\50\1\16\1\51\1\52\1\53\1\54" + - "\1\16\1\45\1\16\1\55\1\44\1\16\1\56\1\43" + - "\1\47\1\44\1\16\1\57\1\60\1\16\1\61\1\62" + - "\1\63\1\64\1\65\1\66\1\67\1\16\1\56\6\16" + - "\1\70\1\71\1\72\1\73\1\74\1\75\1\76\1\77" + - "\1\100\1\101\1\102\1\103\1\104\1\105\1\16\2\26" + - "\1\27\1\21\4\16\1\44\1\106\4\16\1\107\3\16" + - "\1\51\1\110\1\53\1\54\1\16\1\106\1\16\1\55" + - "\1\44\4\16\1\44\1\107\1\57\1\60\1\16\1\61" + - "\1\62\1\63\1\64\1\65\12\16\1\70\1\71\1\72" + - "\1\73\1\74\1\75\1\76\1\77\1\100\1\101\1\102" + - "\1\103\1\104\1\16\104\0\1\10\103\0\1\12\101\0" + - "\1\111\16\13\1\112\1\0\1\113\1\114\3\13\1\0" + - "\7\13\11\0\11\13\23\0\4\115\1\0\4\115\1\0" + - "\4\115\4\0\3\115\2\0\4\115\1\0\1\115\11\0" + - "\11\115\16\0\1\15\3\0\76\15\5\0\16\16\3\0" + - "\4\16\1\0\7\16\11\0\11\16\20\0\1\17\103\0" + - "\1\116\16\16\3\0\4\16\1\0\7\16\11\0\11\16" + - "\23\0\4\22\1\23\3\22\2\23\4\22\2\0\1\113" + + "\1\10\2\11\1\12\1\13\4\14\1\10\4\14\1\10" + + "\4\14\1\10\1\15\2\10\3\14\2\10\4\14\1\10" + + "\1\14\7\10\2\16\11\14\13\10\1\16\3\10\2\17" + + "\1\20\1\21\4\22\1\10\3\22\1\23\1\10\4\22" + + "\1\10\1\24\2\10\3\22\2\10\4\22\1\10\1\22" + + "\7\10\2\25\11\22\13\10\1\25\3\10\2\26\1\27" + + "\1\21\1\30\1\31\2\32\1\10\1\33\2\32\1\34" + + "\1\10\1\35\3\32\1\10\1\34\2\10\1\32\1\33" + + "\1\32\2\10\1\31\1\36\2\32\1\10\1\35\7\10" + + "\1\37\1\10\2\32\1\36\4\32\1\40\1\41\17\10" + + "\2\26\1\27\1\42\17\10\1\43\24\10\1\37\31\10" + + "\2\26\1\27\1\21\3\34\1\44\1\45\1\46\1\47" + + "\1\50\1\34\1\10\2\34\1\51\1\34\1\52\1\53" + + "\1\54\1\55\1\34\1\46\1\34\1\56\1\45\1\34" + + "\1\57\1\44\1\50\1\45\1\34\1\60\1\61\1\10" + + "\1\62\1\63\1\64\1\65\1\66\1\67\1\70\1\34" + + "\1\57\6\34\1\71\1\72\1\73\1\74\1\75\1\76" + + "\1\77\1\100\1\101\1\102\1\103\1\104\1\105\1\106" + + "\1\10\2\26\1\27\1\21\4\34\1\45\1\107\3\34" + + "\1\10\1\110\3\34\1\52\1\111\1\54\1\55\1\34" + + "\1\107\1\34\1\56\1\45\4\34\1\45\1\110\1\60" + + "\1\61\1\10\1\62\1\63\1\64\1\65\1\66\1\10" + + "\11\34\1\71\1\72\1\73\1\74\1\75\1\76\1\77" + + "\1\100\1\101\1\102\1\103\1\104\1\105\2\10\2\26" + + "\1\27\76\10\104\0\1\11\103\0\1\13\101\0\1\112" + + "\16\14\1\113\1\0\1\114\1\115\3\14\1\0\7\14" + + "\11\0\11\14\23\0\4\116\1\0\4\116\1\0\4\116" + + "\4\0\3\116\2\0\4\116\1\0\1\116\11\0\11\116" + + "\16\0\1\16\3\0\76\16\2\0\1\17\103\0\1\21" + + "\102\0\4\22\1\23\3\22\2\23\4\22\2\0\1\114" + "\1\117\3\22\1\0\1\23\4\22\1\23\1\22\11\0" + - "\11\22\23\0\16\23\2\0\1\113\1\117\3\23\1\0" + - "\7\23\11\0\11\23\23\0\4\120\1\16\4\120\1\16" + - "\4\120\3\0\1\16\3\120\1\0\1\16\4\120\1\16" + - "\1\120\11\0\11\120\16\0\1\42\3\0\1\42\16\25" + - "\3\42\4\25\1\42\7\25\11\42\11\25\16\42\2\0" + - "\1\26\104\0\1\32\1\121\2\32\1\16\3\32\2\16" + - "\4\32\3\0\1\16\3\32\1\0\1\16\1\121\3\32" + - "\1\16\1\32\11\0\1\32\1\122\7\32\23\0\3\32" + - "\1\123\1\16\3\32\2\16\4\32\3\0\1\16\3\32" + - "\1\0\1\16\2\32\1\123\1\32\1\16\1\32\11\0" + - "\11\32\23\0\4\32\1\16\3\32\2\16\4\32\3\0" + - "\1\16\3\32\1\0\1\16\4\32\1\16\1\32\11\0" + - "\11\32\23\0\4\32\1\16\3\32\2\16\1\124\3\32" + - "\3\0\1\16\3\32\1\0\1\16\4\32\1\16\1\124" + - "\11\0\11\32\23\0\4\32\1\16\3\32\2\16\4\32" + - "\3\0\1\16\3\32\1\0\1\16\4\32\1\16\1\32" + - "\11\0\1\125\1\126\2\32\2\127\3\32\23\0\4\32" + - "\1\16\3\32\2\16\4\32\3\0\1\16\3\32\1\0" + - "\1\16\4\32\1\16\1\32\11\0\1\32\1\130\7\32" + - "\23\0\3\32\1\131\1\16\3\32\2\16\4\32\3\0" + - "\1\16\3\32\1\0\1\16\2\32\1\131\1\32\1\16" + - "\1\32\11\0\11\32\23\0\4\32\1\16\3\32\2\16" + - "\1\132\3\32\3\0\1\16\3\32\1\0\1\16\4\32" + - "\1\16\1\132\11\0\11\32\22\0\1\40\124\0\2\133" + - "\1\134\26\0\1\134\21\0\1\42\3\0\76\42\5\0" + - "\4\16\1\135\11\16\3\0\4\16\1\0\1\135\6\16" + - "\11\0\11\16\23\0\4\16\1\44\11\16\3\0\4\16" + - "\1\0\1\44\4\16\1\44\1\16\11\0\11\16\23\0" + - "\6\16\1\135\7\16\3\0\4\16\1\0\7\16\11\0" + - "\10\16\1\136\23\0\16\16\3\0\4\16\1\0\2\16" + - "\1\137\4\16\11\0\2\16\1\137\6\16\23\0\4\16" + - "\1\140\11\16\3\0\4\16\1\0\1\140\6\16\11\0" + - "\11\16\23\0\5\16\1\141\10\16\3\0\2\16\1\141" + - "\1\16\1\0\7\16\11\0\11\16\23\0\16\16\1\142" + - "\2\0\4\16\1\0\7\16\11\0\11\16\23\0\16\16" + - "\3\0\1\16\2\143\1\144\1\0\7\16\11\0\5\16" + - "\1\144\3\16\23\0\4\16\1\145\11\16\3\0\1\16" + - "\1\145\2\16\1\0\7\145\11\0\11\16\23\0\16\16" + - "\3\0\4\16\1\0\1\146\6\16\11\0\11\16\23\0" + - "\16\16\3\0\4\16\1\0\2\16\1\147\4\16\11\0" + - "\2\16\1\147\6\16\23\0\4\16\1\150\11\16\3\0" + - "\4\16\1\0\1\150\6\16\11\0\11\16\16\0\5\151" + - "\16\60\3\151\4\60\1\151\7\60\1\151\1\152\1\153" + - "\6\151\11\60\16\151\5\154\16\61\3\154\4\61\1\154" + - "\7\61\2\154\1\155\1\152\5\154\11\61\16\154\5\156" + - "\16\62\3\156\4\62\1\156\7\62\2\156\1\157\1\156" + - "\1\152\4\156\11\62\16\156\5\160\16\161\1\162\2\160" + - "\4\161\1\160\7\161\1\160\1\0\1\163\2\160\1\164" + - "\1\165\2\160\11\161\16\160\5\0\16\16\1\166\2\0" + - "\4\16\1\0\7\16\6\0\1\167\2\0\11\16\16\0" + - "\1\15\3\0\1\15\16\170\3\15\4\170\1\15\7\170" + - "\11\15\11\170\16\15\5\0\16\16\3\0\1\16\1\171" + - "\2\16\1\0\7\16\11\0\6\16\1\171\2\16\23\0" + - "\16\16\3\0\4\16\1\0\7\16\11\0\11\16\1\172" + - "\22\0\16\16\3\0\4\16\1\0\7\16\11\0\11\16" + - "\1\0\1\173\21\0\16\16\1\174\2\0\4\16\1\0" + - "\7\16\11\0\11\16\23\0\12\16\1\175\3\16\3\0" + - "\4\16\1\0\6\16\1\175\11\0\11\16\23\0\13\16" + - "\1\176\2\16\3\0\4\16\1\0\7\16\11\0\11\16" + - "\22\0\1\111\5\0\1\177\4\0\1\200\3\0\1\112" + - "\4\0\1\177\10\0\1\200\44\0\1\112\122\0\1\201" + - "\101\0\1\202\61\0\16\115\2\0\1\202\1\0\3\115" + - "\1\0\7\115\11\0\11\115\22\0\1\116\102\0\16\16" + - "\2\0\1\202\4\16\1\0\7\16\11\0\11\16\23\0" + - "\16\120\2\0\1\202\1\16\3\120\1\0\7\120\11\0" + - "\11\120\23\0\4\121\1\16\3\121\2\16\4\121\3\0" + - "\1\16\3\121\1\0\1\16\4\121\1\16\1\121\11\0" + - "\11\121\23\0\4\32\1\16\3\32\2\16\4\32\3\0" + - "\1\16\3\32\1\0\1\16\1\32\1\203\2\32\1\16" + - "\1\32\11\0\2\32\1\203\6\32\23\0\1\204\3\32" + - "\1\16\3\32\2\16\4\32\3\0\1\16\3\32\1\0" + - "\1\16\4\32\1\16\1\32\11\0\11\32\23\0\4\32" + - "\1\16\3\32\2\16\4\32\3\0\1\16\3\32\1\0" + - "\1\16\1\32\1\205\2\32\1\16\1\32\11\0\2\32" + - "\1\205\6\32\23\0\4\32\1\16\3\32\2\16\1\206" + - "\3\32\3\0\1\16\3\32\1\0\1\16\4\32\1\16" + - "\1\206\11\0\11\32\23\0\4\32\1\16\2\32\1\207" + - "\2\16\4\32\3\0\1\16\3\32\1\0\1\16\3\32" + - "\1\207\1\16\1\32\11\0\11\32\23\0\4\32\1\16" + - "\1\210\2\32\2\16\4\32\3\0\1\16\1\32\1\210" + - "\1\32\1\0\1\16\4\32\1\16\1\32\11\0\11\32" + - "\23\0\4\32\1\16\3\32\2\16\4\32\3\0\1\16" + - "\3\32\1\0\1\16\4\32\1\16\1\32\11\0\3\32" + - "\1\211\5\32\23\0\4\32\1\16\3\32\2\16\4\32" + - "\3\0\1\16\3\32\1\0\1\16\1\32\1\212\2\32" + - "\1\16\1\32\11\0\2\32\1\212\6\32\23\0\4\32" + - "\1\16\1\32\1\213\1\32\2\16\4\32\3\0\1\16" + - "\3\32\1\0\1\16\4\32\1\16\1\32\11\0\11\32" + - "\23\0\6\16\1\214\7\16\3\0\4\16\1\0\7\16" + - "\11\0\11\16\23\0\16\16\3\0\4\16\1\0\7\16" + - "\11\0\10\16\1\215\16\0\43\151\1\152\1\153\36\151" + - "\3\0\76\151\44\154\1\155\1\152\35\154\3\0\76\154" + - "\44\156\1\157\1\156\1\152\34\156\3\0\76\156\43\160" + - "\1\0\1\163\3\160\1\165\36\160\16\161\3\160\4\161" + - "\1\160\7\161\1\160\1\0\1\163\3\160\1\165\2\160" + - "\11\161\17\160\3\0\76\160\5\0\16\16\3\0\4\16" + - "\1\0\7\16\11\0\10\16\1\216\23\0\15\16\1\217" + - "\3\0\4\16\1\0\7\16\11\0\11\16\23\0\14\16" + - "\1\217\1\16\3\0\4\16\1\0\7\16\11\0\11\16" + - "\35\0\1\220\21\0\1\220\60\0\1\221\66\0\4\32" + - "\1\16\3\32\2\16\4\32\3\0\1\16\1\222\2\32" + - "\1\0\1\16\4\32\1\16\1\32\11\0\4\32\2\223" + - "\1\222\2\32\23\0\4\32\1\16\3\32\2\16\4\32" + - "\3\0\1\16\3\32\1\0\1\16\4\32\1\16\1\32" + - "\11\0\4\32\2\224\3\32\23\0\4\32\1\16\3\32" + - "\2\16\3\32\1\225\3\0\1\16\3\32\1\0\1\16" + - "\4\32\1\16\1\32\11\0\11\32\23\0\4\32\1\16" + - "\3\32\2\16\4\32\3\0\1\16\3\32\1\0\1\16" + - "\4\32\1\16\1\32\11\0\1\32\1\226\7\32\23\0" + - "\4\32\1\16\3\32\2\16\4\32\3\0\1\16\3\32" + - "\1\0\1\16\1\32\1\227\2\32\1\16\1\32\11\0" + - "\2\32\1\227\4\32\1\230\1\231\23\0\4\32\1\16" + - "\3\32\2\16\1\232\3\32\3\0\1\16\3\32\1\0" + - "\1\16\4\32\1\16\1\232\11\0\11\32\23\0\4\32" + - "\1\16\1\32\1\233\1\32\2\16\4\32\3\0\1\16" + - "\3\32\1\0\1\16\4\32\1\16\1\32\11\0\11\32" + - "\23\0\4\32\1\16\3\32\2\16\4\32\3\0\1\16" + - "\3\32\1\0\1\16\4\32\1\16\1\32\11\0\10\32" + - "\1\234\23\0\4\32\1\16\3\32\2\16\3\32\1\235" + - "\3\0\1\16\3\32\1\0\1\16\4\32\1\16\1\32" + - "\11\0\11\32\40\0\1\236\100\0\1\236\65\0\1\237" + - "\3\32\1\16\3\32\2\16\4\32\3\0\1\16\3\32" + - "\1\0\1\16\4\32\1\16\1\32\11\0\11\32\23\0" + - "\4\32\1\16\3\32\2\16\2\32\1\240\1\32\3\0" + - "\1\16\3\32\1\0\1\16\4\32\1\16\1\32\11\0" + - "\11\32\23\0\1\241\3\32\1\16\3\32\2\16\4\32" + - "\3\0\1\16\3\32\1\0\1\16\4\32\1\16\1\32" + - "\11\0\11\32\23\0\4\32\1\16\3\32\2\16\4\32" + - "\3\0\1\16\3\32\1\0\1\16\4\32\1\16\1\32" + - "\11\0\3\32\1\242\5\32\23\0\4\32\1\16\3\32" + - "\2\16\4\32\3\0\1\16\3\32\1\0\1\16\4\32" + - "\1\16\1\32\11\0\1\32\1\243\7\32\23\0\4\32" + - "\1\16\2\32\1\244\2\16\4\32\3\0\1\16\3\32" + - "\1\0\1\16\3\32\1\244\1\16\1\32\11\0\11\32" + - "\23\0\4\32\1\16\3\32\2\16\4\32\3\0\1\16" + - "\3\32\1\0\1\16\4\32\1\16\1\32\11\0\3\32" + - "\1\245\5\32\23\0\4\32\1\16\3\32\2\16\1\246" + - "\3\32\3\0\1\16\3\32\1\0\1\16\4\32\1\16" + - "\1\246\11\0\11\32\23\0\4\32\1\16\3\32\2\16" + - "\4\32\3\0\1\16\3\32\1\0\1\16\4\32\1\16" + - "\1\32\11\0\1\32\1\247\7\32\16\0"; + "\11\22\23\0\16\23\2\0\1\114\1\117\3\23\1\0" + + "\7\23\11\0\11\23\23\0\4\120\1\121\4\120\1\121" + + "\4\120\3\0\1\121\3\120\1\0\1\121\4\120\1\121" + + "\1\120\11\0\11\120\16\0\1\25\3\0\76\25\2\0" + + "\1\26\104\0\1\32\1\122\2\32\1\34\3\32\2\34" + + "\4\32\3\0\1\34\3\32\1\0\1\34\1\122\3\32" + + "\1\34\1\32\11\0\1\32\1\123\7\32\23\0\3\32" + + "\1\124\1\34\3\32\2\34\4\32\3\0\1\34\3\32" + + "\1\0\1\34\2\32\1\124\1\32\1\34\1\32\11\0" + + "\11\32\23\0\4\32\1\34\3\32\2\34\4\32\3\0" + + "\1\34\3\32\1\0\1\34\4\32\1\34\1\32\11\0" + + "\11\32\23\0\4\32\1\34\3\32\2\34\1\125\3\32" + + "\3\0\1\34\3\32\1\0\1\34\4\32\1\34\1\125" + + "\11\0\11\32\23\0\16\34\3\0\4\34\1\0\7\34" + + "\11\0\11\34\23\0\4\32\1\34\3\32\2\34\4\32" + + "\3\0\1\34\3\32\1\0\1\34\4\32\1\34\1\32" + + "\11\0\1\126\1\127\2\32\2\130\3\32\23\0\4\32" + + "\1\34\3\32\2\34\4\32\3\0\1\34\3\32\1\0" + + "\1\34\4\32\1\34\1\32\11\0\1\32\1\131\7\32" + + "\16\0\1\37\3\0\76\37\5\0\3\32\1\132\1\34" + + "\3\32\2\34\4\32\3\0\1\34\3\32\1\0\1\34" + + "\2\32\1\132\1\32\1\34\1\32\11\0\11\32\23\0" + + "\4\32\1\34\3\32\2\34\1\133\3\32\3\0\1\34" + + "\3\32\1\0\1\34\4\32\1\34\1\133\11\0\11\32" + + "\22\0\1\42\124\0\2\134\1\135\26\0\1\135\26\0" + + "\4\34\1\136\11\34\3\0\4\34\1\0\1\136\6\34" + + "\11\0\11\34\27\0\1\45\21\0\1\45\4\0\1\45" + + "\46\0\6\34\1\136\7\34\3\0\4\34\1\0\7\34" + + "\11\0\10\34\1\137\23\0\16\34\3\0\4\34\1\0" + + "\2\34\1\140\4\34\11\0\2\34\1\140\6\34\23\0" + + "\4\34\1\141\11\34\3\0\4\34\1\0\1\141\6\34" + + "\11\0\11\34\23\0\5\34\1\142\10\34\3\0\2\34" + + "\1\142\1\34\1\0\7\34\11\0\11\34\41\0\1\143" + + "\63\0\16\34\3\0\1\34\2\144\1\145\1\0\7\34" + + "\11\0\5\34\1\145\3\34\27\0\1\146\15\0\1\146" + + "\3\0\7\146\73\0\1\147\53\0\16\34\3\0\4\34" + + "\1\0\2\34\1\150\4\34\11\0\2\34\1\150\6\34" + + "\27\0\1\151\21\0\1\151\46\0\43\152\1\153\1\154" + + "\35\152\44\155\1\156\1\153\34\155\44\157\1\160\1\157" + + "\1\153\33\157\23\161\1\162\17\161\1\0\1\163\2\161" + + "\1\164\1\165\31\161\23\0\1\166\24\0\1\167\36\0" + + "\16\34\3\0\1\34\1\170\2\34\1\0\7\34\11\0" + + "\6\34\1\170\2\34\102\0\1\171\102\0\1\172\37\0" + + "\1\173\63\0\12\34\1\174\3\34\3\0\4\34\1\0" + + "\6\34\1\174\11\0\11\34\23\0\13\34\1\175\2\34" + + "\3\0\4\34\1\0\7\34\11\0\11\34\22\0\1\112" + + "\5\0\1\176\4\0\1\177\3\0\1\113\4\0\1\176" + + "\10\0\1\177\44\0\1\113\122\0\1\200\101\0\1\201" + + "\61\0\16\116\2\0\1\201\1\0\3\116\1\0\7\116" + + "\11\0\11\116\23\0\16\121\2\0\1\201\4\121\1\0" + + "\7\121\11\0\11\121\23\0\16\120\2\0\1\201\1\121" + + "\3\120\1\0\7\120\11\0\11\120\23\0\16\121\3\0" + + "\4\121\1\0\7\121\11\0\11\121\23\0\4\122\1\34" + + "\3\122\2\34\4\122\3\0\1\34\3\122\1\0\1\34" + + "\4\122\1\34\1\122\11\0\11\122\23\0\4\32\1\34" + + "\3\32\2\34\4\32\3\0\1\34\3\32\1\0\1\34" + + "\1\32\1\202\2\32\1\34\1\32\11\0\2\32\1\202" + + "\6\32\23\0\1\203\3\32\1\34\3\32\2\34\4\32" + + "\3\0\1\34\3\32\1\0\1\34\4\32\1\34\1\32" + + "\11\0\11\32\23\0\4\32\1\34\3\32\2\34\4\32" + + "\3\0\1\34\3\32\1\0\1\34\1\32\1\204\2\32" + + "\1\34\1\32\11\0\2\32\1\204\6\32\23\0\4\32" + + "\1\34\3\32\2\34\1\205\3\32\3\0\1\34\3\32" + + "\1\0\1\34\4\32\1\34\1\205\11\0\11\32\23\0" + + "\4\32\1\34\2\32\1\206\2\34\4\32\3\0\1\34" + + "\3\32\1\0\1\34\3\32\1\206\1\34\1\32\11\0" + + "\11\32\23\0\4\32\1\34\1\207\2\32\2\34\4\32" + + "\3\0\1\34\1\32\1\207\1\32\1\0\1\34\4\32" + + "\1\34\1\32\11\0\11\32\23\0\4\32\1\34\3\32" + + "\2\34\4\32\3\0\1\34\3\32\1\0\1\34\4\32" + + "\1\34\1\32\11\0\3\32\1\210\5\32\23\0\4\32" + + "\1\34\3\32\2\34\4\32\3\0\1\34\3\32\1\0" + + "\1\34\1\32\1\211\2\32\1\34\1\32\11\0\2\32" + + "\1\211\6\32\23\0\4\32\1\34\1\32\1\212\1\32" + + "\2\34\4\32\3\0\1\34\3\32\1\0\1\34\4\32" + + "\1\34\1\32\11\0\11\32\23\0\6\34\1\213\7\34" + + "\3\0\4\34\1\0\7\34\11\0\11\34\23\0\16\34" + + "\3\0\4\34\1\0\7\34\11\0\10\34\1\214\16\0" + + "\1\152\3\0\76\152\1\155\3\0\76\155\1\157\3\0" + + "\76\157\43\161\1\0\1\163\3\161\1\165\32\161\3\0" + + "\76\161\5\0\16\34\3\0\4\34\1\0\7\34\11\0" + + "\10\34\1\215\23\0\15\34\1\216\3\0\4\34\1\0" + + "\7\34\11\0\11\34\23\0\14\34\1\216\1\34\3\0" + + "\4\34\1\0\7\34\11\0\11\34\35\0\1\217\21\0" + + "\1\217\60\0\1\220\66\0\4\32\1\34\3\32\2\34" + + "\4\32\3\0\1\34\1\221\2\32\1\0\1\34\4\32" + + "\1\34\1\32\11\0\4\32\2\222\1\221\2\32\23\0" + + "\4\32\1\34\3\32\2\34\4\32\3\0\1\34\3\32" + + "\1\0\1\34\4\32\1\34\1\32\11\0\4\32\2\223" + + "\3\32\23\0\4\32\1\34\3\32\2\34\3\32\1\224" + + "\3\0\1\34\3\32\1\0\1\34\4\32\1\34\1\32" + + "\11\0\11\32\23\0\4\32\1\34\3\32\2\34\4\32" + + "\3\0\1\34\3\32\1\0\1\34\4\32\1\34\1\32" + + "\11\0\1\32\1\225\7\32\23\0\4\32\1\34\3\32" + + "\2\34\4\32\3\0\1\34\3\32\1\0\1\34\1\32" + + "\1\226\2\32\1\34\1\32\11\0\2\32\1\226\4\32" + + "\1\227\1\230\23\0\4\32\1\34\3\32\2\34\1\231" + + "\3\32\3\0\1\34\3\32\1\0\1\34\4\32\1\34" + + "\1\231\11\0\11\32\23\0\4\32\1\34\1\32\1\232" + + "\1\32\2\34\4\32\3\0\1\34\3\32\1\0\1\34" + + "\4\32\1\34\1\32\11\0\11\32\23\0\4\32\1\34" + + "\3\32\2\34\4\32\3\0\1\34\3\32\1\0\1\34" + + "\4\32\1\34\1\32\11\0\10\32\1\233\23\0\4\32" + + "\1\34\3\32\2\34\3\32\1\234\3\0\1\34\3\32" + + "\1\0\1\34\4\32\1\34\1\32\11\0\11\32\40\0" + + "\1\235\100\0\1\235\65\0\1\236\3\32\1\34\3\32" + + "\2\34\4\32\3\0\1\34\3\32\1\0\1\34\4\32" + + "\1\34\1\32\11\0\11\32\23\0\4\32\1\34\3\32" + + "\2\34\2\32\1\237\1\32\3\0\1\34\3\32\1\0" + + "\1\34\4\32\1\34\1\32\11\0\11\32\23\0\1\240" + + "\3\32\1\34\3\32\2\34\4\32\3\0\1\34\3\32" + + "\1\0\1\34\4\32\1\34\1\32\11\0\11\32\23\0" + + "\4\32\1\34\3\32\2\34\4\32\3\0\1\34\3\32" + + "\1\0\1\34\4\32\1\34\1\32\11\0\3\32\1\241" + + "\5\32\23\0\4\32\1\34\3\32\2\34\4\32\3\0" + + "\1\34\3\32\1\0\1\34\4\32\1\34\1\32\11\0" + + "\1\32\1\242\7\32\23\0\4\32\1\34\2\32\1\243" + + "\2\34\4\32\3\0\1\34\3\32\1\0\1\34\3\32" + + "\1\243\1\34\1\32\11\0\11\32\23\0\4\32\1\34" + + "\3\32\2\34\4\32\3\0\1\34\3\32\1\0\1\34" + + "\4\32\1\34\1\32\11\0\3\32\1\244\5\32\23\0" + + "\4\32\1\34\3\32\2\34\1\245\3\32\3\0\1\34" + + "\3\32\1\0\1\34\4\32\1\34\1\245\11\0\11\32" + + "\23\0\4\32\1\34\3\32\2\34\4\32\3\0\1\34" + + "\3\32\1\0\1\34\4\32\1\34\1\32\11\0\1\32" + + "\1\246\7\32\16\0"; private static int[] zzUnpackTrans() { - int[] result = new int[7194]; + int[] result = new int[6930]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -482,13 +467,14 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\6\0\2\11\6\1\1\11\6\1\1\11\62\1\1\0" + - "\21\1\2\11\5\1\1\11\6\1\1\0\1\11\6\0" + - "\2\1\1\0\2\1\2\11\2\1\3\11\2\1\2\0" + - "\2\11\15\1\2\0\14\1\1\0\11\1"; + "\7\0\2\11\5\1\1\11\6\1\1\11\25\1\1\11" + + "\12\1\1\11\4\1\13\11\3\1\1\0\21\1\2\11" + + "\5\1\1\11\6\1\1\0\1\11\6\0\1\1\1\0" + + "\2\1\2\11\1\1\3\11\2\1\2\0\2\11\15\1" + + "\2\0\14\1\1\0\11\1"; private static int[] zzUnpackAttribute() { - int[] result = new int[167]; + int[] result = new int[166]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -811,456 +797,480 @@ public class _M68kLexer implements FlexLexer { return BAD_CHARACTER; } // fall through - case 75: + case 77: break; case 2: { return WHITE_SPACE; } // fall through - case 76: + case 78: break; case 3: { yybegin(NOSOL); return WHITE_SPACE; } // fall through - case 77: + case 79: break; case 4: { yybegin(INSTRPART); return GLOBAL_LABEL_DEF; } // fall through - case 78: + case 80: break; case 5: { return COMMENT; } // fall through - case 79: - break; - case 6: { - return SYMBOL; - } - // fall through - case 80: - break; - case 7: { - yybegin(YYINITIAL); - return WHITE_SPACE; - } - // fall through case 81: break; - case 8: { - yybegin(ASMINSTR); - return isAsmMnemonic(yytext()) ? MNEMONIC : SYMBOL; + case 6: { + yybegin(YYINITIAL); + return WHITE_SPACE; } // fall through case 82: break; - case 9: { - yybegin(YYINITIAL); - return EOL; + case 7: { + if (isAsmMnemonic(yytext())) { + yybegin(ASMINSTR); + return MNEMONIC; + } else { + yybegin(INSTRPART); + return SYMBOL; + } } // fall through case 83: break; - case 10: { - return isAsmMnemonic(yytext()) ? MNEMONIC : SYMBOL; + case 8: { + yybegin(INSTRPART); + return SYMBOL; } // fall through case 84: break; - case 11: { - yybegin(ASMOPS); - return WHITE_SPACE; - } - // fall through - case 85: - break; - case 12: { + case 9: { yybegin(YYINITIAL); return COMMENT; } // fall through + case 85: + break; + case 10: { + yybegin(YYINITIAL); + return EOL; + } + // fall through case 86: break; - case 13: { - return DECIMAL; + case 11: { + if (isAsmMnemonic(yytext())) { + yybegin(ASMINSTR); + return MNEMONIC; + } else { + return SYMBOL; + } } // fall through case 87: break; - case 14: { - return OP_ASSIGN; + case 12: { + return SYMBOL; } // fall through case 88: break; - case 15: { - return DOT; + case 13: { + yybegin(WAITEOL); + return COMMENT; } // fall through case 89: break; - case 16: { - return COLON; + case 14: { + yybegin(ASMOPS); + return WHITE_SPACE; } // fall through case 90: break; - case 17: { - return DOLLAR; + case 15: { + return DECIMAL; } // fall through case 91: break; - case 18: { - return OP_AR_MOD; + case 16: { + return OP_ASSIGN; } // fall through case 92: break; - case 19: { - return OP_CMP_LT; + case 17: { + return DOT; } // fall through case 93: break; - case 20: { - return OP_CMP_GT; + case 18: { + return COLON; } // fall through case 94: break; - case 21: { - return SEMICOLON; + case 19: { + return DOLLAR; } // fall through case 95: break; - case 22: { - return HASH; + case 20: { + return OP_AR_MOD; } // fall through case 96: break; - case 23: { - return OP_BITWISE_AND; + case 21: { + return OP_CMP_LT; } // fall through case 97: break; - case 24: { - return OP_BITWISE_OR; + case 22: { + return OP_CMP_GT; } // fall through case 98: break; - case 25: { - return OP_UNARY_NOT; + case 23: { + return SEMICOLON; } // fall through case 99: break; - case 26: { - return OP_BITWISE_XOR; + case 24: { + return HASH; } // fall through case 100: break; - case 27: { - return SQUARE_L; + case 25: { + return OP_BITWISE_AND; } // fall through case 101: break; - case 28: { - return SQUARE_R; + case 26: { + return OP_BITWISE_OR; } // fall through case 102: break; - case 29: { - return ROUND_L; + case 27: { + return OP_UNARY_NOT; } // fall through case 103: break; - case 30: { - return ROUND_R; + case 28: { + return OP_BITWISE_XOR; } // fall through case 104: break; - case 31: { - return OP_UNARY_COMPL; + case 29: { + return SQUARE_L; } // fall through case 105: break; - case 32: { - return OP_PLUS; + case 30: { + return SQUARE_R; } // fall through case 106: break; - case 33: { - return OP_MINUS; + case 31: { + return ROUND_L; } // fall through case 107: break; - case 34: { - return OP_AR_MUL; + case 32: { + return ROUND_R; } // fall through case 108: break; - case 35: { - return OP_AR_DIV; + case 33: { + return OP_UNARY_COMPL; } // fall through case 109: break; - case 36: { - return SEPARATOR; + case 34: { + return OP_PLUS; } // fall through case 110: break; + case 35: { + return OP_MINUS; + } + // fall through + case 111: + break; + case 36: { + return OP_AR_MUL; + } + // fall through + case 112: + break; case 37: { + return OP_AR_DIV; + } + // fall through + case 113: + break; + case 38: { + return SEPARATOR; + } + // fall through + case 114: + break; + case 39: { yybegin(ASSIGNMENT); yypushback(pushbackAssignment(yytext())); return SYMBOLDEF; } // fall through - case 111: + case 115: break; - case 38: { + case 40: { yybegin(INSTRPART); return LOCAL_LABEL_DEF; } // fall through - case 112: - break; - case 39: { - return IF_TAG; - } - // fall through - case 113: - break; - case 40: { - return OPSIZE_BS; - } - // fall through - case 114: - break; - case 41: { - return OPSIZE_WL; - } - // fall through - case 115: - break; - case 42: { - return AREG; - } - // fall through case 116: break; - case 43: { - return REG_SR; + case 41: { + return IF_TAG; } // fall through case 117: break; - case 44: { - return PC; + case 42: { + return OPSIZE_BS; } // fall through case 118: break; - case 45: { - return DREG; + case 43: { + return OPSIZE_WL; } // fall through case 119: break; - case 46: { - return OP_CMP_EQ; + case 44: { + return AREG; } // fall through case 120: break; - case 47: { - return HEXADECIMAL; + case 45: { + return REG_SR; } // fall through case 121: break; - case 48: { - return BINARY; + case 46: { + return PC; } // fall through case 122: break; - case 49: { - return OCTAL; + case 47: { + return DREG; } // fall through case 123: break; - case 50: { - return STRINGLIT; + case 48: { + return OP_CMP_EQ; } // fall through case 124: break; - case 51: { - return OP_CMP_LT_EQ; + case 49: { + return HEXADECIMAL; } // fall through case 125: break; - case 52: { - return OP_AR_SHIFT_L; + case 50: { + return BINARY; } // fall through case 126: break; - case 53: { - return OP_CMP_GT_EQ; + case 51: { + return OCTAL; } // fall through case 127: break; - case 54: { - return OP_AR_SHIFT_R; + case 52: { + return STRINGLIT; } // fall through case 128: break; - case 55: { - return OP_LOGICAL_AND; + case 53: { + return OP_CMP_LT_EQ; } // fall through case 129: break; - case 56: { - return OP_LOGICAL_OR; + case 54: { + return OP_AR_SHIFT_L; } // fall through case 130: break; - case 57: { - return OP_CMP_NOT_EQ; + case 55: { + return OP_CMP_GT_EQ; } // fall through case 131: break; - case 58: { - return END_TAG; + case 56: { + return OP_AR_SHIFT_R; } // fall through case 132: break; - case 59: { - return REG_USP; + case 57: { + return OP_LOGICAL_AND; } // fall through case 133: break; - case 60: { - return REG_CCR; + case 58: { + return OP_LOGICAL_OR; } // fall through case 134: break; - case 61: { - return REG_VBR; + case 59: { + return OP_CMP_NOT_EQ; } // fall through case 135: break; - case 62: { - return EQU; + case 60: { + return END_TAG; } // fall through case 136: break; - case 63: { - return FAIL_TAG; + case 61: { + return REG_USP; } // fall through case 137: break; - case 64: { - return EVEN_TAG; + case 62: { + return REG_CCR; } // fall through case 138: break; - case 65: { - return ENDC_TAG; + case 63: { + return REG_VBR; } // fall through case 139: break; - case 66: { - return MACRO_END_TAG; + case 64: { + return EQU; } // fall through case 140: break; - case 67: { - return REPT_END_TAG; + case 65: { + return FAIL_TAG; } // fall through case 141: break; - case 68: { - return ELSE_TAG; + case 66: { + return EVEN_TAG; } // fall through case 142: break; - case 69: { - return CNOP_TAG; + case 67: { + return ENDC_TAG; } // fall through case 143: break; - case 70: { - return REPT_TAG; + case 68: { + return MACRO_END_TAG; } // fall through case 144: break; - case 71: { - return MACRO_TAG; + case 69: { + return REPT_END_TAG; } // fall through case 145: break; - case 72: { - return INCBIN_TAG; + case 70: { + return ELSE_TAG; } // fall through case 146: break; - case 73: { - return INCLUDE_TAG; + case 71: { + return CNOP_TAG; } // fall through case 147: break; - case 74: { - return SECTION_TAG; + case 72: { + return REPT_TAG; } // fall through case 148: break; + case 73: { + return MACRO_TAG; + } + // fall through + case 149: + break; + case 74: { + return INCBIN_TAG; + } + // fall through + case 150: + break; + case 75: { + return INCLUDE_TAG; + } + // fall through + case 151: + break; + case 76: { + return SECTION_TAG; + } + // fall through + case 152: + 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 ef8ce3b..d2eb1db 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 @@ -273,44 +273,44 @@ public class M68kParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // AbsoluteAddressAddressingMode - // | SpecialRegisterDirectAddressingMode - // | DataRegisterDirectAddressingMode - // | AddressRegisterDirectAddressingMode + // ImmediateData + // | AddressRegisterIndirectPreDecAddressingMode + // | AddressRegisterIndirectPostIncAddressingMode // | AddressRegisterIndirectAddressingMode - // | AddressRegisterIndirectWithDisplacementOldAddressingMode - // | ProgramCounterIndirectWithDisplacementOldAddressingMode - // | AddressRegisterIndirectWithIndexOldAddressingMode - // | ProgramCounterIndirectWithIndexOldAddressingMode // | AddressRegisterIndirectWithDisplacementNewAddressingMode // | ProgramCounterIndirectWithDisplacementNewAddressingMode // | AddressRegisterIndirectWithIndexNewAddressingMode // | ProgramCounterIndirectWithIndexNewAddressingMode - // | AddressRegisterIndirectPreDecAddressingMode - // | AddressRegisterIndirectPostIncAddressingMode + // | AddressRegisterIndirectWithDisplacementOldAddressingMode + // | ProgramCounterIndirectWithDisplacementOldAddressingMode + // | AddressRegisterIndirectWithIndexOldAddressingMode + // | ProgramCounterIndirectWithIndexOldAddressingMode + // | SpecialRegisterDirectAddressingMode + // | DataRegisterDirectAddressingMode + // | AddressRegisterDirectAddressingMode // | RegisterListAddressingMode - // | ImmediateData + // | AbsoluteAddressAddressingMode public static boolean AddressingMode(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "AddressingMode")) return false; boolean r; Marker m = enter_section_(b, l, _COLLAPSE_, ADDRESSING_MODE, ""); - r = AbsoluteAddressAddressingMode(b, l + 1); - if (!r) r = SpecialRegisterDirectAddressingMode(b, l + 1); - if (!r) r = DataRegisterDirectAddressingMode(b, l + 1); - if (!r) r = AddressRegisterDirectAddressingMode(b, l + 1); + r = ImmediateData(b, l + 1); + if (!r) r = AddressRegisterIndirectPreDecAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectPostIncAddressingMode(b, l + 1); if (!r) r = AddressRegisterIndirectAddressingMode(b, l + 1); - if (!r) r = AddressRegisterIndirectWithDisplacementOldAddressingMode(b, l + 1); - if (!r) r = ProgramCounterIndirectWithDisplacementOldAddressingMode(b, l + 1); - if (!r) r = AddressRegisterIndirectWithIndexOldAddressingMode(b, l + 1); - if (!r) r = ProgramCounterIndirectWithIndexOldAddressingMode(b, l + 1); if (!r) r = AddressRegisterIndirectWithDisplacementNewAddressingMode(b, l + 1); if (!r) r = ProgramCounterIndirectWithDisplacementNewAddressingMode(b, l + 1); if (!r) r = AddressRegisterIndirectWithIndexNewAddressingMode(b, l + 1); if (!r) r = ProgramCounterIndirectWithIndexNewAddressingMode(b, l + 1); - if (!r) r = AddressRegisterIndirectPreDecAddressingMode(b, l + 1); - if (!r) r = AddressRegisterIndirectPostIncAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectWithDisplacementOldAddressingMode(b, l + 1); + if (!r) r = ProgramCounterIndirectWithDisplacementOldAddressingMode(b, l + 1); + if (!r) r = AddressRegisterIndirectWithIndexOldAddressingMode(b, l + 1); + if (!r) r = ProgramCounterIndirectWithIndexOldAddressingMode(b, l + 1); + if (!r) r = SpecialRegisterDirectAddressingMode(b, l + 1); + if (!r) r = DataRegisterDirectAddressingMode(b, l + 1); + if (!r) r = AddressRegisterDirectAddressingMode(b, l + 1); if (!r) r = RegisterListAddressingMode(b, l + 1); - if (!r) r = ImmediateData(b, l + 1); + if (!r) r = AbsoluteAddressAddressingMode(b, l + 1); exit_section_(b, l, m, r, false, null); return r; } @@ -356,18 +356,18 @@ public class M68kParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // FirstAsmOperand (SEPARATOR NextAsmOperand)* + // AddressingMode (SEPARATOR AddressingMode)* public static boolean AsmOperands(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "AsmOperands")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, ASM_OPERANDS, ""); - r = FirstAsmOperand(b, l + 1); + r = AddressingMode(b, l + 1); r = r && AsmOperands_1(b, l + 1); exit_section_(b, l, m, r, false, null); return r; } - // (SEPARATOR NextAsmOperand)* + // (SEPARATOR AddressingMode)* private static boolean AsmOperands_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "AsmOperands_1")) return false; while (true) { @@ -378,13 +378,13 @@ public class M68kParser implements PsiParser, LightPsiParser { return true; } - // SEPARATOR NextAsmOperand + // SEPARATOR AddressingMode private static boolean AsmOperands_1_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "AsmOperands_1_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, SEPARATOR); - r = r && NextAsmOperand(b, l + 1); + r = r && AddressingMode(b, l + 1); exit_section_(b, m, null, r); return r; } @@ -481,12 +481,6 @@ public class M68kParser implements PsiParser, LightPsiParser { return r; } - /* ********************************************************** */ - // AddressingMode - static boolean FirstAsmOperand(PsiBuilder b, int l) { - return AddressingMode(b, l + 1); - } - /* ********************************************************** */ // GLOBAL_LABEL_DEF public static boolean GlobalLabel(PsiBuilder b, int l) { @@ -543,12 +537,12 @@ public class M68kParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // LabelOnly|LabelWithInstruction|InstructionOnly + // LabelWithInstruction | LabelOnly | InstructionOnly static boolean LabelInsts(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "LabelInsts")) return false; boolean r; - r = LabelOnly(b, l + 1); - if (!r) r = LabelWithInstruction(b, l + 1); + r = LabelWithInstruction(b, l + 1); + if (!r) r = LabelOnly(b, l + 1); if (!r) r = InstructionOnly(b, l + 1); return r; } @@ -616,12 +610,6 @@ public class M68kParser implements PsiParser, LightPsiParser { return true; } - /* ********************************************************** */ - // AddressingMode - static boolean NextAsmOperand(PsiBuilder b, int l) { - return AddressingMode(b, l + 1); - } - /* ********************************************************** */ // OPSIZE_BS|OPSIZE_WL public static boolean OperandSize(PsiBuilder b, int l) { diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/lexer/LexerUtil.kt b/src/main/java/de/platon42/intellij/plugins/m68k/lexer/LexerUtil.kt index 24c6580..17d1906 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/lexer/LexerUtil.kt +++ b/src/main/java/de/platon42/intellij/plugins/m68k/lexer/LexerUtil.kt @@ -3,11 +3,18 @@ package de.platon42.intellij.plugins.m68k.lexer import de.platon42.intellij.plugins.m68k.asm.M68kIsa.mnemonics object LexerUtil { - private val ASSIGNMENT_SEPARATORS = charArrayOf('=', ' ', '\t') + + private val ASSIGNMENT_SEPARATORS = charArrayOf(' ', '\t') @JvmStatic fun isAsmMnemonic(text: CharSequence) = mnemonics.contains(text.toString().lowercase()) @JvmStatic - fun pushbackAssignment(text: CharSequence) = text.length - 1 - text.indexOfAny(ASSIGNMENT_SEPARATORS) + fun pushbackAssignment(text: CharSequence): Int { + val spacePos = text.indexOfAny(ASSIGNMENT_SEPARATORS) + if (spacePos > -1) { + return text.length - spacePos + } + return text.length - 1 - text.indexOf('=') + } } \ No newline at end of file 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 9337019..e39546b 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 @@ -38,7 +38,7 @@ LOCAL_LABEL_WC=(\.([:letter:]|_)(([:letter:]|[:digit:])|_)*:)|(([:letter:]|_)(([ GLOBAL_LABEL=(([:letter:]|_)(([:letter:]|[:digit:])|_)*:?:?) GLOBAL_LABEL_WC=(([:letter:]|_)(([:letter:]|[:digit:])|_)*::?) MNEMONIC=(([:letter:])+) -SYMBOL=(([:letter:]|_|.)(([:letter:]|[:digit:])|_|\$)*) +SYMBOL=(([:letter:]|_|\.)(([:letter:]|[:digit:])|[_\$])*) OPSIZE_BS=(\.[bs]) OPSIZE_WL=(\.[wl]) BINARY=(%[01]+) @@ -49,7 +49,7 @@ STRINGLIT=(`([^`\\]|\\.)*`|'([^'\\]|\\.)*'|\"([^\"\\]|\\.)*\")|<([^`\\]|\\.)*> COMMENT=([;].*+) HASH_COMMENT=([#;*].*+) -%state NOSOL,INSTRPART,ASMINSTR,ASMOPS,ASSIGNMENT +%state NOSOL,INSTRPART,ASMINSTR,ASMOPS,ASSIGNMENT,WAITEOL %% { @@ -67,8 +67,8 @@ HASH_COMMENT=([#;*].*+) {EOL} { yybegin(YYINITIAL); return WHITE_SPACE; } {LOCAL_LABEL_WC} { yybegin(INSTRPART); return LOCAL_LABEL_DEF; } {GLOBAL_LABEL_WC} { yybegin(INSTRPART); return GLOBAL_LABEL_DEF; } - {MNEMONIC} { yybegin(ASMINSTR); return isAsmMnemonic(yytext()) ? MNEMONIC : SYMBOL; } - {SYMBOL} { return SYMBOL; } + {MNEMONIC} { if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } else { yybegin(INSTRPART); return SYMBOL; } } + {SYMBOL} { yybegin(INSTRPART); return SYMBOL; } {HASH_COMMENT} { yybegin(YYINITIAL); return COMMENT; } } @@ -93,10 +93,10 @@ HASH_COMMENT=([#;*].*+) {IF_TAG} { return IF_TAG; } - {MNEMONIC} { return isAsmMnemonic(yytext()) ? MNEMONIC : SYMBOL; } + {MNEMONIC} { if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } else { return SYMBOL; } } {SYMBOL} { return SYMBOL; } - {COMMENT} { yybegin(YYINITIAL); return COMMENT; } + {COMMENT} { yybegin(WAITEOL); return COMMENT; } } { @@ -106,7 +106,7 @@ HASH_COMMENT=([#;*].*+) {OPSIZE_BS} { return OPSIZE_BS; } {OPSIZE_WL} { return OPSIZE_WL; } - {COMMENT} { yybegin(YYINITIAL); return COMMENT; } + {COMMENT} { yybegin(WAITEOL); return COMMENT; } } { @@ -155,7 +155,7 @@ HASH_COMMENT=([#;*].*+) {SYMBOL} { return SYMBOL; } - {COMMENT} { return COMMENT; } + {COMMENT} { yybegin(WAITEOL); return COMMENT; } } { @@ -171,6 +171,14 @@ HASH_COMMENT=([#;*].*+) {OPSIZE_BS} { return OPSIZE_BS; } {OPSIZE_WL} { return OPSIZE_WL; } + {AREG} { return AREG; } + {DREG} { return DREG; } + "pc" { return PC; } + "ccr" { return REG_CCR; } + "sr" { return REG_SR; } + "usp" { return REG_USP; } + "vbr" { return REG_VBR; } + "<<" { return OP_AR_SHIFT_L; } ">>" { return OP_AR_SHIFT_R; } "&&" { return OP_LOGICAL_AND; } @@ -204,18 +212,15 @@ HASH_COMMENT=([#;*].*+) "/" { return OP_AR_DIV; } "%" { return OP_AR_MOD; } - {AREG} { return AREG; } - {DREG} { return DREG; } - "pc" { return PC; } - "ccr" { return REG_CCR; } - "sr" { return REG_SR; } - "usp" { return REG_USP; } - "vbr" { return REG_VBR; } - {SYMBOL} { return SYMBOL; } - {COMMENT} { return COMMENT; } + {COMMENT} { yybegin(WAITEOL); return COMMENT; } } + +{ + {EOL} { yybegin(YYINITIAL); return EOL; } +} + [^] { return BAD_CHARACTER; } 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 ec928c3..9841c0e 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf +++ b/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf @@ -128,7 +128,7 @@ private statement_recover ::= !(EOL) Assignment ::= SYMBOLDEF (OP_ASSIGN|EQU) expr -private LabelInsts ::= LabelOnly|LabelWithInstruction|InstructionOnly +private LabelInsts ::= LabelWithInstruction | LabelOnly | InstructionOnly private LabelOnly ::= Label private LabelWithInstruction ::= Label Instruction @@ -166,11 +166,7 @@ AsmInstruction ::= AsmOp AsmOperands? private Instruction ::= AsmInstruction | MacroCall //external Instruction ::= parseMacroCallOrAsmInstruction -AsmOperands ::= FirstAsmOperand (SEPARATOR NextAsmOperand)* - -private FirstAsmOperand ::= AddressingMode - -private NextAsmOperand ::= AddressingMode +AsmOperands ::= AddressingMode (SEPARATOR AddressingMode)* private PreprocessorOperands ::= PreprocessorOperand (SEPARATOR PreprocessorOperand)* @@ -184,23 +180,23 @@ Register ::= DataRegister | AddressRegister | SpecialRegister private DataOrAddressRegister ::= DataRegister | AddressRegister -AddressingMode ::= AbsoluteAddressAddressingMode - | SpecialRegisterDirectAddressingMode - | DataRegisterDirectAddressingMode - | AddressRegisterDirectAddressingMode +AddressingMode ::= ImmediateData + | AddressRegisterIndirectPreDecAddressingMode + | AddressRegisterIndirectPostIncAddressingMode | AddressRegisterIndirectAddressingMode - | AddressRegisterIndirectWithDisplacementOldAddressingMode - | ProgramCounterIndirectWithDisplacementOldAddressingMode - | AddressRegisterIndirectWithIndexOldAddressingMode - | ProgramCounterIndirectWithIndexOldAddressingMode | AddressRegisterIndirectWithDisplacementNewAddressingMode | ProgramCounterIndirectWithDisplacementNewAddressingMode | AddressRegisterIndirectWithIndexNewAddressingMode | ProgramCounterIndirectWithIndexNewAddressingMode - | AddressRegisterIndirectPreDecAddressingMode - | AddressRegisterIndirectPostIncAddressingMode + | AddressRegisterIndirectWithDisplacementOldAddressingMode + | ProgramCounterIndirectWithDisplacementOldAddressingMode + | AddressRegisterIndirectWithIndexOldAddressingMode + | ProgramCounterIndirectWithIndexOldAddressingMode + | SpecialRegisterDirectAddressingMode + | DataRegisterDirectAddressingMode + | AddressRegisterDirectAddressingMode | RegisterListAddressingMode - | ImmediateData + | AbsoluteAddressAddressingMode SpecialRegisterDirectAddressingMode ::= SpecialRegister DataRegisterDirectAddressingMode ::= DataRegister !(OP_MINUS|OP_AR_DIV) diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/AbstractM68kTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/AbstractM68kTest.kt new file mode 100644 index 0000000..43c6635 --- /dev/null +++ b/src/test/java/de/platon42/intellij/plugins/m68k/AbstractM68kTest.kt @@ -0,0 +1,16 @@ +package de.platon42.intellij.plugins.m68k + +import org.junit.jupiter.api.DisplayNameGeneration +import org.junit.jupiter.api.DisplayNameGenerator +import java.lang.reflect.Method + +@DisplayNameGeneration(AbstractM68kTest.CutOffFixtureDisplayNameGenerator::class) +abstract class AbstractM68kTest { + + class CutOffFixtureDisplayNameGenerator : DisplayNameGenerator.ReplaceUnderscores() { + override fun generateDisplayNameForMethod(testClass: Class<*>?, testMethod: Method?): String { + val nameForMethod = super.generateDisplayNameForMethod(testClass, testMethod) + return nameForMethod.substringBefore("$") + } + } +} \ No newline at end of file diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/parser/AbstractParsingTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/parser/AbstractParsingTest.kt new file mode 100644 index 0000000..556d206 --- /dev/null +++ b/src/test/java/de/platon42/intellij/plugins/m68k/parser/AbstractParsingTest.kt @@ -0,0 +1,24 @@ +package de.platon42.intellij.plugins.m68k.parser + +import de.platon42.intellij.jupiter.MyParser +import de.platon42.intellij.jupiter.ParsingTestExtension +import de.platon42.intellij.jupiter.TestDataPath +import de.platon42.intellij.plugins.m68k.AbstractM68kTest +import org.junit.jupiter.api.extension.ExtendWith + +@ExtendWith(ParsingTestExtension::class) +@TestDataPath("src/test/resources/parser") +@MyParser(value = M68kParserDefinition::class, extension = "asm") +abstract class AbstractParsingTest : AbstractM68kTest() { + + fun testGoodSyntax(testCase: ParsingTestExtension.IParsingTestCase, code: String) { + testCase.doCodeTest(code) + testCase.ensureCorrectReparse() + testCase.ensureNoErrorElements() + } + + fun testBadSyntax(testCase: ParsingTestExtension.IParsingTestCase, code: String) { + testCase.doCodeTest(code) + testCase.ensureCorrectReparse() + } +} \ No newline at end of file diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/parser/BasicAsmInstTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/parser/BasicAsmInstTest.kt new file mode 100644 index 0000000..10804e6 --- /dev/null +++ b/src/test/java/de/platon42/intellij/plugins/m68k/parser/BasicAsmInstTest.kt @@ -0,0 +1,25 @@ +package de.platon42.intellij.plugins.m68k.parser + +import de.platon42.intellij.jupiter.MyTestCase +import de.platon42.intellij.jupiter.ParserResultFile +import de.platon42.intellij.jupiter.ParsingTestExtension +import de.platon42.intellij.jupiter.TestDataSubPath +import org.junit.jupiter.api.Test + +@TestDataSubPath("basic") +internal class BasicAsmInstTest : AbstractParsingTest() { + + @Test + @ParserResultFile("basic_block_of_code") + internal fun parser_can_parse_basic_block_of_code(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax( + testCase, "\tadd.l d0,d0\n" + + "\tmoveq #10,d1\n" + + " rts\n" + + "\n" + + "; comment\n" + + " jmp\tresetcode ; unreachable\n" + + " \n" + ) + } +} \ No newline at end of file diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/parser/CommentsTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/parser/CommentsTest.kt new file mode 100644 index 0000000..fef4b70 --- /dev/null +++ b/src/test/java/de/platon42/intellij/plugins/m68k/parser/CommentsTest.kt @@ -0,0 +1,50 @@ +package de.platon42.intellij.plugins.m68k.parser + +import de.platon42.intellij.jupiter.MyTestCase +import de.platon42.intellij.jupiter.ParsingTestExtension +import de.platon42.intellij.jupiter.TestDataSubPath +import org.junit.jupiter.api.Test + +@TestDataSubPath("comments") +internal class CommentsTest : AbstractParsingTest() { + + @Test + internal fun asterisk_comment_at_sol(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "*********** comment\n") + } + + @Test + internal fun asterisk_comment_after_space(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " *********** comment\n") + } + + @Test + internal fun hash_comment_at_sol(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "#comment \n") + } + + @Test + internal fun hash_comment_after_space(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " #comment \n") + } + + @Test + internal fun semicolon_comment_at_sol(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "; comment \n") + } + + @Test + internal fun semicolon_comment_after_space(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " ; comment \n") + } + + @Test + internal fun empty_and_blank_lines(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "; hi\n\n\n * foo\n\n\n \n\n # bar\n\n") + } + + @Test + internal fun end_of_line_comments(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "foo = 1234; hi\n\n\nlabel; foo\n\n\n add.w d0,d0;narf \n\n") + } +} \ No newline at end of file diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/parser/LabelsTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/parser/LabelsTest.kt new file mode 100644 index 0000000..ca70c92 --- /dev/null +++ b/src/test/java/de/platon42/intellij/plugins/m68k/parser/LabelsTest.kt @@ -0,0 +1,87 @@ +package de.platon42.intellij.plugins.m68k.parser + +import de.platon42.intellij.jupiter.MyTestCase +import de.platon42.intellij.jupiter.ParsingTestExtension +import de.platon42.intellij.jupiter.TestDataSubPath +import org.junit.jupiter.api.Test + +@TestDataSubPath("labels") +internal class LabelsTest : AbstractParsingTest() { + + @Test + internal fun plain_global_label(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "Global_Label\n") + } + + @Test + internal fun global_label_with_colon(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "Global_Label:\n") + } + + @Test + internal fun external_label_with_double_colon(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "External_Label::\n") + } + + @Test + internal fun indented_global_label_with_colon(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " Global_Label:\n") + } + + @Test + internal fun indented_external_label_with_double_colon(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " External_Label::\n") + } + + @Test + internal fun plain_dot_local_label(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, ".local_label\n") + } + + @Test + internal fun dot_local_label_with_colon(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, ".local_label:\n") + } + + @Test + internal fun indented_dot_local_label_with_colon(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "\t.local_label:\n") + } + + @Test + internal fun plain_local_label_dollar(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "local_label$\n") + } + + @Test + internal fun local_label_dollar_with_colon(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "local_label$:\n") + } + + @Test + internal fun indented_local_label_dollar_with_colon(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " local_label$:\n") + } + + @Test + internal fun bad_indented_dot_local_label_without_label(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testBadSyntax(testCase, " .local_label\n") + } + + @Test + internal fun bad_indented_local_label_dollar_without_label(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testBadSyntax(testCase, " local_label$\n") + } + + @Test + internal fun complex_label_test(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax( + testCase, "start_demo: ; here we will do some cool stuff\n" + + ".outerloop moveq.l #17-1,d7 ; this is the outer loop\n" + + "innerloop$ move.l (a0)+,(a1)+ ; copy stuff\n" + + " dbne d7,innerloop$ ; copy more\n" + + " .skip: bne.s .outerloop ; end of chunk?\n" + + " GlobalExit:: rts\n" + ) + } +} \ No newline at end of file diff --git a/src/test/resources/parser/basic/basic_block_of_code.txt b/src/test/resources/parser/basic/basic_block_of_code.txt new file mode 100644 index 0000000..4410ceb --- /dev/null +++ b/src/test/resources/parser/basic/basic_block_of_code.txt @@ -0,0 +1,58 @@ +Assembly File: a.asm + PsiWhiteSpace('\t') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('add') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_WL)('.l') + PsiWhiteSpace(' ') + M68kAsmOperandsImpl(ASM_OPERANDS) + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.,)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace('\t') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('moveq') + PsiWhiteSpace(' ') + M68kAsmOperandsImpl(ASM_OPERANDS) + M68kImmediateDataImpl(IMMEDIATE_DATA) + PsiElement(M68kTokenType.#)('#') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.,)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d1') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('rts') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace('\n') + PsiComment(M68kTokenType.COMMENT)('; comment') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('jmp') + PsiWhiteSpace('\t') + M68kAsmOperandsImpl(ASM_OPERANDS) + M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('resetcode') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('; unreachable') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace(' ') + PsiWhiteSpace('\n') \ No newline at end of file diff --git a/src/test/resources/parser/comments/asterisk_comment_after_space.txt b/src/test/resources/parser/comments/asterisk_comment_after_space.txt new file mode 100644 index 0000000..0649a46 --- /dev/null +++ b/src/test/resources/parser/comments/asterisk_comment_after_space.txt @@ -0,0 +1,4 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('*********** comment') + PsiWhiteSpace('\n') \ No newline at end of file diff --git a/src/test/resources/parser/comments/asterisk_comment_at_sol.txt b/src/test/resources/parser/comments/asterisk_comment_at_sol.txt new file mode 100644 index 0000000..a48f908 --- /dev/null +++ b/src/test/resources/parser/comments/asterisk_comment_at_sol.txt @@ -0,0 +1,3 @@ +Assembly File: a.asm + PsiComment(M68kTokenType.COMMENT)('*********** comment') + PsiWhiteSpace('\n') \ No newline at end of file diff --git a/src/test/resources/parser/comments/empty_and_blank_lines.txt b/src/test/resources/parser/comments/empty_and_blank_lines.txt new file mode 100644 index 0000000..1e287c9 --- /dev/null +++ b/src/test/resources/parser/comments/empty_and_blank_lines.txt @@ -0,0 +1,17 @@ +Assembly File: a.asm + PsiComment(M68kTokenType.COMMENT)('; hi') + PsiWhiteSpace('\n') + PsiWhiteSpace('\n') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('* foo') + PsiWhiteSpace('\n') + PsiWhiteSpace('\n') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + PsiWhiteSpace('\n') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('# bar') + PsiWhiteSpace('\n') + PsiWhiteSpace('\n') \ No newline at end of file diff --git a/src/test/resources/parser/comments/end_of_line_comments.txt b/src/test/resources/parser/comments/end_of_line_comments.txt new file mode 100644 index 0000000..e813018 --- /dev/null +++ b/src/test/resources/parser/comments/end_of_line_comments.txt @@ -0,0 +1,39 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kAssignmentImpl(ASSIGNMENT) + PsiElement(M68kTokenType.SYMBOLDEF)('foo') + PsiWhiteSpace(' ') + PsiElement(M68kTokenType.=)('=') + PsiWhiteSpace(' ') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1234') + PsiComment(M68kTokenType.COMMENT)('; hi') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace('\n') + PsiWhiteSpace('\n') + M68kStatementImpl(STATEMENT) + M68kGlobalLabelImpl(GLOBAL_LABEL) + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('label') + PsiComment(M68kTokenType.COMMENT)('; foo') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace('\n') + PsiWhiteSpace('\n') + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('add') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_WL)('.w') + PsiWhiteSpace(' ') + M68kAsmOperandsImpl(ASM_OPERANDS) + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.,)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiComment(M68kTokenType.COMMENT)(';narf ') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace('\n') \ No newline at end of file diff --git a/src/test/resources/parser/comments/hash_comment_after_space.txt b/src/test/resources/parser/comments/hash_comment_after_space.txt new file mode 100644 index 0000000..f55b795 --- /dev/null +++ b/src/test/resources/parser/comments/hash_comment_after_space.txt @@ -0,0 +1,4 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('#comment ') + PsiWhiteSpace('\n') \ No newline at end of file diff --git a/src/test/resources/parser/comments/hash_comment_at_sol.txt b/src/test/resources/parser/comments/hash_comment_at_sol.txt new file mode 100644 index 0000000..86f4d9f --- /dev/null +++ b/src/test/resources/parser/comments/hash_comment_at_sol.txt @@ -0,0 +1,3 @@ +Assembly File: a.asm + PsiComment(M68kTokenType.COMMENT)('#comment ') + PsiWhiteSpace('\n') \ No newline at end of file diff --git a/src/test/resources/parser/comments/semicolon_comment_after_space.txt b/src/test/resources/parser/comments/semicolon_comment_after_space.txt new file mode 100644 index 0000000..bd04cdd --- /dev/null +++ b/src/test/resources/parser/comments/semicolon_comment_after_space.txt @@ -0,0 +1,4 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('; comment ') + PsiWhiteSpace('\n') \ No newline at end of file diff --git a/src/test/resources/parser/comments/semicolon_comment_at_sol.txt b/src/test/resources/parser/comments/semicolon_comment_at_sol.txt new file mode 100644 index 0000000..79389fe --- /dev/null +++ b/src/test/resources/parser/comments/semicolon_comment_at_sol.txt @@ -0,0 +1,3 @@ +Assembly File: a.asm + PsiComment(M68kTokenType.COMMENT)('; comment ') + PsiWhiteSpace('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/bad_indented_dot_local_label_without_label.txt b/src/test/resources/parser/labels/bad_indented_dot_local_label_without_label.txt new file mode 100644 index 0000000..f6f76a0 --- /dev/null +++ b/src/test/resources/parser/labels/bad_indented_dot_local_label_without_label.txt @@ -0,0 +1,6 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kMacroCallImpl(MACRO_CALL) + PsiElement(M68kTokenType.SYMBOL)('.local_label') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/bad_indented_local_label_dollar_without_label.txt b/src/test/resources/parser/labels/bad_indented_local_label_dollar_without_label.txt new file mode 100644 index 0000000..5a2018f --- /dev/null +++ b/src/test/resources/parser/labels/bad_indented_local_label_dollar_without_label.txt @@ -0,0 +1,6 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kMacroCallImpl(MACRO_CALL) + PsiElement(M68kTokenType.SYMBOL)('local_label$') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/complex_label_test.txt b/src/test/resources/parser/labels/complex_label_test.txt new file mode 100644 index 0000000..40fc3b9 --- /dev/null +++ b/src/test/resources/parser/labels/complex_label_test.txt @@ -0,0 +1,104 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kGlobalLabelImpl(GLOBAL_LABEL) + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('start_demo:') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('; here we will do some cool stuff') + PsiElement(M68kTokenType.EOL)('\n') + M68kStatementImpl(STATEMENT) + M68kLocalLabelImpl(LOCAL_LABEL) + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.outerloop') + PsiWhiteSpace(' ') + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('moveq') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_WL)('.l') + PsiWhiteSpace(' ') + M68kAsmOperandsImpl(ASM_OPERANDS) + M68kImmediateDataImpl(IMMEDIATE_DATA) + PsiElement(M68kTokenType.#)('#') + M68kBinarySubExprImpl(BINARY_SUB_EXPR) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('17') + PsiElement(M68kTokenType.-)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1') + PsiElement(M68kTokenType.,)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d7') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('; this is the outer loop') + PsiElement(M68kTokenType.EOL)('\n') + M68kStatementImpl(STATEMENT) + M68kLocalLabelImpl(LOCAL_LABEL) + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('innerloop$') + PsiWhiteSpace(' ') + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('move') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_WL)('.l') + PsiWhiteSpace(' ') + M68kAsmOperandsImpl(ASM_OPERANDS) + M68kAddressRegisterIndirectPostIncAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE) + PsiElement(M68kTokenType.()('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.))(')') + PsiElement(M68kTokenType.+)('+') + PsiElement(M68kTokenType.,)(',') + M68kAddressRegisterIndirectPostIncAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE) + PsiElement(M68kTokenType.()('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.))(')') + PsiElement(M68kTokenType.+)('+') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('; copy stuff') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('dbne') + PsiWhiteSpace(' ') + M68kAsmOperandsImpl(ASM_OPERANDS) + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d7') + PsiElement(M68kTokenType.,)(',') + M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('innerloop$') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('; copy more') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kLocalLabelImpl(LOCAL_LABEL) + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.skip:') + PsiWhiteSpace(' ') + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('bne') + M68kOperandSizeImpl(OPERAND_SIZE) + PsiElement(M68kTokenType.OPSIZE_BS)('.s') + PsiWhiteSpace(' ') + M68kAsmOperandsImpl(ASM_OPERANDS) + M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('.outerloop') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('; end of chunk?') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kGlobalLabelImpl(GLOBAL_LABEL) + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('GlobalExit::') + PsiWhiteSpace(' ') + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('rts') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/dot_local_label_with_colon.txt b/src/test/resources/parser/labels/dot_local_label_with_colon.txt new file mode 100644 index 0000000..6f2b23f --- /dev/null +++ b/src/test/resources/parser/labels/dot_local_label_with_colon.txt @@ -0,0 +1,5 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kLocalLabelImpl(LOCAL_LABEL) + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.local_label:') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/external_label_with_double_colon.txt b/src/test/resources/parser/labels/external_label_with_double_colon.txt new file mode 100644 index 0000000..bc22309 --- /dev/null +++ b/src/test/resources/parser/labels/external_label_with_double_colon.txt @@ -0,0 +1,5 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kGlobalLabelImpl(GLOBAL_LABEL) + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('External_Label::') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/global_label_with_colon.txt b/src/test/resources/parser/labels/global_label_with_colon.txt new file mode 100644 index 0000000..8a78de3 --- /dev/null +++ b/src/test/resources/parser/labels/global_label_with_colon.txt @@ -0,0 +1,5 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kGlobalLabelImpl(GLOBAL_LABEL) + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('Global_Label:') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/indented_dot_local_label_with_colon.txt b/src/test/resources/parser/labels/indented_dot_local_label_with_colon.txt new file mode 100644 index 0000000..9a20a3c --- /dev/null +++ b/src/test/resources/parser/labels/indented_dot_local_label_with_colon.txt @@ -0,0 +1,6 @@ +Assembly File: a.asm + PsiWhiteSpace('\t') + M68kStatementImpl(STATEMENT) + M68kLocalLabelImpl(LOCAL_LABEL) + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.local_label:') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/indented_external_label_with_double_colon.txt b/src/test/resources/parser/labels/indented_external_label_with_double_colon.txt new file mode 100644 index 0000000..e7f007b --- /dev/null +++ b/src/test/resources/parser/labels/indented_external_label_with_double_colon.txt @@ -0,0 +1,6 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kGlobalLabelImpl(GLOBAL_LABEL) + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('External_Label::') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/indented_global_label_with_colon.txt b/src/test/resources/parser/labels/indented_global_label_with_colon.txt new file mode 100644 index 0000000..3635b32 --- /dev/null +++ b/src/test/resources/parser/labels/indented_global_label_with_colon.txt @@ -0,0 +1,6 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kGlobalLabelImpl(GLOBAL_LABEL) + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('Global_Label:') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/indented_local_label_dollar_with_colon.txt b/src/test/resources/parser/labels/indented_local_label_dollar_with_colon.txt new file mode 100644 index 0000000..99c097a --- /dev/null +++ b/src/test/resources/parser/labels/indented_local_label_dollar_with_colon.txt @@ -0,0 +1,6 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kLocalLabelImpl(LOCAL_LABEL) + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('local_label$:') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/local_label_dollar_with_colon.txt b/src/test/resources/parser/labels/local_label_dollar_with_colon.txt new file mode 100644 index 0000000..2fb78b2 --- /dev/null +++ b/src/test/resources/parser/labels/local_label_dollar_with_colon.txt @@ -0,0 +1,5 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kLocalLabelImpl(LOCAL_LABEL) + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('local_label$:') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/plain_dot_local_label.txt b/src/test/resources/parser/labels/plain_dot_local_label.txt new file mode 100644 index 0000000..995c3a3 --- /dev/null +++ b/src/test/resources/parser/labels/plain_dot_local_label.txt @@ -0,0 +1,5 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kLocalLabelImpl(LOCAL_LABEL) + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.local_label') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/plain_global_label.txt b/src/test/resources/parser/labels/plain_global_label.txt new file mode 100644 index 0000000..32944fe --- /dev/null +++ b/src/test/resources/parser/labels/plain_global_label.txt @@ -0,0 +1,5 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kGlobalLabelImpl(GLOBAL_LABEL) + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('Global_Label') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/labels/plain_local_label_dollar.txt b/src/test/resources/parser/labels/plain_local_label_dollar.txt new file mode 100644 index 0000000..49c77ba --- /dev/null +++ b/src/test/resources/parser/labels/plain_local_label_dollar.txt @@ -0,0 +1,5 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kLocalLabelImpl(LOCAL_LABEL) + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('local_label$') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file