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 6f2d3d6..3913bf2 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 @@ -192,23 +192,22 @@ public class _M68kLexer implements FlexLexer { private static final String ZZ_ACTION_PACKED_0 = "\13\0\1\1\2\2\1\3\1\4\1\1\1\5\2\6" + "\1\2\1\7\1\10\1\1\1\11\2\12\1\7\1\10" + - "\1\13\1\14\1\1\1\15\1\16\5\15\6\1\1\17" + + "\1\13\1\14\1\15\1\1\1\16\1\17\5\16\6\1" + "\1\20\1\21\1\22\1\23\1\24\1\25\1\26\1\27" + - "\1\30\2\15\1\31\1\32\1\31\1\33\1\34\1\35" + + "\1\30\1\31\2\16\1\32\1\33\1\32\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\42\1\50\1\1\1\51\1\1\1\52" + - "\1\53\1\54\6\1\1\55\1\56\1\57\1\60\1\61" + - "\1\62\1\63\1\64\1\65\1\66\1\67\1\70\1\71" + - "\1\72\1\73\1\66\1\74\1\75\1\12\4\75\1\0" + - "\1\4\1\76\2\77\1\4\3\0\1\100\1\101\1\102" + - "\1\103\1\104\1\105\1\106\1\15\1\107\1\110\1\111" + - "\2\0\1\112\4\0\2\15\1\32\1\100\1\101\1\102" + - "\1\113\1\114\1\115\1\116\1\117\1\120\1\121\2\0" + - "\1\122\1\123\1\124\2\0\1\125\4\0\1\57\1\126" + - "\1\127\1\130\1\131\1\132\1\133\1\134\1\0\1\75" + - "\1\0\1\75\1\0\1\75\1\0\1\75\2\0\1\4" + - "\1\77\1\7\1\135\1\136\1\137\1\140\1\0\1\75" + - "\6\0"; + "\1\46\1\47\1\50\1\43\1\51\2\1\1\52\1\53" + + "\1\54\6\1\1\55\1\56\1\57\1\60\1\61\1\62" + + "\1\63\1\64\1\65\1\66\1\67\1\70\1\71\1\72" + + "\1\73\1\66\1\74\1\75\1\12\4\75\1\0\1\4" + + "\1\76\2\77\1\4\3\0\1\100\1\101\1\102\1\103" + + "\1\104\1\105\1\106\1\16\1\107\1\110\1\111\2\0" + + "\1\112\4\0\2\16\1\33\1\100\1\101\1\102\1\113" + + "\1\114\1\115\1\116\1\117\1\120\1\121\2\0\1\122" + + "\1\123\1\124\2\0\1\125\4\0\1\57\1\126\1\127" + + "\1\130\1\131\1\132\1\133\1\134\1\0\1\75\1\0" + + "\1\75\1\0\1\75\1\0\1\75\2\0\1\4\1\77" + + "\1\7\1\135\1\136\1\137\1\140\1\0\1\75\6\0"; private static int[] zzUnpackAction() { int[] result = new int[195]; @@ -239,13 +238,13 @@ public class _M68kLexer implements FlexLexer { "\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\u027e\0\u02b8\0\u02f2\0\u032c" + "\0\u0366\0\u03a0\0\u027e\0\u03da\0\u0414\0\u044e\0\u0488\0\u04c2" + - "\0\u04fc\0\u027e\0\u0536\0\u0570\0\u05aa\0\u05e4\0\u061e\0\u0658" + - "\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\u027e\0\u027e\0\u027e" + - "\0\u027e\0\u027e\0\u027e\0\u027e\0\u027e\0\u027e\0\u027e\0\u0984" + - "\0\u09be\0\u09f8\0\u0a32\0\u0a6c\0\u027e\0\u0aa6\0\u0ae0\0\u027e" + - "\0\u027e\0\u027e\0\u027e\0\u0b1a\0\u027e\0\u027e\0\u027e\0\u027e" + - "\0\u0b54\0\u0b8e\0\u0bc8\0\u0c02\0\u027e\0\u0c3c\0\u027e\0\u0c76" + + "\0\u04fc\0\u027e\0\u0536\0\u0570\0\u05aa\0\u027e\0\u05e4\0\u061e" + + "\0\u0658\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\u027e\0\u027e" + + "\0\u027e\0\u027e\0\u027e\0\u027e\0\u027e\0\u027e\0\u027e\0\u027e" + + "\0\u0984\0\u09be\0\u09f8\0\u0a32\0\u0a6c\0\u027e\0\u0aa6\0\u0ae0" + + "\0\u027e\0\u027e\0\u027e\0\u027e\0\u0b1a\0\u027e\0\u027e\0\u027e" + + "\0\u027e\0\u0b54\0\u0b8e\0\u0bc8\0\u0c02\0\u0c3c\0\u027e\0\u0c76" + "\0\u0cb0\0\u0cea\0\u0d24\0\u0d5e\0\u0d98\0\u0dd2\0\u0e0c\0\u027e" + "\0\u027e\0\u0e46\0\u027e\0\u0e80\0\u0eba\0\u027e\0\u027e\0\u027e" + "\0\u0ef4\0\u027e\0\u027e\0\u027e\0\u027e\0\u0f2e\0\u0f68\0\u0fa2" + @@ -292,113 +291,113 @@ public class _M68kLexer implements FlexLexer { "\2\23\1\24\1\25\1\26\1\14\4\26\1\27\2\14" + "\4\26\1\14\1\30\2\14\4\26\2\14\3\26\1\14" + "\1\26\7\14\2\31\7\14\1\31\3\14\5\26\1\14" + - "\2\32\1\33\1\25\1\34\1\14\4\34\1\35\2\14" + - "\4\34\4\14\4\34\2\14\3\34\1\14\1\34\7\14" + - "\1\36\14\14\5\34\1\14\2\32\1\33\1\37\16\14" + - "\1\40\24\14\1\36\22\14\2\32\1\33\1\25\1\41" + - "\1\42\1\43\1\44\1\45\2\46\2\14\2\46\1\47" + - "\1\46\1\14\1\46\1\50\1\14\1\43\3\46\1\51" + - "\1\42\1\41\1\45\1\46\1\42\1\46\1\52\1\53" + - "\1\54\1\55\2\14\1\56\1\36\1\57\1\60\1\61" + - "\1\62\1\63\1\64\1\65\1\66\1\67\3\14\2\70" + - "\1\46\1\71\1\46\1\14\2\32\1\33\1\25\1\72" + - "\1\14\5\72\2\14\4\72\1\73\1\74\2\14\4\72" + - "\1\75\1\14\3\72\1\14\1\72\4\14\1\76\1\77" + - "\1\100\1\36\1\14\1\101\1\102\1\103\1\104\1\105" + - "\1\106\1\107\1\110\1\111\1\112\1\113\5\72\1\14" + - "\2\32\1\33\1\25\2\14\1\114\5\14\1\115\1\116" + - "\3\14\1\117\3\14\1\114\11\14\1\116\7\14\1\36" + - "\22\14\2\32\1\33\1\25\1\120\1\121\5\120\2\14" + - "\4\120\1\14\1\120\1\122\1\14\4\120\1\123\1\121" + - "\3\120\1\121\1\120\1\124\1\125\1\126\1\127\2\14" + - "\1\56\1\36\1\14\1\60\1\61\1\130\1\63\1\64" + - "\1\65\1\66\1\131\3\14\5\120\1\14\2\32\1\33" + - "\1\25\15\14\1\132\7\14\1\133\12\14\1\134\1\135" + - "\1\136\1\36\1\14\1\137\1\140\1\103\1\141\1\142" + - "\1\143\1\144\1\145\1\146\1\147\1\150\5\14\1\151" + - "\1\152\1\32\1\33\1\25\35\151\1\153\1\154\1\155" + - "\1\156\1\151\1\56\1\36\21\151\1\14\2\32\1\33" + - "\66\14\74\0\1\15\73\0\1\17\71\0\1\157\10\20" + - "\1\160\4\20\1\161\1\0\1\162\1\0\4\20\1\0" + - "\6\20\24\0\5\20\5\0\1\163\1\0\5\163\2\0" + - "\4\163\4\0\4\163\2\0\3\163\1\0\1\163\24\0" + - "\5\163\1\22\3\0\66\22\2\0\1\23\73\0\1\25" + - "\72\0\1\26\1\27\4\26\2\27\1\164\4\26\1\0" + - "\1\165\1\166\1\0\4\26\1\0\1\27\3\26\1\27" + - "\1\26\24\0\5\26\5\0\10\27\1\164\4\27\2\0" + - "\1\166\1\0\4\27\1\0\6\27\24\0\5\27\5\0" + - "\1\167\1\0\5\167\2\0\4\167\4\0\4\167\2\0" + - "\3\167\1\0\1\167\24\0\5\167\1\31\3\0\66\31" + - "\2\0\1\32\74\0\1\34\1\35\4\34\2\35\1\0" + - "\4\34\1\0\1\165\2\0\4\34\1\0\1\35\3\34" + - "\1\35\1\34\24\0\5\34\5\0\10\35\1\0\4\35" + - "\4\0\4\35\1\0\6\35\24\0\5\35\1\36\3\0" + - "\66\36\4\0\1\37\113\0\2\170\1\171\1\172\45\0" + - "\1\46\1\173\6\46\1\0\4\46\2\0\1\46\1\0" + - "\4\46\1\0\1\173\5\46\24\0\5\46\6\0\1\42" + - "\24\0\1\42\3\0\1\42\37\0\3\46\1\173\4\46" + - "\1\0\4\46\2\0\1\46\1\0\4\46\1\0\6\46" + - "\24\0\2\46\1\174\2\46\5\0\10\46\1\0\4\46" + - "\2\0\1\46\1\0\4\46\1\0\6\46\24\0\2\175" + - "\3\46\5\0\1\46\1\176\6\46\1\0\4\46\2\0" + - "\1\46\1\0\4\46\1\0\1\176\5\46\24\0\5\46" + - "\5\0\10\46\1\0\4\46\2\0\1\46\1\0\4\46" + - "\1\0\6\46\24\0\5\46\5\0\2\46\1\177\5\46" + - "\1\0\4\46\2\0\1\46\1\0\1\177\3\46\1\0" + - "\6\46\24\0\5\46\6\0\1\200\20\0\1\200\3\0" + - "\6\200\25\0\1\200\36\0\1\201\44\0\1\202\24\0" + - "\1\202\36\0\2\203\2\0\21\203\1\204\14\203\1\205" + - "\27\203\2\206\2\0\21\206\1\207\15\206\1\205\26\206" + - "\2\210\2\0\21\210\1\211\16\210\1\205\25\210\5\0" + - "\10\46\1\0\4\46\2\0\1\46\1\0\4\46\1\0" + - "\6\46\24\0\2\212\3\46\5\0\10\46\1\0\4\46" + - "\2\0\1\46\1\0\1\46\1\213\2\46\1\0\6\46" + - "\24\0\4\46\1\213\5\0\10\72\1\0\4\72\2\0" + - "\1\72\1\0\4\72\1\0\6\72\24\0\5\72\22\0" + - "\1\214\54\0\10\72\1\0\4\72\2\0\1\72\1\0" + - "\2\215\1\216\1\217\1\0\6\72\24\0\5\72\22\0" + - "\1\220\22\0\1\221\1\222\45\0\1\223\23\0\1\224" + - "\45\0\1\222\131\0\1\225\72\0\1\226\72\0\1\75" + - "\23\0\1\227\21\0\1\227\50\0\1\230\57\0\10\120" + - "\1\0\4\120\1\0\7\120\1\0\6\120\24\0\5\120" + - "\6\0\1\121\24\0\1\121\3\0\1\121\40\0\1\231" + - "\20\0\1\231\3\0\6\231\25\0\1\231\36\0\1\232" + - "\44\0\1\233\24\0\1\233\36\0\2\234\2\0\21\234" + - "\1\235\14\234\1\236\27\234\2\237\2\0\21\237\1\240" + - "\15\237\1\236\26\237\2\241\2\0\21\241\1\242\16\241" + - "\1\236\25\241\22\0\1\243\71\0\1\244\22\0\1\245" + - "\1\246\45\0\1\247\23\0\1\250\45\0\1\246\131\0" + - "\1\251\72\0\1\252\72\0\1\133\5\0\2\151\3\0" + - "\42\151\2\0\21\151\2\153\2\0\1\253\20\153\1\254" + - "\14\153\1\151\4\153\2\253\21\153\2\154\2\0\1\255" + - "\20\154\1\256\15\154\1\151\3\154\2\255\21\154\2\155" + - "\2\0\1\257\20\155\1\260\16\155\1\151\2\155\2\257" + - "\21\155\2\156\2\0\1\261\20\156\1\262\20\156\1\151" + - "\2\261\21\156\4\0\1\157\2\0\1\263\6\0\1\264" + - "\3\0\1\161\3\0\1\263\11\0\1\264\35\0\1\157" + - "\10\0\1\265\4\0\1\161\53\0\1\161\102\0\1\266" + - "\61\0\10\163\1\266\4\163\4\0\4\163\1\0\6\163" + - "\24\0\5\163\15\0\1\265\54\0\1\267\3\0\66\267" + - "\5\0\10\167\1\266\4\167\4\0\4\167\1\0\6\167" + - "\24\0\5\167\5\0\3\46\1\270\4\46\1\0\4\46" + - "\2\0\1\46\1\0\4\46\1\0\6\46\24\0\5\46" + - "\1\203\3\0\66\203\1\206\3\0\66\206\1\210\3\0" + - "\66\210\5\0\10\46\1\0\4\46\2\0\1\46\1\0" + - "\4\46\1\0\6\46\24\0\2\46\1\271\2\46\5\0" + - "\10\46\1\0\4\46\2\0\1\46\1\0\4\46\1\0" + - "\6\46\24\0\2\46\1\272\2\46\21\0\1\273\70\0" + - "\1\273\51\0\1\234\3\0\66\234\1\237\3\0\66\237" + - "\1\241\3\0\66\241\2\253\2\0\21\253\1\274\14\253" + - "\1\275\27\253\1\153\1\151\2\0\1\253\42\153\2\253" + - "\21\153\2\255\2\0\21\255\1\276\15\255\1\275\26\255" + - "\1\154\1\151\2\0\1\255\42\154\2\255\21\154\2\257" + - "\2\0\21\257\1\277\16\257\1\275\25\257\1\155\1\151" + - "\2\0\1\257\42\155\2\257\21\155\2\261\2\0\21\261" + - "\1\300\20\261\1\275\23\261\1\156\1\151\2\0\1\261" + - "\42\156\2\261\21\156\16\0\1\301\21\0\1\301\50\0" + - "\1\302\52\0\1\253\3\0\66\253\1\255\3\0\66\255" + - "\1\257\3\0\66\257\1\261\3\0\66\261\21\0\1\303" + - "\70\0\1\303\51\0"; + "\2\32\1\33\1\25\1\34\1\14\4\34\1\35\1\14" + + "\1\36\4\34\4\14\4\34\2\14\3\34\1\14\1\34" + + "\7\14\1\37\14\14\5\34\1\14\2\32\1\33\1\40" + + "\16\14\1\41\24\14\1\37\22\14\2\32\1\33\1\25" + + "\1\42\1\43\1\44\1\45\1\46\2\47\2\14\2\47" + + "\1\50\1\47\1\14\1\47\1\51\1\14\1\44\3\47" + + "\1\52\1\43\1\42\1\46\1\47\1\43\1\47\1\53" + + "\1\54\1\55\1\56\2\14\1\57\1\37\1\60\1\61" + + "\1\62\1\63\1\64\1\65\1\66\1\67\1\70\3\14" + + "\2\71\1\47\1\72\1\47\1\14\2\32\1\33\1\25" + + "\1\73\1\14\5\73\2\14\4\73\1\74\1\75\2\14" + + "\4\73\1\76\1\14\3\73\1\14\1\73\4\14\1\77" + + "\1\100\1\101\1\37\1\14\1\102\1\103\1\104\1\105" + + "\1\106\1\107\1\110\1\111\1\112\1\113\1\114\5\73" + + "\1\14\2\32\1\33\1\25\2\14\1\115\5\14\1\36" + + "\1\116\3\14\1\117\3\14\1\115\11\14\1\116\7\14" + + "\1\37\22\14\2\32\1\33\1\25\1\120\1\121\5\120" + + "\2\14\4\120\1\14\1\120\1\122\1\14\4\120\1\123" + + "\1\121\3\120\1\121\1\120\1\124\1\125\1\126\1\127" + + "\2\14\1\57\1\37\1\14\1\61\1\62\1\130\1\64" + + "\1\65\1\66\1\67\1\131\3\14\5\120\1\14\2\32" + + "\1\33\1\25\15\14\1\132\7\14\1\133\12\14\1\134" + + "\1\135\1\136\1\37\1\14\1\137\1\140\1\104\1\141" + + "\1\142\1\143\1\144\1\145\1\146\1\147\1\150\5\14" + + "\1\151\1\152\1\32\1\33\1\25\35\151\1\153\1\154" + + "\1\155\1\156\1\151\1\57\1\37\21\151\1\14\2\32" + + "\1\33\66\14\74\0\1\15\73\0\1\17\71\0\1\157" + + "\10\20\1\160\4\20\1\161\1\0\1\162\1\0\4\20" + + "\1\0\6\20\24\0\5\20\5\0\1\163\1\0\5\163" + + "\2\0\4\163\4\0\4\163\2\0\3\163\1\0\1\163" + + "\24\0\5\163\1\22\3\0\66\22\2\0\1\23\73\0" + + "\1\25\72\0\1\26\1\27\4\26\2\27\1\164\4\26" + + "\1\0\1\165\1\166\1\0\4\26\1\0\1\27\3\26" + + "\1\27\1\26\24\0\5\26\5\0\10\27\1\164\4\27" + + "\2\0\1\166\1\0\4\27\1\0\6\27\24\0\5\27" + + "\5\0\1\167\1\0\5\167\2\0\4\167\4\0\4\167" + + "\2\0\3\167\1\0\1\167\24\0\5\167\1\31\3\0" + + "\66\31\2\0\1\32\74\0\1\34\1\35\4\34\2\35" + + "\1\0\4\34\1\0\1\165\2\0\4\34\1\0\1\35" + + "\3\34\1\35\1\34\24\0\5\34\5\0\10\35\1\0" + + "\4\35\4\0\4\35\1\0\6\35\24\0\5\35\1\37" + + "\3\0\66\37\4\0\1\40\113\0\2\170\1\171\1\172" + + "\45\0\1\47\1\173\6\47\1\0\4\47\2\0\1\47" + + "\1\0\4\47\1\0\1\173\5\47\24\0\5\47\6\0" + + "\1\43\24\0\1\43\3\0\1\43\37\0\3\47\1\173" + + "\4\47\1\0\4\47\2\0\1\47\1\0\4\47\1\0" + + "\6\47\24\0\2\47\1\174\2\47\5\0\10\47\1\0" + + "\4\47\2\0\1\47\1\0\4\47\1\0\6\47\24\0" + + "\2\175\3\47\5\0\1\47\1\176\6\47\1\0\4\47" + + "\2\0\1\47\1\0\4\47\1\0\1\176\5\47\24\0" + + "\5\47\5\0\10\47\1\0\4\47\2\0\1\47\1\0" + + "\4\47\1\0\6\47\24\0\5\47\5\0\2\47\1\177" + + "\5\47\1\0\4\47\2\0\1\47\1\0\1\177\3\47" + + "\1\0\6\47\24\0\5\47\6\0\1\200\20\0\1\200" + + "\3\0\6\200\25\0\1\200\36\0\1\201\44\0\1\202" + + "\24\0\1\202\36\0\2\203\2\0\21\203\1\204\14\203" + + "\1\205\27\203\2\206\2\0\21\206\1\207\15\206\1\205" + + "\26\206\2\210\2\0\21\210\1\211\16\210\1\205\25\210" + + "\5\0\10\47\1\0\4\47\2\0\1\47\1\0\4\47" + + "\1\0\6\47\24\0\2\212\3\47\5\0\10\47\1\0" + + "\4\47\2\0\1\47\1\0\1\47\1\213\2\47\1\0" + + "\6\47\24\0\4\47\1\213\5\0\10\73\1\0\4\73" + + "\2\0\1\73\1\0\4\73\1\0\6\73\24\0\5\73" + + "\22\0\1\214\54\0\10\73\1\0\4\73\2\0\1\73" + + "\1\0\2\215\1\216\1\217\1\0\6\73\24\0\5\73" + + "\22\0\1\220\22\0\1\221\1\222\45\0\1\223\23\0" + + "\1\224\45\0\1\222\131\0\1\225\72\0\1\226\72\0" + + "\1\76\23\0\1\227\21\0\1\227\50\0\1\230\57\0" + + "\10\120\1\0\4\120\1\0\7\120\1\0\6\120\24\0" + + "\5\120\6\0\1\121\24\0\1\121\3\0\1\121\40\0" + + "\1\231\20\0\1\231\3\0\6\231\25\0\1\231\36\0" + + "\1\232\44\0\1\233\24\0\1\233\36\0\2\234\2\0" + + "\21\234\1\235\14\234\1\236\27\234\2\237\2\0\21\237" + + "\1\240\15\237\1\236\26\237\2\241\2\0\21\241\1\242" + + "\16\241\1\236\25\241\22\0\1\243\71\0\1\244\22\0" + + "\1\245\1\246\45\0\1\247\23\0\1\250\45\0\1\246" + + "\131\0\1\251\72\0\1\252\72\0\1\133\5\0\2\151" + + "\3\0\42\151\2\0\21\151\2\153\2\0\1\253\20\153" + + "\1\254\14\153\1\151\4\153\2\253\21\153\2\154\2\0" + + "\1\255\20\154\1\256\15\154\1\151\3\154\2\255\21\154" + + "\2\155\2\0\1\257\20\155\1\260\16\155\1\151\2\155" + + "\2\257\21\155\2\156\2\0\1\261\20\156\1\262\20\156" + + "\1\151\2\261\21\156\4\0\1\157\2\0\1\263\6\0" + + "\1\264\3\0\1\161\3\0\1\263\11\0\1\264\35\0" + + "\1\157\10\0\1\265\4\0\1\161\53\0\1\161\102\0" + + "\1\266\61\0\10\163\1\266\4\163\4\0\4\163\1\0" + + "\6\163\24\0\5\163\15\0\1\265\54\0\1\267\3\0" + + "\66\267\5\0\10\167\1\266\4\167\4\0\4\167\1\0" + + "\6\167\24\0\5\167\5\0\3\47\1\270\4\47\1\0" + + "\4\47\2\0\1\47\1\0\4\47\1\0\6\47\24\0" + + "\5\47\1\203\3\0\66\203\1\206\3\0\66\206\1\210" + + "\3\0\66\210\5\0\10\47\1\0\4\47\2\0\1\47" + + "\1\0\4\47\1\0\6\47\24\0\2\47\1\271\2\47" + + "\5\0\10\47\1\0\4\47\2\0\1\47\1\0\4\47" + + "\1\0\6\47\24\0\2\47\1\272\2\47\21\0\1\273" + + "\70\0\1\273\51\0\1\234\3\0\66\234\1\237\3\0" + + "\66\237\1\241\3\0\66\241\2\253\2\0\21\253\1\274" + + "\14\253\1\275\27\253\1\153\1\151\2\0\1\253\42\153" + + "\2\253\21\153\2\255\2\0\21\255\1\276\15\255\1\275" + + "\26\255\1\154\1\151\2\0\1\255\42\154\2\255\21\154" + + "\2\257\2\0\21\257\1\277\16\257\1\275\25\257\1\155" + + "\1\151\2\0\1\257\42\155\2\257\21\155\2\261\2\0" + + "\21\261\1\300\20\261\1\275\23\261\1\156\1\151\2\0" + + "\1\261\42\156\2\261\21\156\16\0\1\301\21\0\1\301" + + "\50\0\1\302\52\0\1\253\3\0\66\253\1\255\3\0" + + "\66\255\1\257\3\0\66\257\1\261\3\0\66\261\21\0" + + "\1\303\70\0\1\303\51\0"; private static int[] zzUnpackTrans() { int[] result = new int[6380]; @@ -439,9 +438,9 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\13\0\2\11\5\1\1\11\6\1\1\11\23\1\12\11" + - "\5\1\1\11\2\1\4\11\1\1\4\11\4\1\1\11" + - "\1\1\1\11\10\1\2\11\1\1\1\11\2\1\3\11" + + "\13\0\2\11\5\1\1\11\6\1\1\11\3\1\1\11" + + "\20\1\12\11\5\1\1\11\2\1\4\11\1\1\4\11" + + "\5\1\1\11\10\1\2\11\1\1\1\11\2\1\3\11" + "\1\1\4\11\11\1\1\0\5\1\3\0\3\11\10\1" + "\2\0\1\11\4\0\2\1\1\11\3\1\7\11\2\0" + "\3\1\2\0\1\11\4\0\10\11\1\0\1\1\1\0" + @@ -789,6 +788,7 @@ public class _M68kLexer implements FlexLexer { break; case 4: { yybegin(INSTRPART); + yypushback(pushbackLabelColons(yytext())); return GLOBAL_LABEL_DEF; } // fall through @@ -853,207 +853,207 @@ public class _M68kLexer implements FlexLexer { case 106: break; case 11: { - yybegin(WAITEOL); - return COMMENT; + return COLON; } // fall through case 107: break; case 12: { - yybegin(ASMOPS); - return WHITE_SPACE; + yybegin(WAITEOL); + return COMMENT; } // fall through case 108: break; case 13: { - yybegin(ASMOPS_OP); - return SYMBOL; + yybegin(ASMOPS); + return WHITE_SPACE; } // fall through case 109: break; case 14: { yybegin(ASMOPS_OP); - return DECIMAL; + return SYMBOL; } // fall through case 110: break; case 15: { - return SEPARATOR; + yybegin(ASMOPS_OP); + return DECIMAL; } // fall through case 111: break; case 16: { - return HASH; + return SEPARATOR; } // fall through case 112: break; case 17: { - return OP_BITWISE_XOR; + return HASH; } // fall through case 113: break; case 18: { - return ROUND_L; + return OP_BITWISE_XOR; } // fall through case 114: break; case 19: { - yybegin(ASMOPS_OP); - return ROUND_R; + return ROUND_L; } // fall through case 115: break; case 20: { - return OP_UNARY_NOT; + yybegin(ASMOPS_OP); + return ROUND_R; } // fall through case 116: break; case 21: { - return OP_UNARY_COMPL; + return OP_UNARY_NOT; } // fall through case 117: break; case 22: { - return OP_PLUS; + return OP_UNARY_COMPL; } // fall through case 118: break; case 23: { - return OP_MINUS; + return OP_PLUS; } // fall through case 119: break; case 24: { - yybegin(ASMOPS_OP); - return CURRENT_PC_SYMBOL; + return OP_MINUS; } // fall through case 120: break; case 25: { - return SYMBOL; + yybegin(ASMOPS_OP); + return CURRENT_PC_SYMBOL; } // fall through case 121: break; case 26: { - yybegin(ASMOPS); - return OP_CMP_EQ; + return SYMBOL; } // fall through case 122: break; case 27: { yybegin(ASMOPS); - return OP_AR_MOD; + return OP_CMP_EQ; } // fall through case 123: break; case 28: { yybegin(ASMOPS); - return OP_CMP_LT; + return OP_AR_MOD; } // fall through case 124: break; case 29: { yybegin(ASMOPS); - return OP_CMP_GT; + return OP_CMP_LT; } // fall through case 125: break; case 30: { yybegin(ASMOPS); - return SEPARATOR; + return OP_CMP_GT; } // fall through case 126: break; case 31: { yybegin(ASMOPS); - return OP_BITWISE_XOR; + return SEPARATOR; } // fall through case 127: break; case 32: { yybegin(ASMOPS); - return ROUND_L; + return OP_BITWISE_XOR; } // fall through case 128: break; case 33: { - return ROUND_R; + yybegin(ASMOPS); + return ROUND_L; } // fall through case 129: break; case 34: { - yybegin(ASMOPS); - return OP_BITWISE_OR; + return ROUND_R; } // fall through case 130: break; case 35: { yybegin(ASMOPS); - return OP_UNARY_COMPL; + return OP_BITWISE_OR; } // fall through case 131: break; case 36: { yybegin(ASMOPS); - return OP_PLUS; + return OP_UNARY_COMPL; } // fall through case 132: break; case 37: { yybegin(ASMOPS); - return OP_MINUS; + return OP_PLUS; } // fall through case 133: break; case 38: { yybegin(ASMOPS); - return OP_AR_MUL; + return OP_MINUS; } // fall through case 134: break; case 39: { yybegin(ASMOPS); - return OP_BITWISE_AND; + return OP_AR_MUL; } // fall through case 135: break; case 40: { yybegin(ASMOPS); - return OP_AR_DIV; + return OP_BITWISE_AND; } // fall through case 136: break; case 41: { - return COLON; + yybegin(ASMOPS); + return OP_AR_DIV; } // fall through case 137: @@ -1207,6 +1207,7 @@ public class _M68kLexer implements FlexLexer { break; case 63: { yybegin(INSTRPART); + yypushback(pushbackLabelColons(yytext())); return LOCAL_LABEL_DEF; } // fall through 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 682625e..750fe5c 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 @@ -87,9 +87,9 @@ public class M68kParser implements PsiParser, LightPsiParser { // AREG public static boolean AddressRegister(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "AddressRegister")) return false; - if (!nextTokenIs(b, "", AREG)) return false; + if (!nextTokenIs(b, "
", AREG)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER, ""); + Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER, "
"); r = consumeToken(b, AREG); exit_section_(b, l, m, r, false, null); return r; @@ -288,9 +288,9 @@ public class M68kParser implements PsiParser, LightPsiParser { // OPSIZE_W|OPSIZE_L public static boolean AddressSize(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "AddressSize")) return false; - if (!nextTokenIs(b, "
", OPSIZE_L, OPSIZE_W)) return false; + if (!nextTokenIs(b, "<.w|.l>", OPSIZE_L, OPSIZE_W)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, ADDRESS_SIZE, "
"); + Marker m = enter_section_(b, l, _NONE_, ADDRESS_SIZE, "<.w|.l>"); r = consumeToken(b, OPSIZE_W); if (!r) r = consumeToken(b, OPSIZE_L); exit_section_(b, l, m, r, false, null); @@ -445,9 +445,9 @@ public class M68kParser implements PsiParser, LightPsiParser { // DataRegister | AddressRegister static boolean DataOrAddressRegister(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "DataOrAddressRegister")) return false; - if (!nextTokenIs(b, "", AREG, DREG)) return false; + if (!nextTokenIs(b, "", AREG, DREG)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, null, ""); + Marker m = enter_section_(b, l, _NONE_, null, ""); r = DataRegister(b, l + 1); if (!r) r = AddressRegister(b, l + 1); exit_section_(b, l, m, r, false, null); @@ -458,9 +458,9 @@ public class M68kParser implements PsiParser, LightPsiParser { // DREG public static boolean DataRegister(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "DataRegister")) return false; - if (!nextTokenIs(b, "", DREG)) return false; + if (!nextTokenIs(b, "", DREG)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, DATA_REGISTER, ""); + Marker m = enter_section_(b, l, _NONE_, DATA_REGISTER, ""); r = consumeToken(b, DREG); exit_section_(b, l, m, r, false, null); return r; @@ -502,9 +502,9 @@ public class M68kParser implements PsiParser, LightPsiParser { // OPSIZE_W|OPSIZE_L public static boolean DataWidth(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "DataWidth")) return false; - if (!nextTokenIs(b, "", OPSIZE_L, OPSIZE_W)) return false; + if (!nextTokenIs(b, "<.w|.l>", OPSIZE_L, OPSIZE_W)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, DATA_WIDTH, ""); + Marker m = enter_section_(b, l, _NONE_, DATA_WIDTH, "<.w|.l>"); r = consumeToken(b, OPSIZE_W); if (!r) r = consumeToken(b, OPSIZE_L); exit_section_(b, l, m, r, false, null); @@ -512,27 +512,39 @@ public class M68kParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // GLOBAL_LABEL_DEF + // GLOBAL_LABEL_DEF COLON* public static boolean GlobalLabel(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "GlobalLabel")) return false; - if (!nextTokenIs(b, GLOBAL_LABEL_DEF)) return false; + if (!nextTokenIs(b, "", GLOBAL_LABEL_DEF)) return false; boolean r; - Marker m = enter_section_(b); + Marker m = enter_section_(b, l, _NONE_, GLOBAL_LABEL, ""); r = consumeToken(b, GLOBAL_LABEL_DEF); - exit_section_(b, m, GLOBAL_LABEL, r); + r = r && GlobalLabel_1(b, l + 1); + exit_section_(b, l, m, r, false, null); return r; } + // COLON* + private static boolean GlobalLabel_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "GlobalLabel_1")) return false; + while (true) { + int c = current_position_(b); + if (!consumeToken(b, COLON)) break; + if (!empty_element_parsed_guard_(b, "GlobalLabel_1", c)) break; + } + return true; + } + /* ********************************************************** */ // HASH expr public static boolean ImmediateData(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ImmediateData")) return false; - if (!nextTokenIs(b, HASH)) return false; + if (!nextTokenIs(b, "", HASH)) return false; boolean r; - Marker m = enter_section_(b); + Marker m = enter_section_(b, l, _NONE_, IMMEDIATE_DATA, ""); r = consumeToken(b, HASH); r = r && expr(b, l + 1, -1); - exit_section_(b, m, IMMEDIATE_DATA, r); + exit_section_(b, l, m, r, false, null); return r; } @@ -597,17 +609,25 @@ public class M68kParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // LOCAL_LABEL_DEF + // LOCAL_LABEL_DEF COLON? public static boolean LocalLabel(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "LocalLabel")) return false; - if (!nextTokenIs(b, LOCAL_LABEL_DEF)) return false; + if (!nextTokenIs(b, "", LOCAL_LABEL_DEF)) return false; boolean r; - Marker m = enter_section_(b); + Marker m = enter_section_(b, l, _NONE_, LOCAL_LABEL, ""); r = consumeToken(b, LOCAL_LABEL_DEF); - exit_section_(b, m, LOCAL_LABEL, r); + r = r && LocalLabel_1(b, l + 1); + exit_section_(b, l, m, r, false, null); return r; } + // COLON? + private static boolean LocalLabel_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "LocalLabel_1")) return false; + consumeToken(b, COLON); + return true; + } + /* ********************************************************** */ // line* static boolean M68kFile(PsiBuilder b, int l) { @@ -645,7 +665,7 @@ public class M68kParser implements PsiParser, LightPsiParser { public static boolean OperandSize(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "OperandSize")) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, OPERAND_SIZE, ""); + Marker m = enter_section_(b, l, _NONE_, OPERAND_SIZE, "<.s|.b|.w|.l>"); r = consumeToken(b, OPSIZE_BS); if (!r) r = consumeToken(b, OPSIZE_W); if (!r) r = consumeToken(b, OPSIZE_L); @@ -976,7 +996,7 @@ public class M68kParser implements PsiParser, LightPsiParser { public static boolean SpecialRegister(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "SpecialRegister")) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, SPECIAL_REGISTER, ""); + Marker m = enter_section_(b, l, _NONE_, SPECIAL_REGISTER, ""); r = consumeToken(b, REG_CCR); if (!r) r = consumeToken(b, REG_SR); if (!r) r = consumeToken(b, REG_USP); @@ -1062,9 +1082,9 @@ public class M68kParser implements PsiParser, LightPsiParser { // 11: ATOM(ref_expr) ATOM(literal_expr) PREFIX(paren_expr) public static boolean expr(PsiBuilder b, int l, int g) { if (!recursion_guard_(b, l, "expr")) return false; - addVariant(b, ""); + addVariant(b, ""); boolean r, p; - Marker m = enter_section_(b, l, _NONE_, ""); + Marker m = enter_section_(b, l, _NONE_, ""); r = unary_plus_expr(b, l + 1); if (!r) r = unary_minus_expr(b, l + 1); if (!r) r = unary_not_expr(b, l + 1); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabel.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabel.java index d8b4380..0b57829 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabel.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabel.java @@ -1,6 +1,19 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -public interface M68kGlobalLabel extends M68kLabel { +import com.intellij.psi.PsiElement; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public interface M68kGlobalLabel extends M68kLabel, M68kNamedElement { + + @Nullable + String getName(); + + @NotNull + PsiElement setName(@NotNull String name); + + @NotNull + PsiElement getNameIdentifier(); } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLiteralExpr.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLiteralExpr.java index 4a45d3a..052ab36 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLiteralExpr.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLiteralExpr.java @@ -1,6 +1,8 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -public interface M68kLiteralExpr extends M68kExpr { +import com.intellij.psi.PsiLiteralValue; + +public interface M68kLiteralExpr extends M68kExpr, PsiLiteralValue { } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLocalLabel.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLocalLabel.java index 84ab8d4..b620009 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLocalLabel.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kLocalLabel.java @@ -1,6 +1,19 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi; -public interface M68kLocalLabel extends M68kLabel { +import com.intellij.psi.PsiElement; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public interface M68kLocalLabel extends M68kLabel, M68kNamedElement { + + @Nullable + String getName(); + + @NotNull + PsiElement setName(@NotNull String name); + + @NotNull + PsiElement getNameIdentifier(); } 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 4cc698f..ee44a0b 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 @@ -81,6 +81,7 @@ public class M68kVisitor extends PsiElementVisitor { public void visitGlobalLabel(@NotNull M68kGlobalLabel o) { visitLabel(o); + // visitNamedElement(o); } public void visitImmediateData(@NotNull M68kImmediateData o) { @@ -93,6 +94,7 @@ public class M68kVisitor extends PsiElementVisitor { public void visitLocalLabel(@NotNull M68kLocalLabel o) { visitLabel(o); + // visitNamedElement(o); } public void visitMacroCall(@NotNull M68kMacroCall o) { @@ -217,6 +219,7 @@ public class M68kVisitor extends PsiElementVisitor { public void visitLiteralExpr(@NotNull M68kLiteralExpr o) { visitExpr(o); + // visitPsiLiteralValue(o); } public void visitParenExpr(@NotNull M68kParenExpr o) { diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kGlobalLabelImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kGlobalLabelImpl.java index 831e9b6..ae4dcd4 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kGlobalLabelImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kGlobalLabelImpl.java @@ -2,18 +2,21 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabel; +import de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabelMixin; +import de.platon42.intellij.plugins.m68k.psi.M68kPsiImplUtil; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -public class M68kGlobalLabelImpl extends M68kLabelImpl implements M68kGlobalLabel { +public class M68kGlobalLabelImpl extends M68kGlobalLabelMixin implements M68kGlobalLabel { public M68kGlobalLabelImpl(@NotNull ASTNode node) { super(node); } - @Override public void accept(@NotNull M68kVisitor visitor) { visitor.visitGlobalLabel(this); } @@ -24,4 +27,22 @@ public class M68kGlobalLabelImpl extends M68kLabelImpl implements M68kGlobalLabe else super.accept(visitor); } + @Override + @Nullable + public String getName() { + return M68kPsiImplUtil.getName(this); + } + + @Override + @NotNull + public PsiElement setName(@NotNull String name) { + return M68kPsiImplUtil.setName(this, name); + } + + @Override + @NotNull + public PsiElement getNameIdentifier() { + return M68kPsiImplUtil.getNameIdentifier(this); + } + } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLiteralExprImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLiteralExprImpl.java index fdd2a3b..3ddd7f2 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLiteralExprImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLiteralExprImpl.java @@ -4,16 +4,16 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; import de.platon42.intellij.plugins.m68k.psi.M68kLiteralExpr; +import de.platon42.intellij.plugins.m68k.psi.M68kLiteralExprMixin; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; import org.jetbrains.annotations.NotNull; -public class M68kLiteralExprImpl extends M68kExprImpl implements M68kLiteralExpr { +public class M68kLiteralExprImpl extends M68kLiteralExprMixin implements M68kLiteralExpr { public M68kLiteralExprImpl(@NotNull ASTNode node) { super(node); } - @Override public void accept(@NotNull M68kVisitor visitor) { visitor.visitLiteralExpr(this); } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLocalLabelImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLocalLabelImpl.java index f8bb3dd..34ddda4 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLocalLabelImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kLocalLabelImpl.java @@ -2,18 +2,21 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; import de.platon42.intellij.plugins.m68k.psi.M68kLocalLabel; +import de.platon42.intellij.plugins.m68k.psi.M68kLocalLabelMixin; +import de.platon42.intellij.plugins.m68k.psi.M68kPsiImplUtil; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -public class M68kLocalLabelImpl extends M68kLabelImpl implements M68kLocalLabel { +public class M68kLocalLabelImpl extends M68kLocalLabelMixin implements M68kLocalLabel { public M68kLocalLabelImpl(@NotNull ASTNode node) { super(node); } - @Override public void accept(@NotNull M68kVisitor visitor) { visitor.visitLocalLabel(this); } @@ -24,4 +27,22 @@ public class M68kLocalLabelImpl extends M68kLabelImpl implements M68kLocalLabel else super.accept(visitor); } + @Override + @Nullable + public String getName() { + return M68kPsiImplUtil.getName(this); + } + + @Override + @NotNull + public PsiElement setName(@NotNull String name) { + return M68kPsiImplUtil.setName(this, name); + } + + @Override + @NotNull + public PsiElement getNameIdentifier() { + return M68kPsiImplUtil.getNameIdentifier(this); + } + } 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 7e0791e..a98a640 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 @@ -25,4 +25,9 @@ object LexerUtil { fun pushbackAssignment(text: CharSequence): Int { return text.length - text.indexOfAny(ASSIGNMENT_SEPARATORS) } + + @JvmStatic + fun pushbackLabelColons(text: CharSequence): Int { + return text.count { it == ':' } + } } \ 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 459902f..3f53bff 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 @@ -57,8 +57,8 @@ HASH_COMMENT=([#;*].*+) {WHITE_SPACE} { yybegin(NOSOL); return WHITE_SPACE; } {EOL} { return WHITE_SPACE; } {ASSIGNMENT} { yybegin(ASSIGNMENT); yypushback(pushbackAssignment(yytext())); return SYMBOLDEF; } - {LOCAL_LABEL} { yybegin(INSTRPART); return LOCAL_LABEL_DEF; } - {GLOBAL_LABEL} { yybegin(INSTRPART); return GLOBAL_LABEL_DEF; } + {LOCAL_LABEL} { yybegin(INSTRPART); yypushback(pushbackLabelColons(yytext())); return LOCAL_LABEL_DEF; } + {GLOBAL_LABEL} { yybegin(INSTRPART); yypushback(pushbackLabelColons(yytext())); return GLOBAL_LABEL_DEF; } {HASH_COMMENT} { return COMMENT; } } @@ -66,8 +66,8 @@ HASH_COMMENT=([#;*].*+) { {WHITE_SPACE} { return WHITE_SPACE; } {EOL} { yybegin(YYINITIAL); return WHITE_SPACE; } - {LOCAL_LABEL_WC} { yybegin(INSTRPART); return LOCAL_LABEL_DEF; } - {GLOBAL_LABEL_WC} { yybegin(INSTRPART); return GLOBAL_LABEL_DEF; } + {LOCAL_LABEL_WC} { yybegin(INSTRPART); yypushback(pushbackLabelColons(yytext())); return LOCAL_LABEL_DEF; } + {GLOBAL_LABEL_WC} { yybegin(INSTRPART); yypushback(pushbackLabelColons(yytext())); return GLOBAL_LABEL_DEF; } {DIRECTIVE_KEYWORD} { if(isAsmMnemonicWithSize(yytext())) { yybegin(ASMINSTR); yypushback(2); return MNEMONIC; } if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } @@ -84,6 +84,8 @@ HASH_COMMENT=([#;*].*+) {WHITE_SPACE} { return WHITE_SPACE; } {EOL} { yybegin(YYINITIAL); return EOL; } + ":" { return COLON; } + {DIRECTIVE_KEYWORD} { if(isAsmMnemonicWithSize(yytext())) { yybegin(ASMINSTR); yypushback(2); return MNEMONIC; } if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } 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 3ba6643..59119ee 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf +++ b/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf @@ -3,11 +3,11 @@ parserUtilClass="de.platon42.intellij.plugins.m68k.parser.M68kParserUtilBase" extends="com.intellij.extapi.psi.ASTWrapperPsiElement" - psiClassPrefix="M68k" psiImplClassSuffix="Impl" psiPackage="de.platon42.intellij.plugins.m68k.psi" psiImplPackage="de.platon42.intellij.plugins.m68k.psi.impl" + psiImplUtilClass="de.platon42.intellij.plugins.m68k.psi.M68kPsiImplUtil" // elementTypeFactory="de.platon42.intellij.plugins.m68k.parser.M68kParserDefinition.createType" // tokenTypeFactory="de.platon42.intellij.plugins.m68k.parser.M68kParserDefinition.createTokenType" @@ -134,13 +134,27 @@ private LabelOnly ::= Label private LabelWithInstruction ::= Label Instruction private InstructionOnly ::= Instruction -LocalLabel ::= LOCAL_LABEL_DEF {extends=Label} -GlobalLabel ::= GLOBAL_LABEL_DEF {extends=Label} +LocalLabel ::= LOCAL_LABEL_DEF COLON? { + name = "local label" + extends = Label + implements = "de.platon42.intellij.plugins.m68k.psi.M68kNamedElement" + mixin = "de.platon42.intellij.plugins.m68k.psi.M68kLocalLabelMixin" + methods = [getName setName getNameIdentifier] +} + +GlobalLabel ::= GLOBAL_LABEL_DEF COLON* { + name = "global label" + extends = Label + implements = "de.platon42.intellij.plugins.m68k.psi.M68kNamedElement" + mixin = "de.platon42.intellij.plugins.m68k.psi.M68kGlobalLabelMixin" + methods = [getName setName getNameIdentifier] +} + Label ::= LocalLabel | GlobalLabel -OperandSize ::= (OPSIZE_BS|OPSIZE_W|OPSIZE_L) -AddressSize ::= (OPSIZE_W|OPSIZE_L) -DataWidth ::= (OPSIZE_W|OPSIZE_L) +OperandSize ::= (OPSIZE_BS|OPSIZE_W|OPSIZE_L) { name = ".s|.b|.w|.l" } +AddressSize ::= (OPSIZE_W|OPSIZE_L) { name = ".w|.l" } +DataWidth ::= (OPSIZE_W|OPSIZE_L) { name = ".w|.l" } AsmOp ::= MNEMONIC OperandSize? @@ -159,13 +173,24 @@ private PreprocessorOperand ::= expr private PlainOperands ::= STRINGLIT (SEPARATOR STRINGLIT)* -DataRegister ::= DREG {extends=Register} -AddressRegister ::= AREG {extends=Register} -SpecialRegister ::= REG_CCR | REG_SR | REG_USP | REG_VBR {extends=Register} +DataRegister ::= DREG { + name = "data register" + extends = Register +} + +AddressRegister ::= AREG { + name = "address register" + extends = Register +} + +SpecialRegister ::= REG_CCR | REG_SR | REG_USP | REG_VBR { + name = "special register" + extends = Register +} Register ::= DataRegister | AddressRegister | SpecialRegister -private DataOrAddressRegister ::= DataRegister | AddressRegister +private DataOrAddressRegister ::= DataRegister | AddressRegister { name = "data or address register"} AddressingMode ::= ImmediateData | AddressRegisterIndirectPreDecAddressingMode @@ -202,7 +227,10 @@ ProgramCounterIndirectWithIndexNewAddressingMode ::= ROUND_L (expr SEPARATOR)? P AbsoluteAddressAddressingMode ::= expr AddressSize? !ROUND_L private RegisterRange ::= (DataOrAddressRegister OP_MINUS DataOrAddressRegister) RegisterListAddressingMode ::= (DataOrAddressRegister|RegisterRange) ((OP_AR_DIV|OP_MINUS) (DataOrAddressRegister|RegisterRange))* -ImmediateData ::= HASH expr {extends=AddressingMode} +ImmediateData ::= HASH expr { + name = "immediate data" + extends = AddressingMode +} expr ::= binary_logical_or_expr | binary_logical_and_expr @@ -215,7 +243,7 @@ expr ::= binary_logical_or_expr | binary_bitwise_and_expr | binary_shift_group | unary_group - | primary_group + | primary_group { name = "expression" } // | macrobrace_expr // private rules to define operators with the same priority @@ -247,11 +275,13 @@ binary_cmp_gt_expr ::= expr OP_CMP_GT expr binary_cmp_ge_expr ::= expr OP_CMP_GT_EQ expr binary_cmp_eq_expr ::= expr OP_CMP_EQ expr binary_cmp_ne_expr ::= expr OP_CMP_NOT_EQ expr -//binary_cmp_ne_expr ::= expr (OP_CMP_NOT_EQ|OP_CMP_NOT_EQ2) expr binary_logical_and_expr ::= expr OP_LOGICAL_AND expr binary_logical_or_expr ::= expr OP_LOGICAL_OR expr //macrobrace_expr ::= OP_CMP_LT expr OP_CMP_GT paren_expr ::= ROUND_L expr ROUND_R //{pin=1 recoverWhile=statement_recover} ref_expr ::= SYMBOL|CURRENT_PC_SYMBOL -literal_expr ::= BINARY|DECIMAL|HEXADECIMAL|OCTAL|STRINGLIT +literal_expr ::= BINARY|DECIMAL|HEXADECIMAL|OCTAL|STRINGLIT { + implements = "com.intellij.psi.PsiLiteralValue" + mixin = "de.platon42.intellij.plugins.m68k.psi.M68kLiteralExprMixin" +} diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/parser/M68kParserUtilBase.java b/src/main/java/de/platon42/intellij/plugins/m68k/parser/M68kParserUtilBase.java index be2f01a..26c8dce 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/parser/M68kParserUtilBase.java +++ b/src/main/java/de/platon42/intellij/plugins/m68k/parser/M68kParserUtilBase.java @@ -1,22 +1,7 @@ package de.platon42.intellij.plugins.m68k.parser; -import com.intellij.lang.PsiBuilder; import com.intellij.lang.parser.GeneratedParserUtilBase; -import static de.platon42.intellij.plugins.m68k.psi.M68kTypes.SYMBOL; - public class M68kParserUtilBase extends GeneratedParserUtilBase { - public static boolean parseMacroCallOrAsmInstruction(PsiBuilder b, int level) { - boolean r = false; - if (!nextTokenIs(b, SYMBOL)) return M68kParser.MacroCall(b, level); - - PsiBuilder.Marker m = enter_section_(b); - - //M68kMnemonics.INSTANCE.getMnemonics().stream().findFirst() nextTokenIs(, ) - r = M68kParser.AsmInstruction(b, level); - - exit_section_(b, m, null, r); - return r; - } } diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kElementFactory.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kElementFactory.kt new file mode 100644 index 0000000..57c2629 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kElementFactory.kt @@ -0,0 +1,23 @@ +package de.platon42.intellij.plugins.m68k.psi + +import com.intellij.openapi.project.Project +import com.intellij.psi.PsiFileFactory +import com.intellij.psi.util.PsiTreeUtil +import de.platon42.intellij.plugins.m68k.M68kFileType.Companion.INSTANCE + +object M68kElementFactory { + + fun createGlobalLabel(project: Project, label: String): M68kGlobalLabel { + val file = createFile(project, label) + return PsiTreeUtil.findChildOfType(file, M68kGlobalLabel::class.java)!! + } + + fun createLocalLabel(project: Project, label: String): M68kLocalLabel { + val file = createFile(project, label) + return PsiTreeUtil.findChildOfType(file, M68kLocalLabel::class.java)!! + } + + fun createFile(project: Project, content: String): M68kFile { + return PsiFileFactory.getInstance(project).createFileFromText("dummy.m68k", INSTANCE, content) as M68kFile + } +} \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabelMixin.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabelMixin.kt new file mode 100644 index 0000000..b87e282 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kGlobalLabelMixin.kt @@ -0,0 +1,8 @@ +package de.platon42.intellij.plugins.m68k.psi + +import com.intellij.extapi.psi.ASTWrapperPsiElement +import com.intellij.lang.ASTNode + +abstract class M68kGlobalLabelMixin(node: ASTNode) : ASTWrapperPsiElement(node), M68kGlobalLabel { + +} \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kLiteralExprMixin.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kLiteralExprMixin.kt new file mode 100644 index 0000000..04a36c7 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kLiteralExprMixin.kt @@ -0,0 +1,51 @@ +package de.platon42.intellij.plugins.m68k.psi + +import com.intellij.extapi.psi.ASTWrapperPsiElement +import com.intellij.lang.ASTNode + +abstract class M68kLiteralExprMixin(node: ASTNode) : ASTWrapperPsiElement(node), M68kLiteralExpr { + override fun getValue(): Any? { + val childNode = firstChild.node + when (childNode.elementType) { + M68kTypes.STRINGLIT -> { + return text.run { + when { + startsWith('"') -> removeSurrounding("\"") + startsWith('\'') -> removeSurrounding("'") + startsWith('<') -> removeSurrounding(">") + else -> this + } + } + } + M68kTypes.DECIMAL -> { + try { + return childNode.text.toInt() + } catch (ex: NumberFormatException) { + // ignore and fall through + } + } + M68kTypes.HEXADECIMAL -> { + try { + return childNode.text.substring(1).toInt(16) + } catch (ex: NumberFormatException) { + // ignore and fall through + } + } + M68kTypes.BINARY -> { + try { + return childNode.text.substring(1).toInt(2) + } catch (ex: NumberFormatException) { + // ignore and fall through + } + } + M68kTypes.OCTAL -> { + try { + return childNode.text.substring(1).toInt(8) + } catch (ex: NumberFormatException) { + // ignore and fall through + } + } + } + return text + } +} \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kLocalLabelMixin.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kLocalLabelMixin.kt new file mode 100644 index 0000000..88e6386 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kLocalLabelMixin.kt @@ -0,0 +1,8 @@ +package de.platon42.intellij.plugins.m68k.psi + +import com.intellij.extapi.psi.ASTWrapperPsiElement +import com.intellij.lang.ASTNode + +abstract class M68kLocalLabelMixin(node: ASTNode) : ASTWrapperPsiElement(node), M68kLocalLabel { + +} \ No newline at end of file diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kNamedElement.java b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kNamedElement.java new file mode 100644 index 0000000..beeb317 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kNamedElement.java @@ -0,0 +1,6 @@ +package de.platon42.intellij.plugins.m68k.psi; + +import com.intellij.psi.PsiNameIdentifierOwner; + +public interface M68kNamedElement extends PsiNameIdentifierOwner { +} diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kPsiImplUtil.kt b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kPsiImplUtil.kt new file mode 100644 index 0000000..8555aab --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/psi/M68kPsiImplUtil.kt @@ -0,0 +1,42 @@ +package de.platon42.intellij.plugins.m68k.psi + +import com.intellij.psi.PsiElement +import com.intellij.util.IncorrectOperationException +import de.platon42.intellij.plugins.m68k.psi.M68kElementFactory.createGlobalLabel +import de.platon42.intellij.plugins.m68k.psi.M68kElementFactory.createLocalLabel + +object M68kPsiImplUtil { + + @JvmStatic + fun getName(element: M68kGlobalLabel): String? = element.firstChild.text + + @JvmStatic + fun setName(element: M68kGlobalLabel, name: String): PsiElement { + val nameNode = element.node.findChildByType(M68kTypes.GLOBAL_LABEL_DEF) + if (nameNode != null) { + val newGlobalLabel = createGlobalLabel(element.project, name) + element.node.replaceChild(nameNode, newGlobalLabel.firstChild.node) + } + return element + } + + @JvmStatic + fun getNameIdentifier(element: M68kGlobalLabel): PsiElement = element.firstChild + + @JvmStatic + fun getName(element: M68kLocalLabel): String? = element.firstChild.text + + @JvmStatic + fun setName(element: M68kLocalLabel, name: String): PsiElement { + if (!(name.startsWith(".") || name.endsWith("$"))) throw IncorrectOperationException("local label must start with '.' or end with '$'") + val nameNode = element.node.findChildByType(M68kTypes.LOCAL_LABEL_DEF) + if (nameNode != null) { + val newLocalLabel = createLocalLabel(element.project, name) + element.node.replaceChild(nameNode, newLocalLabel.firstChild.node) + } + return element + } + + @JvmStatic + fun getNameIdentifier(element: M68kLocalLabel): PsiElement = element.firstChild +} \ No newline at end of file diff --git a/src/test/resources/parser/directives/dc_b_with_strings_and_global_label.txt b/src/test/resources/parser/directives/dc_b_with_strings_and_global_label.txt index ce8d2cd..3420969 100644 --- a/src/test/resources/parser/directives/dc_b_with_strings_and_global_label.txt +++ b/src/test/resources/parser/directives/dc_b_with_strings_and_global_label.txt @@ -2,7 +2,8 @@ Assembly File: a.asm M68kStatementImpl(STATEMENT) M68kPreprocessorDirectiveImpl(PREPROCESSOR_DIRECTIVE) M68kGlobalLabelImpl(GLOBAL_LABEL) - PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('foo:') + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('foo') + PsiElement(M68kTokenType.COLON)(':') PsiWhiteSpace(' ') PsiElement(M68kTokenType.DATA_DIRECTIVE)('dc.b') PsiWhiteSpace(' ') diff --git a/src/test/resources/parser/directives/include_file_unquoted.txt b/src/test/resources/parser/directives/include_file_unquoted.txt index d74a3ca..7292cc2 100644 --- a/src/test/resources/parser/directives/include_file_unquoted.txt +++ b/src/test/resources/parser/directives/include_file_unquoted.txt @@ -2,7 +2,8 @@ Assembly File: a.asm M68kStatementImpl(STATEMENT) M68kPreprocessorDirectiveImpl(PREPROCESSOR_DIRECTIVE) M68kGlobalLabelImpl(GLOBAL_LABEL) - PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('howto:') + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('howto') + PsiElement(M68kTokenType.COLON)(':') PsiElement(M68kTokenType.OTHER_DIRECTIVE)('incbin') PsiWhiteSpace(' ') M68kRefExprImpl(REF_EXPR) diff --git a/src/test/resources/parser/labels/complex_label_test.txt b/src/test/resources/parser/labels/complex_label_test.txt index 4a49746..b1685dd 100644 --- a/src/test/resources/parser/labels/complex_label_test.txt +++ b/src/test/resources/parser/labels/complex_label_test.txt @@ -1,7 +1,8 @@ Assembly File: a.asm M68kStatementImpl(STATEMENT) M68kGlobalLabelImpl(GLOBAL_LABEL) - PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('start_demo:') + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('start_demo') + PsiElement(M68kTokenType.COLON)(':') PsiWhiteSpace(' ') PsiComment(M68kTokenType.COMMENT)('; here we will do some cool stuff') PsiElement(M68kTokenType.EOL)('\n') @@ -75,7 +76,8 @@ Assembly File: a.asm PsiWhiteSpace(' ') M68kStatementImpl(STATEMENT) M68kLocalLabelImpl(LOCAL_LABEL) - PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.skip:') + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.skip') + PsiElement(M68kTokenType.COLON)(':') PsiWhiteSpace(' ') M68kAsmInstructionImpl(ASM_INSTRUCTION) M68kAsmOpImpl(ASM_OP) @@ -92,7 +94,9 @@ Assembly File: a.asm PsiWhiteSpace(' ') M68kStatementImpl(STATEMENT) M68kGlobalLabelImpl(GLOBAL_LABEL) - PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('GlobalExit::') + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('GlobalExit') + PsiElement(M68kTokenType.COLON)(':') + PsiElement(M68kTokenType.COLON)(':') PsiWhiteSpace(' ') M68kAsmInstructionImpl(ASM_INSTRUCTION) M68kAsmOpImpl(ASM_OP) 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 index 6f2b23f..c9ef7e4 100644 --- a/src/test/resources/parser/labels/dot_local_label_with_colon.txt +++ b/src/test/resources/parser/labels/dot_local_label_with_colon.txt @@ -1,5 +1,6 @@ Assembly File: a.asm M68kStatementImpl(STATEMENT) M68kLocalLabelImpl(LOCAL_LABEL) - PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.local_label:') + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.local_label') + PsiElement(M68kTokenType.COLON)(':') 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 index bc22309..508c097 100644 --- a/src/test/resources/parser/labels/external_label_with_double_colon.txt +++ b/src/test/resources/parser/labels/external_label_with_double_colon.txt @@ -1,5 +1,7 @@ Assembly File: a.asm M68kStatementImpl(STATEMENT) M68kGlobalLabelImpl(GLOBAL_LABEL) - PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('External_Label::') + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('External_Label') + PsiElement(M68kTokenType.COLON)(':') + PsiElement(M68kTokenType.COLON)(':') 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 index 8a78de3..38cf67d 100644 --- a/src/test/resources/parser/labels/global_label_with_colon.txt +++ b/src/test/resources/parser/labels/global_label_with_colon.txt @@ -1,5 +1,6 @@ Assembly File: a.asm M68kStatementImpl(STATEMENT) M68kGlobalLabelImpl(GLOBAL_LABEL) - PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('Global_Label:') + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('Global_Label') + PsiElement(M68kTokenType.COLON)(':') 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 index 9a20a3c..e8ae87e 100644 --- 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 @@ -2,5 +2,6 @@ Assembly File: a.asm PsiWhiteSpace('\t') M68kStatementImpl(STATEMENT) M68kLocalLabelImpl(LOCAL_LABEL) - PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.local_label:') + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('.local_label') + PsiElement(M68kTokenType.COLON)(':') 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 index e7f007b..2ece7b6 100644 --- 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 @@ -2,5 +2,7 @@ Assembly File: a.asm PsiWhiteSpace(' ') M68kStatementImpl(STATEMENT) M68kGlobalLabelImpl(GLOBAL_LABEL) - PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('External_Label::') + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('External_Label') + PsiElement(M68kTokenType.COLON)(':') + PsiElement(M68kTokenType.COLON)(':') 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 index 3635b32..1f99981 100644 --- a/src/test/resources/parser/labels/indented_global_label_with_colon.txt +++ b/src/test/resources/parser/labels/indented_global_label_with_colon.txt @@ -2,5 +2,6 @@ Assembly File: a.asm PsiWhiteSpace(' ') M68kStatementImpl(STATEMENT) M68kGlobalLabelImpl(GLOBAL_LABEL) - PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('Global_Label:') + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('Global_Label') + PsiElement(M68kTokenType.COLON)(':') 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 index 99c097a..9e99ada 100644 --- 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 @@ -2,5 +2,6 @@ Assembly File: a.asm PsiWhiteSpace(' ') M68kStatementImpl(STATEMENT) M68kLocalLabelImpl(LOCAL_LABEL) - PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('local_label$:') + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('local_label$') + PsiElement(M68kTokenType.COLON)(':') 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 index 2fb78b2..3a5098d 100644 --- a/src/test/resources/parser/labels/local_label_dollar_with_colon.txt +++ b/src/test/resources/parser/labels/local_label_dollar_with_colon.txt @@ -1,5 +1,6 @@ Assembly File: a.asm M68kStatementImpl(STATEMENT) M68kLocalLabelImpl(LOCAL_LABEL) - PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('local_label$:') + PsiElement(M68kTokenType.LOCAL_LABEL_DEF)('local_label$') + PsiElement(M68kTokenType.COLON)(':') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file