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 b4a91ad..4cfe091 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 @@ -7,8 +7,7 @@ import com.intellij.psi.tree.IElementType; import static com.intellij.psi.TokenType.BAD_CHARACTER; import static com.intellij.psi.TokenType.WHITE_SPACE; -import static de.platon42.intellij.plugins.m68k.lexer.LexerUtil.isAsmMnemonic; -import static de.platon42.intellij.plugins.m68k.lexer.LexerUtil.pushbackAssignment; +import static de.platon42.intellij.plugins.m68k.lexer.LexerUtil.*; import static de.platon42.intellij.plugins.m68k.psi.M68kTypes.*; @@ -38,7 +37,9 @@ 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; + public static final int EXPR = 12; + public static final int MACROCALL = 14; + public static final int WAITEOL = 16; /** * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l @@ -47,13 +48,14 @@ 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, 6, 6 + 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, + 8, 8 }; /** * Translates characters to character classes * Chosen bits are [11, 6, 4] - * Total runtime size is 14496 bytes + * Total runtime size is 14464 bytes */ public static int ZZ_CMAP(int ch) { return ZZ_CMAP_A[(ZZ_CMAP_Y[(ZZ_CMAP_Z[ch >> 10] << 6) | ((ch >> 4) & 0x3f)] << 4) | (ch & 0xf)]; @@ -69,112 +71,116 @@ public class _M68kLexer implements FlexLexer { /* The ZZ_CMAP_Y table has 2944 entries */ static final char ZZ_CMAP_Y[] = zzUnpackCMap( - "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\1\1\11\1\12\1\13\1\14\1\13\1\14\3" + - "\13\1\15\3\13\1\16\24\13\1\17\1\20\1\21\10\1\1\22\1\23\1\13\1\24\4\13\1\25" + - "\10\13\1\26\12\13\1\27\1\13\1\30\1\27\1\13\1\31\4\1\1\13\1\32\1\33\2\1\2\13" + - "\1\32\1\1\1\34\1\27\5\13\1\35\1\36\1\37\1\1\1\40\1\13\1\1\1\41\5\13\1\42\1" + - "\43\1\44\1\13\1\32\1\45\1\13\1\46\1\47\1\1\1\13\1\50\4\1\1\13\1\51\4\1\1\52" + - "\2\13\1\53\1\1\1\54\1\55\1\27\1\56\1\57\1\60\1\61\1\62\1\63\1\55\1\20\1\64" + - "\1\57\1\60\1\65\1\1\1\66\1\67\1\70\1\71\1\24\1\60\1\72\1\1\1\73\1\55\1\74" + - "\1\75\1\57\1\60\1\72\1\1\1\63\1\55\1\43\1\76\1\77\1\100\1\101\1\1\1\73\1\67" + - "\1\1\1\102\1\40\1\60\1\53\1\1\1\103\1\55\1\1\1\104\1\40\1\60\1\105\1\1\1\62" + - "\1\55\1\106\1\102\1\40\1\13\1\107\1\62\1\110\1\55\1\111\1\112\1\113\1\13\1" + - "\114\1\115\1\1\1\67\1\1\1\27\2\13\1\116\1\115\1\117\2\1\1\120\1\121\1\122" + - "\1\123\1\124\1\125\2\1\1\73\1\1\1\117\1\1\1\126\1\13\1\127\1\1\1\130\7\1\2" + - "\13\1\32\1\131\1\117\1\132\1\133\1\134\1\135\1\117\2\13\1\136\2\13\1\137\24" + - "\13\1\140\1\141\2\13\1\140\2\13\1\142\1\143\1\14\3\13\1\143\3\13\1\32\2\1" + - "\1\13\1\1\5\13\1\144\1\27\45\13\1\145\1\13\1\146\1\32\4\13\1\32\1\147\1\150" + - "\1\20\1\13\1\20\1\13\1\20\1\150\1\73\3\13\1\151\1\1\1\152\1\117\2\1\1\117" + - "\5\13\1\31\1\153\1\13\1\154\4\13\1\42\1\13\1\155\2\1\1\67\1\13\1\156\1\157" + - "\2\13\1\160\1\13\1\101\1\117\2\1\1\13\1\115\3\13\1\157\2\1\2\117\1\161\5\1" + - "\1\112\2\13\1\151\1\162\1\117\2\1\1\163\1\13\1\164\1\44\2\13\1\42\1\1\2\13" + - "\1\151\1\1\1\165\1\44\1\13\1\156\1\50\5\1\1\166\1\167\14\13\4\1\21\13\1\144" + - "\2\13\1\144\1\170\1\13\1\156\3\13\1\171\1\172\1\173\1\127\1\172\1\174\1\1" + - "\1\175\2\1\1\176\1\1\1\177\1\1\1\127\6\1\1\200\1\201\1\202\1\203\1\204\3\1" + - "\1\205\147\1\2\13\1\155\2\13\1\155\10\13\1\206\1\207\2\13\1\136\3\13\1\210" + - "\1\1\1\13\1\115\4\211\4\1\1\131\35\1\1\212\2\1\1\213\1\27\4\13\1\214\1\27" + - "\4\13\1\137\1\112\1\13\1\156\1\27\4\13\1\155\1\1\1\13\1\32\3\1\1\13\40\1\133" + - "\13\1\42\4\1\135\13\1\42\2\1\10\13\1\127\4\1\2\13\1\156\20\13\1\127\1\13\1" + - "\215\1\1\2\13\1\155\1\131\1\13\1\156\4\13\1\42\2\1\1\216\1\217\5\13\1\220" + - "\1\13\1\155\1\31\3\1\1\216\1\221\1\13\1\33\1\1\3\13\1\151\1\217\2\13\1\151" + - "\1\1\1\117\1\1\1\222\1\44\1\13\1\42\1\13\1\115\1\1\1\13\1\127\1\52\2\13\1" + - "\33\1\131\1\117\1\223\1\224\2\13\1\50\1\1\1\225\1\117\1\13\1\226\3\13\1\227" + - "\1\230\1\231\1\32\1\70\1\232\1\233\1\211\2\13\1\137\1\42\7\13\1\33\1\117\72" + - "\13\1\151\1\13\1\234\2\13\1\160\20\1\26\13\1\156\6\13\1\101\2\1\1\115\1\235" + - "\1\60\1\236\1\237\6\13\1\20\1\1\1\163\25\13\1\156\1\1\4\13\1\217\2\13\1\31" + - "\2\1\1\160\7\1\1\223\7\13\1\127\1\1\1\117\1\27\1\32\1\27\1\32\1\240\4\13\1" + - "\155\1\241\1\242\2\1\1\243\1\13\1\14\1\244\2\156\2\1\7\13\1\32\30\1\1\13\1" + - "\127\3\13\1\73\2\1\2\13\1\1\1\13\1\245\2\13\1\42\1\13\1\156\2\13\1\246\3\1" + - "\11\13\1\156\1\117\2\13\1\246\1\13\1\160\2\13\1\31\3\13\1\151\11\1\23\13\1" + - "\115\1\13\1\42\1\31\11\1\1\247\2\13\1\250\1\13\1\42\1\13\1\115\1\13\1\155" + - "\4\1\1\13\1\251\1\13\1\42\1\13\1\101\4\1\3\13\1\252\4\1\1\73\1\253\1\13\1" + - "\151\2\1\1\13\1\127\1\13\1\127\2\1\1\126\1\13\1\157\1\1\3\13\1\42\1\13\1\42" + - "\1\13\1\33\1\13\1\20\6\1\4\13\1\50\3\1\3\13\1\33\3\13\1\33\60\1\1\163\2\13" + - "\1\31\2\1\1\67\1\1\1\163\2\13\2\1\1\13\1\50\1\117\1\163\1\13\1\115\1\67\1" + - "\1\2\13\1\254\1\163\2\13\1\33\1\255\1\256\2\1\1\13\1\24\1\160\5\1\1\257\1" + - "\260\1\50\2\13\1\155\1\1\1\117\1\75\1\57\1\60\1\72\1\1\1\261\1\20\11\1\3\13" + - "\1\157\1\262\1\117\2\1\3\13\1\1\1\263\1\117\12\1\2\13\1\155\2\1\1\264\2\1" + - "\3\13\1\1\1\265\1\117\2\1\2\13\1\32\1\1\1\117\3\1\1\13\1\101\1\1\1\117\26" + - "\1\4\13\1\117\1\131\34\1\3\13\1\50\20\1\1\60\1\13\1\155\1\1\1\73\1\117\1\1" + - "\1\217\1\13\67\1\71\13\1\101\16\1\14\13\1\151\53\1\2\13\1\155\75\1\44\13\1" + - "\115\33\1\43\13\1\50\1\13\1\155\1\117\6\1\1\13\1\156\1\1\3\13\1\1\1\151\1" + - "\117\1\163\1\266\1\13\67\1\4\13\1\157\1\73\3\1\1\163\4\1\1\73\1\1\76\13\1" + - "\127\1\1\57\13\1\33\20\1\1\20\77\1\6\13\1\32\1\127\1\50\1\101\66\1\5\13\1" + - "\223\3\13\1\150\1\267\1\270\1\271\3\13\1\272\1\273\1\13\1\274\1\275\1\40\24" + - "\13\1\276\1\13\1\40\1\137\1\13\1\137\1\13\1\223\1\13\1\223\1\155\1\13\1\155" + - "\1\13\1\60\1\13\1\60\1\13\1\277\3\300\14\13\1\157\3\1\4\13\1\151\1\117\112" + - "\1\1\271\1\13\1\301\1\302\1\303\1\304\1\305\1\306\1\307\1\160\1\310\1\160" + - "\24\1\55\13\1\115\2\1\103\13\1\157\15\13\1\156\150\13\1\20\25\1\41\13\1\156" + - "\36\1"); + "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\1\1\11\1\12\1\13\1\14\1\13\1\14\7" + + "\13\1\15\24\13\1\16\1\17\1\20\10\1\1\21\1\22\1\13\1\23\4\13\1\24\10\13\1\25" + + "\12\13\1\26\1\13\1\27\1\26\1\13\1\30\4\1\1\13\1\31\1\32\2\1\2\13\1\31\1\1" + + "\1\33\1\26\5\13\1\34\1\35\1\36\1\1\1\37\1\13\1\1\1\40\5\13\1\41\1\42\1\43" + + "\1\13\1\31\1\44\1\13\1\45\1\46\1\1\1\13\1\47\4\1\1\13\1\50\4\1\1\51\2\13\1" + + "\52\1\1\1\53\1\54\1\26\1\55\1\56\1\57\1\60\1\61\1\62\1\54\1\17\1\63\1\56\1" + + "\57\1\64\1\1\1\65\1\66\1\67\1\70\1\23\1\57\1\71\1\1\1\72\1\54\1\73\1\74\1" + + "\56\1\57\1\71\1\1\1\62\1\54\1\42\1\75\1\76\1\77\1\100\1\1\1\72\1\66\1\1\1" + + "\101\1\37\1\57\1\52\1\1\1\102\1\54\1\1\1\103\1\37\1\57\1\104\1\1\1\61\1\54" + + "\1\105\1\101\1\37\1\13\1\106\1\61\1\107\1\54\1\110\1\111\1\112\1\13\1\113" + + "\1\114\1\1\1\66\1\1\1\26\2\13\1\115\1\114\1\116\2\1\1\117\1\120\1\121\1\122" + + "\1\123\1\124\2\1\1\72\1\1\1\116\1\1\1\125\1\13\1\126\1\1\1\127\7\1\2\13\1" + + "\31\1\130\1\116\1\131\1\132\1\133\1\134\1\116\2\13\1\135\2\13\1\136\24\13" + + "\1\137\1\140\2\13\1\137\2\13\1\141\1\142\1\14\3\13\1\142\3\13\1\31\2\1\1\13" + + "\1\1\5\13\1\143\1\26\45\13\1\144\1\13\1\145\1\31\4\13\1\31\1\146\1\147\1\17" + + "\1\13\1\17\1\13\1\17\1\147\1\72\3\13\1\150\1\1\1\151\1\116\2\1\1\116\5\13" + + "\1\30\1\152\1\13\1\153\4\13\1\41\1\13\1\154\2\1\1\66\1\13\1\155\1\156\2\13" + + "\1\157\1\13\1\100\1\116\2\1\1\13\1\114\3\13\1\156\2\1\2\116\1\160\5\1\1\111" + + "\2\13\1\150\1\161\1\116\2\1\1\162\1\13\1\163\1\43\2\13\1\41\1\1\2\13\1\150" + + "\1\1\1\164\1\43\1\13\1\155\1\47\5\1\1\165\1\166\14\13\4\1\21\13\1\143\2\13" + + "\1\143\1\167\1\13\1\155\3\13\1\170\1\171\1\172\1\126\1\171\1\173\1\1\1\174" + + "\2\1\1\175\1\1\1\176\1\1\1\126\6\1\1\177\1\200\1\201\1\202\1\203\3\1\1\204" + + "\147\1\2\13\1\154\2\13\1\154\10\13\1\205\1\206\2\13\1\135\3\13\1\207\1\1\1" + + "\13\1\114\4\210\4\1\1\130\35\1\1\211\2\1\1\212\1\26\4\13\1\213\1\26\4\13\1" + + "\136\1\111\1\13\1\155\1\26\4\13\1\154\1\1\1\13\1\31\3\1\1\13\40\1\133\13\1" + + "\41\4\1\135\13\1\41\2\1\10\13\1\126\4\1\2\13\1\155\20\13\1\126\1\13\1\214" + + "\1\1\2\13\1\154\1\130\1\13\1\155\4\13\1\41\2\1\1\215\1\216\5\13\1\217\1\13" + + "\1\154\1\30\3\1\1\215\1\220\1\13\1\32\1\1\3\13\1\150\1\216\2\13\1\150\1\1" + + "\1\116\1\1\1\221\1\43\1\13\1\41\1\13\1\114\1\1\1\13\1\126\1\51\2\13\1\32\1" + + "\130\1\116\1\222\1\223\2\13\1\47\1\1\1\224\1\116\1\13\1\225\3\13\1\226\1\227" + + "\1\230\1\31\1\67\1\231\1\232\1\210\2\13\1\136\1\41\7\13\1\32\1\116\72\13\1" + + "\150\1\13\1\233\2\13\1\157\20\1\26\13\1\155\6\13\1\100\2\1\1\114\1\234\1\57" + + "\1\235\1\236\6\13\1\17\1\1\1\162\25\13\1\155\1\1\4\13\1\216\2\13\1\30\2\1" + + "\1\157\7\1\1\222\7\13\1\126\1\1\1\116\1\26\1\31\1\26\1\31\1\237\4\13\1\154" + + "\1\240\1\241\2\1\1\242\1\13\1\14\1\243\2\155\2\1\7\13\1\31\30\1\1\13\1\126" + + "\3\13\1\72\2\1\2\13\1\1\1\13\1\244\2\13\1\41\1\13\1\155\2\13\1\245\3\1\11" + + "\13\1\155\1\116\2\13\1\245\1\13\1\157\2\13\1\30\3\13\1\150\11\1\23\13\1\114" + + "\1\13\1\41\1\30\11\1\1\246\2\13\1\247\1\13\1\41\1\13\1\114\1\13\1\154\4\1" + + "\1\13\1\250\1\13\1\41\1\13\1\100\4\1\3\13\1\251\4\1\1\72\1\252\1\13\1\150" + + "\2\1\1\13\1\126\1\13\1\126\2\1\1\125\1\13\1\156\1\1\3\13\1\41\1\13\1\41\1" + + "\13\1\32\1\13\1\17\6\1\4\13\1\47\3\1\3\13\1\32\3\13\1\32\60\1\1\162\2\13\1" + + "\30\2\1\1\66\1\1\1\162\2\13\2\1\1\13\1\47\1\116\1\162\1\13\1\114\1\66\1\1" + + "\2\13\1\253\1\162\2\13\1\32\1\254\1\255\2\1\1\13\1\23\1\157\5\1\1\256\1\257" + + "\1\47\2\13\1\154\1\1\1\116\1\74\1\56\1\57\1\71\1\1\1\260\1\17\11\1\3\13\1" + + "\156\1\261\1\116\2\1\3\13\1\1\1\262\1\116\12\1\2\13\1\154\2\1\1\263\2\1\3" + + "\13\1\1\1\264\1\116\2\1\2\13\1\31\1\1\1\116\3\1\1\13\1\100\1\1\1\116\26\1" + + "\4\13\1\116\1\130\34\1\3\13\1\47\20\1\1\57\1\13\1\154\1\1\1\72\1\116\1\1\1" + + "\216\1\13\67\1\71\13\1\100\16\1\14\13\1\150\53\1\2\13\1\154\75\1\44\13\1\114" + + "\33\1\43\13\1\47\1\13\1\154\1\116\6\1\1\13\1\155\1\1\3\13\1\1\1\150\1\116" + + "\1\162\1\265\1\13\67\1\4\13\1\156\1\72\3\1\1\162\4\1\1\72\1\1\76\13\1\126" + + "\1\1\57\13\1\32\20\1\1\17\77\1\6\13\1\31\1\126\1\47\1\100\66\1\5\13\1\222" + + "\3\13\1\147\1\266\1\267\1\270\3\13\1\271\1\272\1\13\1\273\1\274\1\37\24\13" + + "\1\275\1\13\1\37\1\136\1\13\1\136\1\13\1\222\1\13\1\222\1\154\1\13\1\154\1" + + "\13\1\57\1\13\1\57\1\13\1\276\3\277\14\13\1\156\3\1\4\13\1\150\1\116\112\1" + + "\1\270\1\13\1\300\1\301\1\302\1\303\1\304\1\305\1\306\1\157\1\307\1\157\24" + + "\1\55\13\1\114\2\1\103\13\1\156\15\13\1\155\150\13\1\17\25\1\41\13\1\155\36" + + "\1"); - /* The ZZ_CMAP_A table has 3216 entries */ + /* The ZZ_CMAP_A table has 3200 entries */ static final char ZZ_CMAP_A[] = zzUnpackCMap( - "\11\0\1\4\1\2\2\1\1\3\22\0\1\4\1\66\1\46\1\52\1\26\1\32\1\64\1\45\1\70\1\71" + - "\1\75\1\73\1\77\1\74\1\24\1\76\2\33\6\11\2\40\1\25\1\51\1\47\1\23\1\50\1\0" + - "\1\42\1\10\1\61\1\55\1\14\1\17\1\6\2\7\1\5\2\7\1\57\1\62\1\54\1\56\1\13\1" + - "\20\1\63\1\12\1\22\1\21\1\53\4\7\1\0\1\44\1\0\1\67\1\15\1\43\1\36\1\27\1\35" + - "\1\37\1\41\1\34\2\7\1\5\2\7\1\60\1\62\1\54\1\56\1\13\1\20\1\63\1\30\1\22\1" + - "\21\1\53\1\31\3\7\1\0\1\65\1\0\1\72\6\0\1\1\12\0\1\4\11\0\1\7\12\0\1\7\4\0" + - "\1\7\5\0\27\7\1\0\10\7\2\5\35\7\1\12\2\7\4\0\14\7\16\0\5\7\7\0\1\7\1\0\1\7" + - "\1\0\5\7\1\0\2\7\2\0\4\7\1\0\1\7\6\0\1\7\1\0\3\7\1\0\1\7\1\0\4\7\1\0\23\7" + - "\1\0\13\7\10\0\6\7\1\0\26\7\2\0\1\7\6\0\10\7\10\0\13\7\5\0\3\7\15\0\12\16" + - "\4\0\6\7\1\0\1\7\17\0\2\7\7\0\2\7\12\16\3\7\2\0\2\7\1\0\16\7\15\0\11\7\13" + - "\0\1\7\16\0\12\16\6\7\4\0\2\7\4\0\1\7\5\0\6\7\4\0\1\7\11\0\1\7\3\0\1\7\7\0" + - "\11\7\7\0\5\7\1\0\10\7\6\0\26\7\3\0\1\7\2\0\1\7\7\0\12\7\4\0\12\16\1\7\4\0" + - "\10\7\2\0\2\7\2\0\26\7\1\0\7\7\1\0\1\7\3\0\4\7\3\0\1\7\20\0\1\7\15\0\2\7\1" + - "\0\1\7\5\0\6\7\4\0\2\7\1\0\2\7\1\0\2\7\1\0\2\7\17\0\4\7\1\0\1\7\7\0\12\16" + - "\2\0\3\7\20\0\11\7\1\0\2\7\1\0\2\7\1\0\5\7\3\0\1\7\2\0\1\7\30\0\1\7\13\0\10" + - "\7\2\0\1\7\3\0\1\7\1\0\6\7\3\0\3\7\1\0\4\7\3\0\2\7\1\0\1\7\1\0\2\7\3\0\2\7" + - "\3\0\3\7\3\0\14\7\13\0\10\7\1\0\2\7\10\0\3\7\5\0\1\7\4\0\10\7\1\0\6\7\1\0" + - "\5\7\3\0\1\7\3\0\2\7\15\0\13\7\2\0\1\7\6\0\3\7\10\0\1\7\12\0\6\7\5\0\22\7" + - "\3\0\10\7\1\0\11\7\1\0\1\7\2\0\7\7\11\0\1\7\1\0\2\7\14\0\12\16\7\0\2\7\1\0" + - "\1\7\2\0\2\7\1\0\1\7\2\0\1\7\6\0\4\7\1\0\7\7\1\0\3\7\1\0\1\7\1\0\1\7\2\0\2" + - "\7\1\0\4\7\1\0\2\7\11\0\1\7\2\0\5\7\1\0\1\7\11\0\12\16\2\0\14\7\1\0\24\7\13" + - "\0\5\7\22\0\7\7\4\0\4\7\3\0\1\7\3\0\2\7\7\0\3\7\4\0\15\7\14\0\1\7\1\0\6\7" + - "\1\0\1\7\5\0\1\7\2\0\13\7\1\0\15\7\1\0\4\7\2\0\7\7\1\0\1\7\1\0\4\7\2\0\1\7" + - "\1\0\4\7\2\0\7\7\1\0\1\7\1\0\4\7\2\0\16\7\2\0\6\7\2\0\15\7\2\0\1\7\1\4\17" + - "\7\1\0\10\7\7\0\15\7\1\0\6\7\23\0\1\7\4\0\1\7\3\0\5\7\2\0\22\7\1\0\1\7\5\0" + - "\17\7\1\0\16\7\2\0\5\7\13\0\14\7\13\0\1\7\15\0\7\7\7\0\16\7\15\0\2\7\12\16" + - "\3\0\3\7\11\0\4\7\1\0\4\7\3\0\2\7\11\0\10\7\1\0\1\7\1\0\1\7\1\0\1\7\1\0\6" + - "\7\1\0\7\7\1\0\1\7\3\0\3\7\1\0\7\7\3\0\4\7\2\0\6\7\4\0\13\4\15\0\2\1\5\0\1" + - "\4\17\0\1\4\1\0\1\7\15\0\1\7\2\0\1\7\4\0\1\7\2\0\12\7\1\0\1\7\3\0\5\7\6\0" + - "\1\7\1\0\1\7\1\0\1\7\1\0\4\7\1\0\13\7\2\0\4\7\5\0\5\7\4\0\1\7\4\0\2\7\13\0" + - "\5\7\6\0\4\7\3\0\2\7\14\0\10\7\7\0\10\7\1\0\7\7\1\0\1\4\4\0\2\7\12\0\5\7\5" + - "\0\2\7\3\0\7\7\6\0\3\7\12\16\2\7\13\0\11\7\2\0\27\7\2\0\7\7\1\0\3\7\1\0\4" + - "\7\1\0\4\7\2\0\6\7\3\0\1\7\1\0\1\7\2\0\5\7\1\0\12\7\12\16\5\7\1\0\3\7\1\0" + - "\10\7\4\0\7\7\3\0\1\7\3\0\2\7\1\0\1\7\3\0\2\7\2\0\5\7\2\0\1\7\1\0\1\7\30\0" + - "\3\7\3\0\6\7\2\0\6\7\2\0\6\7\11\0\7\7\4\0\5\7\3\0\5\7\5\0\1\7\1\0\10\7\1\0" + - "\5\7\1\0\1\7\1\0\2\7\1\0\2\7\1\0\12\7\6\0\12\7\2\0\6\7\2\0\6\7\2\0\6\7\2\0" + - "\3\7\3\0\14\7\1\0\16\7\1\0\2\7\1\0\2\7\1\0\10\7\6\0\4\7\4\0\16\7\2\0\1\7\1" + - "\0\14\7\1\0\2\7\3\0\1\7\2\0\4\7\1\0\2\7\12\0\10\7\6\0\6\7\1\0\3\7\1\0\12\7" + - "\3\0\1\7\12\0\4\7\13\0\12\16\1\7\1\0\1\7\3\0\7\7\1\0\1\7\1\0\4\7\1\0\17\7" + - "\1\0\2\7\14\0\3\7\7\0\4\7\11\0\2\7\1\0\1\7\20\0\4\7\10\0\1\7\13\0\10\7\5\0" + - "\3\7\2\0\1\7\2\0\2\7\2\0\4\7\1\0\14\7\1\0\1\7\1\0\7\7\1\0\21\7\1\0\4\7\2\0" + - "\10\7\1\0\7\7\1\0\14\7\1\0\4\7\1\0\5\7\1\0\1\7\3\0\14\7\2\0\13\7\1\0\10\7" + - "\2\0\22\16\1\0\2\7\1\0\1\7\2\0\1\7\1\0\12\7\1\0\4\7\1\0\1\7\1\0\1\7\6\0\1" + - "\7\4\0\1\7\1\0\1\7\1\0\1\7\1\0\3\7\1\0\2\7\1\0\1\7\2\0\1\7\1\0\1\7\1\0\1\7" + - "\1\0\1\7\1\0\1\7\1\0\2\7\1\0\1\7\2\0\4\7\1\0\7\7\1\0\4\7\1\0\4\7\1\0\1\7\1" + - "\0\12\7\1\0\5\7\1\0\3\7\1\0\5\7\1\0\5\7"); + "\11\0\1\4\1\2\2\1\1\3\22\0\1\4\1\53\1\43\1\50\1\24\1\30\1\51\1\42\1\55\1\56" + + "\1\62\1\60\1\46\1\61\1\22\1\63\2\31\6\6\2\35\1\23\1\47\1\44\1\21\1\45\1\0" + + "\1\37\1\5\1\70\1\64\1\11\1\15\12\12\1\10\1\16\1\66\1\7\1\20\1\17\1\67\4\12" + + "\1\0\1\41\1\0\1\54\1\13\1\40\1\32\1\26\1\65\1\33\1\36\1\34\5\12\1\27\3\12" + + "\1\10\1\16\1\66\1\25\1\20\1\17\1\67\1\27\3\12\1\0\1\52\1\0\1\57\6\0\1\1\12" + + "\0\1\4\11\0\1\12\12\0\1\12\4\0\1\12\5\0\27\12\1\0\27\12\1\7\2\12\4\0\14\12" + + "\16\0\5\12\7\0\1\12\1\0\1\12\1\0\5\12\1\0\2\12\2\0\4\12\1\0\1\12\6\0\1\12" + + "\1\0\3\12\1\0\1\12\1\0\4\12\1\0\23\12\1\0\13\12\10\0\6\12\1\0\26\12\2\0\1" + + "\12\6\0\10\12\10\0\13\12\5\0\3\12\15\0\12\14\4\0\6\12\1\0\1\12\17\0\2\12\7" + + "\0\2\12\12\14\3\12\2\0\2\12\1\0\16\12\15\0\11\12\13\0\1\12\16\0\12\14\6\12" + + "\4\0\2\12\4\0\1\12\5\0\6\12\4\0\1\12\11\0\1\12\3\0\1\12\7\0\11\12\7\0\5\12" + + "\1\0\10\12\6\0\26\12\3\0\1\12\2\0\1\12\7\0\12\12\4\0\12\14\1\12\4\0\10\12" + + "\2\0\2\12\2\0\26\12\1\0\7\12\1\0\1\12\3\0\4\12\3\0\1\12\20\0\1\12\15\0\2\12" + + "\1\0\1\12\5\0\6\12\4\0\2\12\1\0\2\12\1\0\2\12\1\0\2\12\17\0\4\12\1\0\1\12" + + "\7\0\12\14\2\0\3\12\20\0\11\12\1\0\2\12\1\0\2\12\1\0\5\12\3\0\1\12\2\0\1\12" + + "\30\0\1\12\13\0\10\12\2\0\1\12\3\0\1\12\1\0\6\12\3\0\3\12\1\0\4\12\3\0\2\12" + + "\1\0\1\12\1\0\2\12\3\0\2\12\3\0\3\12\3\0\14\12\13\0\10\12\1\0\2\12\10\0\3" + + "\12\5\0\1\12\4\0\10\12\1\0\6\12\1\0\5\12\3\0\1\12\3\0\2\12\15\0\13\12\2\0" + + "\1\12\6\0\3\12\10\0\1\12\12\0\6\12\5\0\22\12\3\0\10\12\1\0\11\12\1\0\1\12" + + "\2\0\7\12\11\0\1\12\1\0\2\12\14\0\12\14\7\0\2\12\1\0\1\12\2\0\2\12\1\0\1\12" + + "\2\0\1\12\6\0\4\12\1\0\7\12\1\0\3\12\1\0\1\12\1\0\1\12\2\0\2\12\1\0\4\12\1" + + "\0\2\12\11\0\1\12\2\0\5\12\1\0\1\12\11\0\12\14\2\0\14\12\1\0\24\12\13\0\5" + + "\12\22\0\7\12\4\0\4\12\3\0\1\12\3\0\2\12\7\0\3\12\4\0\15\12\14\0\1\12\1\0" + + "\6\12\1\0\1\12\5\0\1\12\2\0\13\12\1\0\15\12\1\0\4\12\2\0\7\12\1\0\1\12\1\0" + + "\4\12\2\0\1\12\1\0\4\12\2\0\7\12\1\0\1\12\1\0\4\12\2\0\16\12\2\0\6\12\2\0" + + "\15\12\2\0\1\12\1\4\17\12\1\0\10\12\7\0\15\12\1\0\6\12\23\0\1\12\4\0\1\12" + + "\3\0\5\12\2\0\22\12\1\0\1\12\5\0\17\12\1\0\16\12\2\0\5\12\13\0\14\12\13\0" + + "\1\12\15\0\7\12\7\0\16\12\15\0\2\12\12\14\3\0\3\12\11\0\4\12\1\0\4\12\3\0" + + "\2\12\11\0\10\12\1\0\1\12\1\0\1\12\1\0\1\12\1\0\6\12\1\0\7\12\1\0\1\12\3\0" + + "\3\12\1\0\7\12\3\0\4\12\2\0\6\12\4\0\13\4\15\0\2\1\5\0\1\4\17\0\1\4\1\0\1" + + "\12\15\0\1\12\2\0\1\12\4\0\1\12\2\0\12\12\1\0\1\12\3\0\5\12\6\0\1\12\1\0\1" + + "\12\1\0\1\12\1\0\4\12\1\0\13\12\2\0\4\12\5\0\5\12\4\0\1\12\4\0\2\12\13\0\5" + + "\12\6\0\4\12\3\0\2\12\14\0\10\12\7\0\10\12\1\0\7\12\1\0\1\4\4\0\2\12\12\0" + + "\5\12\5\0\2\12\3\0\7\12\6\0\3\12\12\14\2\12\13\0\11\12\2\0\27\12\2\0\7\12" + + "\1\0\3\12\1\0\4\12\1\0\4\12\2\0\6\12\3\0\1\12\1\0\1\12\2\0\5\12\1\0\12\12" + + "\12\14\5\12\1\0\3\12\1\0\10\12\4\0\7\12\3\0\1\12\3\0\2\12\1\0\1\12\3\0\2\12" + + "\2\0\5\12\2\0\1\12\1\0\1\12\30\0\3\12\3\0\6\12\2\0\6\12\2\0\6\12\11\0\7\12" + + "\4\0\5\12\3\0\5\12\5\0\1\12\1\0\10\12\1\0\5\12\1\0\1\12\1\0\2\12\1\0\2\12" + + "\1\0\12\12\6\0\12\12\2\0\6\12\2\0\6\12\2\0\6\12\2\0\3\12\3\0\14\12\1\0\16" + + "\12\1\0\2\12\1\0\2\12\1\0\10\12\6\0\4\12\4\0\16\12\2\0\1\12\1\0\14\12\1\0" + + "\2\12\3\0\1\12\2\0\4\12\1\0\2\12\12\0\10\12\6\0\6\12\1\0\3\12\1\0\12\12\3" + + "\0\1\12\12\0\4\12\13\0\12\14\1\12\1\0\1\12\3\0\7\12\1\0\1\12\1\0\4\12\1\0" + + "\17\12\1\0\2\12\14\0\3\12\7\0\4\12\11\0\2\12\1\0\1\12\20\0\4\12\10\0\1\12" + + "\13\0\10\12\5\0\3\12\2\0\1\12\2\0\2\12\2\0\4\12\1\0\14\12\1\0\1\12\1\0\7\12" + + "\1\0\21\12\1\0\4\12\2\0\10\12\1\0\7\12\1\0\14\12\1\0\4\12\1\0\5\12\1\0\1\12" + + "\3\0\14\12\2\0\13\12\1\0\10\12\2\0\22\14\1\0\2\12\1\0\1\12\2\0\1\12\1\0\12" + + "\12\1\0\4\12\1\0\1\12\1\0\1\12\6\0\1\12\4\0\1\12\1\0\1\12\1\0\1\12\1\0\3\12" + + "\1\0\2\12\1\0\1\12\2\0\1\12\1\0\1\12\1\0\1\12\1\0\1\12\1\0\1\12\1\0\2\12\1" + + "\0\1\12\2\0\4\12\1\0\7\12\1\0\4\12\1\0\4\12\1\0\1\12\1\0\12\12\1\0\5\12\1" + + "\0\3\12\1\0\5\12\1\0\5\12"); /** * Translates DFA states to action switch labels. @@ -182,23 +188,21 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = - "\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\14\1\1\1\21\1\14\4\1\1\22\1\23\1\24" + - "\1\14\1\25\1\26\1\27\1\30\1\31\1\32\1\33" + - "\1\34\1\35\1\36\1\37\1\40\2\14\1\0\1\41" + - "\1\4\2\42\3\10\1\43\11\13\1\44\1\45\1\46" + - "\1\47\1\50\1\51\1\14\1\52\1\44\1\45\1\53" + - "\1\54\1\14\1\55\1\0\1\56\6\0\1\57\1\0" + - "\1\60\1\56\1\61\1\62\1\14\1\63\1\64\1\65" + - "\2\14\2\0\1\4\1\42\4\13\1\66\4\13\1\67" + - "\1\70\1\71\1\72\2\0\2\13\1\73\1\13\1\74" + - "\1\75\1\76\1\77\1\100\1\101\1\13\1\102\1\0" + - "\3\13\1\103\1\104\2\13\1\105\1\106"; + "\11\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\1\7\1\13\1\14" + + "\1\15\1\1\1\13\1\16\4\13\1\17\1\13\1\1" + + "\1\20\4\1\1\21\1\22\1\23\1\24\1\25\1\26" + + "\1\27\1\30\1\31\1\32\1\33\1\34\1\35\1\36" + + "\1\37\2\13\2\1\1\40\1\13\1\12\4\13\1\0" + + "\1\41\1\4\2\42\1\0\3\10\1\43\1\44\1\45" + + "\1\46\1\47\1\50\1\13\1\51\1\43\1\44\1\52" + + "\1\53\1\54\1\0\1\55\5\0\1\56\1\57\1\60" + + "\1\61\1\62\1\63\1\64\2\13\3\0\1\13\1\0" + + "\1\13\1\0\1\13\1\0\1\13\2\0\1\4\1\42" + + "\1\7\1\65\1\66\1\67\1\70\1\13\7\0"; private static int[] zzUnpackAction() { - int[] result = new int[161]; + int[] result = new int[135]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -223,30 +227,26 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\100\0\200\0\300\0\u0100\0\u0140\0\u0180\0\u01c0" + - "\0\u01c0\0\u0200\0\u0240\0\u0280\0\u02c0\0\u0300\0\u01c0\0\u0340" + - "\0\u0380\0\u03c0\0\u0400\0\u0440\0\u0480\0\u01c0\0\u04c0\0\u0500" + - "\0\u0540\0\u0580\0\u05c0\0\u0600\0\u0640\0\u0680\0\u06c0\0\u0700" + - "\0\u0740\0\u0780\0\u07c0\0\u0800\0\u0840\0\u0880\0\u08c0\0\u0900" + - "\0\u0940\0\u0980\0\u09c0\0\u0a00\0\u0a40\0\u0a80\0\u0ac0\0\u0b00" + - "\0\u0b40\0\u0b80\0\u0bc0\0\u0c00\0\u01c0\0\u0c40\0\u0c80\0\u0cc0" + - "\0\u0d00\0\u01c0\0\u01c0\0\u01c0\0\u01c0\0\u01c0\0\u01c0\0\u01c0" + - "\0\u01c0\0\u01c0\0\u0d40\0\u0d80\0\u0dc0\0\u0e00\0\u0e40\0\u0e80" + - "\0\u0ec0\0\u0f00\0\u0f40\0\u0f80\0\u0fc0\0\u1000\0\u1040\0\u1080" + - "\0\u10c0\0\u1100\0\u1140\0\u1180\0\u11c0\0\u1200\0\u01c0\0\u01c0" + - "\0\u0600\0\u0600\0\u0600\0\u0600\0\u1240\0\u01c0\0\u0600\0\u0600" + - "\0\u0a00\0\u0a40\0\u1280\0\u0ac0\0\u0b00\0\u01c0\0\u12c0\0\u0b40" + - "\0\u1300\0\u0b80\0\u1340\0\u1380\0\u1380\0\u13c0\0\u1380\0\u1380" + - "\0\u01c0\0\u01c0\0\u1400\0\u01c0\0\u01c0\0\u01c0\0\u1440\0\u1480" + - "\0\u14c0\0\u1500\0\u01c0\0\u01c0\0\u1540\0\u1580\0\u15c0\0\u1600" + - "\0\u1640\0\u1680\0\u16c0\0\u1700\0\u1740\0\u0600\0\u0600\0\u0600" + - "\0\u0600\0\u1780\0\u17c0\0\u1800\0\u1840\0\u0580\0\u1880\0\u0580" + - "\0\u0580\0\u0580\0\u0580\0\u0580\0\u0580\0\u18c0\0\u0580\0\u0e00" + - "\0\u1900\0\u1940\0\u1980\0\u0580\0\u0580\0\u19c0\0\u1a00\0\u0580" + - "\0\u0580"; + "\0\0\0\71\0\162\0\253\0\344\0\u011d\0\u0156\0\u018f" + + "\0\u01c8\0\u0201\0\u0201\0\u023a\0\u0273\0\u02ac\0\u02e5\0\u031e" + + "\0\u0201\0\u0357\0\u0390\0\u03c9\0\u0402\0\u043b\0\u0474\0\u0201" + + "\0\u04ad\0\u04e6\0\u051f\0\u0558\0\u0591\0\u05ca\0\u0603\0\u063c" + + "\0\u0675\0\u06ae\0\u06e7\0\u0720\0\u0759\0\u0792\0\u07cb\0\u0804" + + "\0\u083d\0\u0876\0\u08af\0\u08e8\0\u0921\0\u095a\0\u0201\0\u0201" + + "\0\u0993\0\u09cc\0\u0a05\0\u0201\0\u0201\0\u0201\0\u0201\0\u0201" + + "\0\u0201\0\u0201\0\u0201\0\u0a3e\0\u0a77\0\u0ab0\0\u0ae9\0\u0201" + + "\0\u0b22\0\u0b22\0\u0b5b\0\u0b94\0\u0bcd\0\u0c06\0\u0c3f\0\u0c78" + + "\0\u0cb1\0\u0cea\0\u0d23\0\u0d5c\0\u0d95\0\u0dce\0\u0e07\0\u0201" + + "\0\u0201\0\u051f\0\u051f\0\u051f\0\u051f\0\u0e40\0\u0201\0\u051f" + + "\0\u051f\0\u07cb\0\u0804\0\u083d\0\u0876\0\u0201\0\u0e79\0\u08af" + + "\0\u0eb2\0\u08e8\0\u0eeb\0\u0201\0\u0201\0\u0201\0\u0201\0\u0201" + + "\0\u0201\0\u0201\0\u0f24\0\u0f5d\0\u0f96\0\u0fcf\0\u1008\0\u1041" + + "\0\u107a\0\u10b3\0\u10ec\0\u1125\0\u115e\0\u1197\0\u11d0\0\u1209" + + "\0\u0201\0\u0201\0\u0201\0\u051f\0\u051f\0\u051f\0\u0201\0\u0201" + + "\0\u1242\0\u127b\0\u12b4\0\u12ed\0\u1326\0\u135f\0\u0c78"; private static int[] zzUnpackRowMap() { - int[] result = new int[161]; + int[] result = new int[135]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -269,165 +269,94 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = - "\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\11\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\11\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\15\10" + - "\2\26\1\27\1\42\17\10\1\43\24\10\1\37\27\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\10\1\54\1\34\1\46\1\34\1\55\1\45\1\34" + - "\1\56\1\44\1\50\1\45\1\34\1\57\1\60\1\10" + - "\1\61\1\62\1\63\1\64\1\37\1\65\1\66\1\34" + - "\1\56\6\34\1\67\1\70\1\71\1\72\1\73\1\74" + - "\1\75\1\76\1\77\1\100\1\101\1\102\1\10\2\26" + - "\1\27\1\21\4\34\1\45\1\103\3\34\1\10\1\104" + - "\3\34\1\52\1\34\1\10\1\54\1\34\1\103\1\34" + - "\1\55\1\45\4\34\1\45\1\104\1\57\1\60\1\10" + - "\1\61\1\62\1\63\1\64\1\37\1\10\11\34\1\67" + - "\1\70\1\71\1\72\1\73\1\74\1\75\1\76\1\77" + - "\1\100\1\101\2\10\2\26\1\27\74\10\102\0\1\11" + - "\101\0\1\13\77\0\1\105\16\14\1\106\1\0\1\107" + - "\1\110\3\14\1\0\7\14\11\0\11\14\21\0\4\111" + - "\1\0\4\111\1\0\4\111\4\0\3\111\2\0\4\111" + - "\1\0\1\111\11\0\11\111\14\0\1\16\3\0\74\16" + - "\2\0\1\17\101\0\1\21\100\0\4\22\1\23\3\22" + - "\2\23\4\22\2\0\1\107\1\112\3\22\1\0\1\23" + - "\4\22\1\23\1\22\11\0\11\22\21\0\16\23\2\0" + - "\1\107\1\112\3\23\1\0\7\23\11\0\11\23\21\0" + - "\4\113\1\114\4\113\1\114\4\113\3\0\1\114\3\113" + - "\1\0\1\114\4\113\1\114\1\113\11\0\11\113\14\0" + - "\1\25\3\0\74\25\2\0\1\26\102\0\1\32\1\115" + - "\2\32\1\34\3\32\2\34\4\32\3\0\1\34\3\32" + - "\1\0\1\34\1\115\3\32\1\34\1\32\11\0\1\32" + - "\1\116\7\32\21\0\3\32\1\117\1\34\3\32\2\34" + - "\4\32\3\0\1\34\3\32\1\0\1\34\2\32\1\117" + - "\1\32\1\34\1\32\11\0\11\32\21\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\21\0\4\32\1\34" + - "\3\32\2\34\1\120\3\32\3\0\1\34\3\32\1\0" + - "\1\34\4\32\1\34\1\120\11\0\11\32\21\0\16\34" + - "\3\0\4\34\1\0\7\34\11\0\11\34\21\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\121\1\122\2\32" + - "\2\123\3\32\21\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\124\7\32\14\0\1\37\3\0\74\37" + - "\5\0\3\32\1\125\1\34\3\32\2\34\4\32\3\0" + - "\1\34\3\32\1\0\1\34\2\32\1\125\1\32\1\34" + - "\1\32\11\0\11\32\21\0\4\32\1\34\3\32\2\34" + - "\1\126\3\32\3\0\1\34\3\32\1\0\1\34\4\32" + - "\1\34\1\126\11\0\11\32\20\0\1\42\122\0\2\127" + - "\1\130\26\0\1\130\24\0\4\34\1\131\11\34\3\0" + - "\4\34\1\0\1\131\6\34\11\0\11\34\25\0\1\45" + - "\21\0\1\45\4\0\1\45\44\0\6\34\1\131\7\34" + - "\3\0\4\34\1\0\7\34\11\0\10\34\1\132\21\0" + - "\16\34\3\0\4\34\1\0\2\34\1\133\4\34\11\0" + - "\2\34\1\133\6\34\21\0\4\34\1\134\11\34\3\0" + - "\4\34\1\0\1\134\6\34\11\0\11\34\21\0\5\34" + - "\1\135\10\34\3\0\2\34\1\135\1\34\1\0\7\34" + - "\11\0\11\34\37\0\1\136\61\0\16\34\3\0\1\34" + - "\2\137\1\140\1\0\7\34\11\0\5\34\1\140\3\34" + - "\25\0\1\141\15\0\1\141\3\0\7\141\71\0\1\142" + - "\51\0\16\34\3\0\4\34\1\0\2\34\1\143\4\34" + - "\11\0\2\34\1\143\6\34\25\0\1\144\21\0\1\144" + - "\44\0\43\145\1\146\1\147\33\145\44\150\1\151\1\146" + - "\32\150\44\152\1\153\1\152\1\146\31\152\23\154\1\155" + - "\17\154\1\0\1\156\2\154\1\157\1\160\27\154\23\0" + - "\1\161\24\0\1\162\34\0\16\34\3\0\1\34\1\163" + - "\2\34\1\0\7\34\11\0\6\34\1\163\2\34\100\0" + - "\1\164\100\0\1\165\35\0\1\166\61\0\12\34\1\167" + - "\3\34\3\0\4\34\1\0\6\34\1\167\11\0\11\34" + - "\21\0\13\34\1\170\2\34\3\0\4\34\1\0\7\34" + - "\11\0\11\34\20\0\1\105\5\0\1\171\4\0\1\172" + - "\3\0\1\106\4\0\1\171\10\0\1\172\42\0\1\106" + - "\120\0\1\173\77\0\1\174\57\0\16\111\2\0\1\174" + - "\1\0\3\111\1\0\7\111\11\0\11\111\21\0\16\114" + - "\2\0\1\174\4\114\1\0\7\114\11\0\11\114\21\0" + - "\16\113\2\0\1\174\1\114\3\113\1\0\7\113\11\0" + - "\11\113\21\0\16\114\3\0\4\114\1\0\7\114\11\0" + - "\11\114\21\0\4\115\1\34\3\115\2\34\4\115\3\0" + - "\1\34\3\115\1\0\1\34\4\115\1\34\1\115\11\0" + - "\11\115\21\0\4\32\1\34\3\32\2\34\4\32\3\0" + - "\1\34\3\32\1\0\1\34\1\32\1\175\2\32\1\34" + - "\1\32\11\0\2\32\1\175\6\32\21\0\1\176\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\21\0\4\32" + - "\1\34\3\32\2\34\4\32\3\0\1\34\3\32\1\0" + - "\1\34\1\32\1\177\2\32\1\34\1\32\11\0\2\32" + - "\1\177\6\32\21\0\4\32\1\34\3\32\2\34\1\200" + - "\3\32\3\0\1\34\3\32\1\0\1\34\4\32\1\34" + - "\1\200\11\0\11\32\21\0\4\32\1\34\2\32\1\201" + - "\2\34\4\32\3\0\1\34\3\32\1\0\1\34\3\32" + - "\1\201\1\34\1\32\11\0\11\32\21\0\4\32\1\34" + - "\1\202\2\32\2\34\4\32\3\0\1\34\1\32\1\202" + - "\1\32\1\0\1\34\4\32\1\34\1\32\11\0\11\32" + - "\21\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\203\5\32\21\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\21\0\4\32" + - "\1\34\1\32\1\205\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" + - "\21\0\6\34\1\206\7\34\3\0\4\34\1\0\7\34" + - "\11\0\11\34\21\0\16\34\3\0\4\34\1\0\7\34" + - "\11\0\10\34\1\207\14\0\1\145\3\0\74\145\1\150" + - "\3\0\74\150\1\152\3\0\74\152\43\154\1\0\1\156" + - "\3\154\1\160\30\154\3\0\74\154\5\0\16\34\3\0" + - "\4\34\1\0\7\34\11\0\10\34\1\210\21\0\15\34" + - "\1\211\3\0\4\34\1\0\7\34\11\0\11\34\21\0" + - "\14\34\1\211\1\34\3\0\4\34\1\0\7\34\11\0" + - "\11\34\33\0\1\212\21\0\1\212\56\0\1\213\64\0" + - "\4\32\1\34\3\32\2\34\4\32\3\0\1\34\1\214" + - "\2\32\1\0\1\34\4\32\1\34\1\32\11\0\4\32" + - "\2\215\1\214\2\32\21\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\216\3\32\21\0\4\32\1\34" + - "\3\32\2\34\3\32\1\217\3\0\1\34\3\32\1\0" + - "\1\34\4\32\1\34\1\32\11\0\11\32\21\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\220\7\32" + - "\21\0\4\32\1\34\3\32\2\34\4\32\3\0\1\34" + - "\3\32\1\0\1\34\1\32\1\221\2\32\1\34\1\32" + - "\11\0\2\32\1\221\4\32\1\222\1\223\21\0\4\32" + - "\1\34\3\32\2\34\1\224\3\32\3\0\1\34\3\32" + - "\1\0\1\34\4\32\1\34\1\224\11\0\11\32\21\0" + - "\4\32\1\34\1\32\1\225\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\21\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\226\21\0\4\32\1\34\3\32\2\34\3\32" + - "\1\227\3\0\1\34\3\32\1\0\1\34\4\32\1\34" + - "\1\32\11\0\11\32\36\0\1\230\76\0\1\230\63\0" + - "\1\231\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" + - "\21\0\4\32\1\34\3\32\2\34\2\32\1\232\1\32" + - "\3\0\1\34\3\32\1\0\1\34\4\32\1\34\1\32" + - "\11\0\11\32\21\0\1\233\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\21\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\234\5\32\21\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\235\7\32\21\0" + - "\4\32\1\34\2\32\1\236\2\34\4\32\3\0\1\34" + - "\3\32\1\0\1\34\3\32\1\236\1\34\1\32\11\0" + - "\11\32\21\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\237\5\32\21\0\4\32\1\34\3\32\2\34" + - "\1\240\3\32\3\0\1\34\3\32\1\0\1\34\4\32" + - "\1\34\1\240\11\0\11\32\21\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\241\7\32\14\0"; + "\1\12\2\13\1\14\1\15\1\16\1\12\5\16\1\12" + + "\4\16\1\12\1\17\2\12\3\16\2\12\3\16\1\12" + + "\1\16\10\12\2\20\11\12\1\20\1\12\5\16\1\12" + + "\2\21\1\22\1\23\1\24\1\12\4\24\1\25\1\12" + + "\4\24\1\12\1\26\2\12\3\24\2\12\3\24\1\12" + + "\1\24\10\12\2\27\11\12\1\27\1\12\5\24\1\12" + + "\2\30\1\31\1\23\1\32\1\12\4\32\1\33\1\12" + + "\4\32\1\12\1\33\2\12\3\32\2\12\3\32\1\12" + + "\1\32\10\12\1\34\14\12\5\32\1\12\2\30\1\31" + + "\1\35\15\12\1\36\24\12\1\34\22\12\2\30\1\31" + + "\1\23\1\37\1\40\1\41\1\42\1\43\2\33\1\12" + + "\2\33\1\44\1\33\1\45\1\46\1\12\1\47\1\41" + + "\2\33\1\50\1\40\1\37\1\43\1\33\1\40\1\33" + + "\1\51\1\52\1\12\1\53\1\54\1\55\1\56\1\57" + + "\1\34\1\60\1\61\1\62\1\63\1\64\1\65\1\66" + + "\1\67\1\70\1\71\1\72\1\73\2\74\1\33\1\75" + + "\1\33\1\12\2\30\1\31\1\23\2\12\1\76\5\12" + + "\1\77\3\12\1\100\3\12\1\76\10\12\1\77\10\12" + + "\1\34\22\12\2\30\1\31\1\23\1\33\1\40\5\33" + + "\1\12\4\33\1\45\1\33\1\12\1\47\3\33\1\50" + + "\1\40\3\33\1\40\1\33\1\51\1\52\1\12\1\53" + + "\1\54\1\55\1\56\1\57\1\34\1\12\1\61\1\62" + + "\1\63\1\64\1\65\1\66\1\67\1\70\1\71\1\72" + + "\1\73\5\33\1\101\1\102\1\30\1\31\1\23\33\101" + + "\1\103\1\101\1\104\1\105\1\106\1\101\1\57\1\34" + + "\21\101\1\12\2\30\1\31\65\12\73\0\1\13\72\0" + + "\1\15\70\0\1\107\14\16\1\110\1\0\1\111\1\112" + + "\3\16\1\0\6\16\25\0\5\16\5\0\1\113\1\0" + + "\5\113\1\0\4\113\4\0\3\113\2\0\3\113\1\0" + + "\1\113\25\0\5\113\1\20\3\0\65\20\2\0\1\21" + + "\72\0\1\23\71\0\1\24\1\25\4\24\2\25\4\24" + + "\1\0\1\114\1\111\1\115\3\24\1\0\1\25\3\24" + + "\1\25\1\24\25\0\5\24\5\0\14\25\2\0\1\111" + + "\1\115\3\25\1\0\6\25\25\0\5\25\5\0\1\116" + + "\1\117\5\116\1\117\4\116\3\0\1\117\3\116\1\0" + + "\1\117\3\116\1\117\1\116\25\0\5\116\1\27\3\0" + + "\65\27\2\0\1\30\73\0\1\32\1\33\4\32\2\33" + + "\4\32\1\0\1\114\1\0\1\33\3\32\1\0\1\33" + + "\3\32\1\33\1\32\25\0\5\32\5\0\14\33\3\0" + + "\4\33\1\0\6\33\25\0\5\33\1\34\3\0\65\34" + + "\4\0\1\35\111\0\2\120\1\121\46\0\1\33\1\122" + + "\12\33\3\0\4\33\1\0\1\122\5\33\25\0\5\33" + + "\6\0\1\40\22\0\1\40\3\0\1\40\40\0\3\33" + + "\1\122\10\33\3\0\4\33\1\0\6\33\25\0\2\33" + + "\1\123\2\33\5\0\14\33\3\0\4\33\1\0\6\33" + + "\25\0\2\124\3\33\5\0\1\33\1\125\12\33\3\0" + + "\4\33\1\0\1\125\5\33\25\0\5\33\5\0\2\33" + + "\1\126\11\33\3\0\1\33\1\126\2\33\1\0\6\33" + + "\25\0\5\33\21\0\1\127\54\0\14\33\3\0\1\33" + + "\2\130\1\131\1\0\6\33\25\0\5\33\6\0\1\132" + + "\17\0\1\132\2\0\6\132\26\0\1\132\34\0\1\133" + + "\45\0\1\134\22\0\1\134\37\0\40\135\1\136\1\137" + + "\27\135\41\140\1\141\1\136\26\140\41\142\1\143\1\142" + + "\1\136\25\142\21\0\1\144\22\0\1\145\1\146\44\0" + + "\1\147\23\0\1\150\74\0\1\151\71\0\1\152\37\0" + + "\1\146\54\0\14\33\3\0\4\33\1\0\6\33\25\0" + + "\2\153\3\33\5\0\14\33\3\0\2\33\1\154\1\33" + + "\1\0\6\33\25\0\4\33\1\154\15\0\1\155\20\0" + + "\1\155\50\0\1\156\52\0\2\101\3\0\41\101\2\0" + + "\21\101\2\103\3\157\33\103\1\101\1\160\4\103\2\157" + + "\21\103\2\104\3\161\34\104\1\162\1\101\3\104\2\161" + + "\21\104\2\105\3\163\34\105\1\164\1\105\1\101\2\105" + + "\2\163\21\105\2\106\3\165\34\106\1\166\3\106\1\101" + + "\2\165\21\106\4\0\1\107\2\0\1\167\5\0\1\170" + + "\3\0\1\110\3\0\1\167\10\0\1\170\36\0\1\110" + + "\107\0\1\171\70\0\1\172\52\0\14\113\2\0\1\172" + + "\1\0\3\113\1\0\6\113\25\0\5\113\1\173\3\0" + + "\65\173\5\0\14\117\2\0\1\172\4\117\1\0\6\117" + + "\25\0\5\117\5\0\14\116\2\0\1\172\1\117\3\116" + + "\1\0\6\116\25\0\5\116\5\0\14\117\3\0\4\117" + + "\1\0\6\117\25\0\5\117\5\0\3\33\1\174\10\33" + + "\3\0\4\33\1\0\6\33\25\0\5\33\1\135\3\0" + + "\65\135\1\140\3\0\65\140\1\142\3\0\65\142\5\0" + + "\14\33\3\0\4\33\1\0\6\33\25\0\2\33\1\175" + + "\2\33\5\0\14\33\3\0\4\33\1\0\6\33\25\0" + + "\2\33\1\176\2\33\20\0\1\177\67\0\1\177\51\0" + + "\40\157\1\200\1\201\27\157\1\103\1\101\2\0\1\157" + + "\41\103\2\157\21\103\41\161\1\202\1\200\26\161\1\104" + + "\1\101\2\0\1\161\41\104\2\161\21\104\41\163\1\203" + + "\1\163\1\200\25\163\1\105\1\101\2\0\1\163\41\105" + + "\2\163\21\105\41\165\1\204\3\165\1\200\23\165\1\106" + + "\1\101\2\0\1\165\41\106\2\165\21\106\15\0\1\205" + + "\20\0\1\205\50\0\1\206\52\0\1\157\3\0\65\157" + + "\1\161\3\0\65\161\1\163\3\0\65\163\1\165\3\0" + + "\65\165\20\0\1\207\67\0\1\207\51\0"; private static int[] zzUnpackTrans() { - int[] result = new int[6720]; + int[] result = new int[5016]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -465,14 +394,14 @@ public class _M68kLexer implements FlexLexer { private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\7\0\2\11\5\1\1\11\6\1\1\11\36\1\1\11" + - "\4\1\11\11\2\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"; + "\11\0\2\11\5\1\1\11\6\1\1\11\26\1\2\11" + + "\3\1\10\11\4\1\1\11\6\1\1\0\4\1\1\0" + + "\3\1\2\11\5\1\1\11\5\1\1\0\1\11\5\0" + + "\7\11\2\1\3\0\1\1\1\0\1\1\1\0\1\1" + + "\1\0\1\1\2\0\3\11\3\1\2\11\7\0"; private static int[] zzUnpackAttribute() { - int[] result = new int[161]; + int[] result = new int[135]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -795,212 +724,220 @@ public class _M68kLexer implements FlexLexer { return BAD_CHARACTER; } // fall through - case 71: + case 57: break; case 2: { return WHITE_SPACE; } // fall through - case 72: + case 58: break; case 3: { yybegin(NOSOL); return WHITE_SPACE; } // fall through - case 73: + case 59: break; case 4: { yybegin(INSTRPART); return GLOBAL_LABEL_DEF; } // fall through - case 74: + case 60: break; case 5: { return COMMENT; } // fall through - case 75: + case 61: break; case 6: { yybegin(YYINITIAL); return WHITE_SPACE; } // fall through - case 76: + case 62: break; case 7: { + if (isAsmMnemonicWithSize(yytext())) { + yybegin(ASMINSTR); + yypushback(2); + return MNEMONIC; + } if (isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; - } else { - yybegin(INSTRPART); - return SYMBOL; } + if (isDataDirective(yytext())) { + yybegin(EXPR); + return DATA_DIRECTIVE; + } + if (isOtherDirective(yytext())) { + yybegin(EXPR); + return OTHER_DIRECTIVE; + } + yybegin(INSTRPART); + return SYMBOL; } // fall through - case 77: + case 63: break; case 8: { yybegin(INSTRPART); return SYMBOL; } // fall through - case 78: + case 64: break; case 9: { yybegin(YYINITIAL); return COMMENT; } // fall through - case 79: + case 65: break; case 10: { yybegin(YYINITIAL); return EOL; } // fall through - case 80: + case 66: break; case 11: { - if (isAsmMnemonic(yytext())) { - yybegin(ASMINSTR); - return MNEMONIC; - } else { - return SYMBOL; - } - } - // fall through - case 81: - break; - case 12: { return SYMBOL; } // fall through - case 82: + case 67: break; - case 13: { + case 12: { yybegin(WAITEOL); return COMMENT; } // fall through - case 83: + case 68: break; - case 14: { + case 13: { yybegin(ASMOPS); return WHITE_SPACE; } // fall through - case 84: + case 69: break; - case 15: { + case 14: { return DECIMAL; } // fall through - case 85: + case 70: break; - case 16: { + case 15: { return OP_ASSIGN; } // fall through - case 86: + case 71: break; - case 17: { + case 16: { return OP_AR_MOD; } // fall through - case 87: + case 72: break; - case 18: { + case 17: { return OP_CMP_LT; } // fall through - case 88: + case 73: break; - case 19: { + case 18: { return OP_CMP_GT; } // fall through - case 89: + case 74: + break; + case 19: { + return SEPARATOR; + } + // fall through + case 75: break; case 20: { return HASH; } // fall through - case 90: + case 76: break; case 21: { return OP_BITWISE_AND; } // fall through - case 91: + case 77: break; case 22: { return OP_BITWISE_OR; } // fall through - case 92: + case 78: break; case 23: { return OP_UNARY_NOT; } // fall through - case 93: + case 79: break; case 24: { return OP_BITWISE_XOR; } // fall through - case 94: + case 80: break; case 25: { return ROUND_L; } // fall through - case 95: + case 81: break; case 26: { return ROUND_R; } // fall through - case 96: + case 82: break; case 27: { return OP_UNARY_COMPL; } // fall through - case 97: + case 83: break; case 28: { return OP_PLUS; } // fall through - case 98: + case 84: break; case 29: { return OP_MINUS; } // fall through - case 99: + case 85: break; case 30: { return OP_AR_MUL; } // fall through - case 100: + case 86: break; case 31: { return OP_AR_DIV; } // fall through - case 101: + case 87: break; case 32: { - return SEPARATOR; + yybegin(EXPR); + return OP_ASSIGN; } // fall through - case 102: + case 88: break; case 33: { yybegin(ASSIGNMENT); @@ -1008,230 +945,147 @@ public class _M68kLexer implements FlexLexer { return SYMBOLDEF; } // fall through - case 103: + case 89: break; case 34: { yybegin(INSTRPART); return LOCAL_LABEL_DEF; } // fall through - case 104: + case 90: break; case 35: { - return IF_TAG; - } - // fall through - case 105: - break; - case 36: { return OPSIZE_BS; } // fall through - case 106: + case 91: break; - case 37: { + case 36: { return OPSIZE_WL; } // fall through - case 107: + case 92: break; - case 38: { + case 37: { return AREG; } // fall through - case 108: + case 93: break; - case 39: { + case 38: { return REG_SR; } // fall through - case 109: + case 94: break; - case 40: { + case 39: { return PC; } // fall through - case 110: + case 95: break; - case 41: { + case 40: { return DREG; } // fall through - case 111: + case 96: break; - case 42: { + case 41: { return OP_CMP_EQ; } // fall through - case 112: + case 97: break; - case 43: { + case 42: { return HEXADECIMAL; } // fall through - case 113: + case 98: break; - case 44: { + case 43: { return BINARY; } // fall through - case 114: + case 99: break; - case 45: { + case 44: { return OCTAL; } // fall through - case 115: + case 100: break; - case 46: { + case 45: { return STRINGLIT; } // fall through - case 116: + case 101: break; - case 47: { + case 46: { return OP_CMP_LT_EQ; } // fall through - case 117: + case 102: break; - case 48: { + case 47: { return OP_AR_SHIFT_L; } // fall through - case 118: + case 103: + break; + case 48: { + return OP_CMP_NOT_EQ; + } + // fall through + case 104: break; case 49: { return OP_CMP_GT_EQ; } // fall through - case 119: + case 105: break; case 50: { return OP_AR_SHIFT_R; } // fall through - case 120: + case 106: break; case 51: { return OP_LOGICAL_AND; } // fall through - case 121: + case 107: break; case 52: { return OP_LOGICAL_OR; } // fall through - case 122: + case 108: break; case 53: { - return OP_CMP_NOT_EQ; - } - // fall through - case 123: - break; - case 54: { - return END_TAG; - } - // fall through - case 124: - break; - case 55: { return REG_USP; } // fall through - case 125: + case 109: break; - case 56: { + case 54: { return REG_CCR; } // fall through - case 126: + case 110: break; - case 57: { + case 55: { return REG_VBR; } // fall through - case 127: + case 111: break; - case 58: { + case 56: { + yybegin(EXPR); return EQU; } // fall through - case 128: - break; - case 59: { - return FAIL_TAG; - } - // fall through - case 129: - break; - case 60: { - return EVEN_TAG; - } - // fall through - case 130: - break; - case 61: { - return ENDC_TAG; - } - // fall through - case 131: - break; - case 62: { - return MACRO_END_TAG; - } - // fall through - case 132: - break; - case 63: { - return REPT_END_TAG; - } - // fall through - case 133: - break; - case 64: { - return ELSE_TAG; - } - // fall through - case 134: - break; - case 65: { - return CNOP_TAG; - } - // fall through - case 135: - break; - case 66: { - return REPT_TAG; - } - // fall through - case 136: - break; - case 67: { - return MACRO_TAG; - } - // fall through - case 137: - break; - case 68: { - return INCBIN_TAG; - } - // fall through - case 138: - break; - case 69: { - return INCLUDE_TAG; - } - // fall through - case 139: - break; - case 70: { - return SECTION_TAG; - } - // fall through - case 140: + case 112: 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 403d49d..a7fc3fb 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 @@ -380,25 +380,21 @@ public class M68kParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // AddressingMode (SEPARATOR AddressingMode)* - public static boolean AsmOperands(PsiBuilder b, int l) { + // AddressingMode (SEPARATOR AddressingMode)? + 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, ""); + Marker m = enter_section_(b); r = AddressingMode(b, l + 1); r = r && AsmOperands_1(b, l + 1); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, null, r); return r; } - // (SEPARATOR AddressingMode)* + // (SEPARATOR AddressingMode)? private static boolean AsmOperands_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "AsmOperands_1")) return false; - while (true) { - int c = current_position_(b); - if (!AsmOperands_1_0(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "AsmOperands_1", c)) break; - } + AsmOperands_1_0(b, l + 1); return true; } @@ -648,21 +644,7 @@ public class M68kParser implements PsiParser, LightPsiParser { } /* ********************************************************** */ - // SYMBOL? - // (END_TAG - // | EVEN_TAG - // | CNOP_TAG - // | SECTION_TAG - // | INCLUDE_TAG - // | INCBIN_TAG - // | IF_TAG - // | ELSE_TAG - // | ENDC_TAG - // | MACRO_TAG - // | MACRO_END_TAG - // | REPT_TAG - // | REPT_END_TAG - // | FAIL_TAG) + // Label? (DATA_DIRECTIVE | OTHER_DIRECTIVE) // PreprocessorOperands? public static boolean PreprocessorDirective(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "PreprocessorDirective")) return false; @@ -675,44 +657,19 @@ public class M68kParser implements PsiParser, LightPsiParser { return r; } - // SYMBOL? + // Label? private static boolean PreprocessorDirective_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "PreprocessorDirective_0")) return false; - consumeToken(b, SYMBOL); + Label(b, l + 1); return true; } - // END_TAG - // | EVEN_TAG - // | CNOP_TAG - // | SECTION_TAG - // | INCLUDE_TAG - // | INCBIN_TAG - // | IF_TAG - // | ELSE_TAG - // | ENDC_TAG - // | MACRO_TAG - // | MACRO_END_TAG - // | REPT_TAG - // | REPT_END_TAG - // | FAIL_TAG + // DATA_DIRECTIVE | OTHER_DIRECTIVE private static boolean PreprocessorDirective_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "PreprocessorDirective_1")) return false; boolean r; - r = consumeToken(b, END_TAG); - if (!r) r = consumeToken(b, EVEN_TAG); - if (!r) r = consumeToken(b, CNOP_TAG); - if (!r) r = consumeToken(b, SECTION_TAG); - if (!r) r = consumeToken(b, INCLUDE_TAG); - if (!r) r = consumeToken(b, INCBIN_TAG); - if (!r) r = consumeToken(b, IF_TAG); - if (!r) r = consumeToken(b, ELSE_TAG); - if (!r) r = consumeToken(b, ENDC_TAG); - if (!r) r = consumeToken(b, MACRO_TAG); - if (!r) r = consumeToken(b, MACRO_END_TAG); - if (!r) r = consumeToken(b, REPT_TAG); - if (!r) r = consumeToken(b, REPT_END_TAG); - if (!r) r = consumeToken(b, FAIL_TAG); + r = consumeToken(b, DATA_DIRECTIVE); + if (!r) r = consumeToken(b, OTHER_DIRECTIVE); return r; } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmInstruction.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmInstruction.java index 5b3f473..49b0882 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmInstruction.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmInstruction.java @@ -3,14 +3,15 @@ package de.platon42.intellij.plugins.m68k.psi; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; + +import java.util.List; public interface M68kAsmInstruction extends PsiElement { + @NotNull + List getAddressingModeList(); + @NotNull M68kAsmOp getAsmOp(); - @Nullable - M68kAsmOperands getAsmOperands(); - } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmOperands.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmOperands.java deleted file mode 100644 index 87b766f..0000000 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kAsmOperands.java +++ /dev/null @@ -1,14 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package de.platon42.intellij.plugins.m68k.psi; - -import com.intellij.psi.PsiElement; -import org.jetbrains.annotations.NotNull; - -import java.util.List; - -public interface M68kAsmOperands extends PsiElement { - - @NotNull - List getAddressingModeList(); - -} diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kPreprocessorDirective.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kPreprocessorDirective.java index 3672f24..51456be 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kPreprocessorDirective.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kPreprocessorDirective.java @@ -3,11 +3,15 @@ package de.platon42.intellij.plugins.m68k.psi; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.List; public interface M68kPreprocessorDirective extends PsiElement { + @Nullable + M68kLabel getLabel(); + @NotNull List getExprList(); diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java index 31933c9..2efd92b 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kTypes.java @@ -22,7 +22,6 @@ public interface M68kTypes { IElementType ADDRESS_SIZE = new M68kElementType("ADDRESS_SIZE"); IElementType ASM_INSTRUCTION = new M68kElementType("ASM_INSTRUCTION"); IElementType ASM_OP = new M68kElementType("ASM_OP"); - IElementType ASM_OPERANDS = new M68kElementType("ASM_OPERANDS"); IElementType ASSIGNMENT = new M68kElementType("ASSIGNMENT"); IElementType BINARY_ADD_EXPR = new M68kElementType("BINARY_ADD_EXPR"); IElementType BINARY_BITWISE_AND_EXPR = new M68kElementType("BINARY_BITWISE_AND_EXPR"); @@ -72,26 +71,16 @@ public interface M68kTypes { IElementType AREG = new M68kTokenType("AREG"); IElementType BINARY = new M68kTokenType("BINARY"); - IElementType CNOP_TAG = new M68kTokenType("CNOP_TAG"); IElementType COMMENT = new M68kTokenType("COMMENT"); + IElementType DATA_DIRECTIVE = new M68kTokenType("DATA_DIRECTIVE"); IElementType DECIMAL = new M68kTokenType("DECIMAL"); IElementType DREG = new M68kTokenType("DREG"); - IElementType ELSE_TAG = new M68kTokenType("ELSE_TAG"); - IElementType ENDC_TAG = new M68kTokenType("ENDC_TAG"); - IElementType END_TAG = new M68kTokenType("END_TAG"); IElementType EOL = new M68kTokenType("EOL"); IElementType EQU = new M68kTokenType("EQU"); - IElementType EVEN_TAG = new M68kTokenType("EVEN_TAG"); - IElementType FAIL_TAG = new M68kTokenType("FAIL_TAG"); IElementType GLOBAL_LABEL_DEF = new M68kTokenType("GLOBAL_LABEL_DEF"); IElementType HASH = new M68kTokenType("HASH"); IElementType HEXADECIMAL = new M68kTokenType("HEXADECIMAL"); - IElementType IF_TAG = new M68kTokenType("IF_TAG"); - IElementType INCBIN_TAG = new M68kTokenType("INCBIN_TAG"); - IElementType INCLUDE_TAG = new M68kTokenType("INCLUDE_TAG"); IElementType LOCAL_LABEL_DEF = new M68kTokenType("LOCAL_LABEL_DEF"); - IElementType MACRO_END_TAG = new M68kTokenType("MACRO_END_TAG"); - IElementType MACRO_TAG = new M68kTokenType("MACRO_TAG"); IElementType MNEMONIC = new M68kTokenType("MNEMONIC"); IElementType OCTAL = new M68kTokenType("OCTAL"); IElementType OPSIZE_BS = new M68kTokenType("OPSIZE_BS"); @@ -117,16 +106,14 @@ public interface M68kTypes { IElementType OP_PLUS = new M68kTokenType("OP_PLUS"); IElementType OP_UNARY_COMPL = new M68kTokenType("OP_UNARY_COMPL"); IElementType OP_UNARY_NOT = new M68kTokenType("OP_UNARY_NOT"); + IElementType OTHER_DIRECTIVE = new M68kTokenType("OTHER_DIRECTIVE"); IElementType PC = new M68kTokenType("PC"); IElementType REG_CCR = new M68kTokenType("REG_CCR"); IElementType REG_SR = new M68kTokenType("REG_SR"); IElementType REG_USP = new M68kTokenType("REG_USP"); IElementType REG_VBR = new M68kTokenType("REG_VBR"); - IElementType REPT_END_TAG = new M68kTokenType("REPT_END_TAG"); - IElementType REPT_TAG = new M68kTokenType("REPT_TAG"); IElementType ROUND_L = new M68kTokenType("ROUND_L"); IElementType ROUND_R = new M68kTokenType("ROUND_R"); - IElementType SECTION_TAG = new M68kTokenType("SECTION_TAG"); IElementType SEPARATOR = new M68kTokenType("SEPARATOR"); IElementType STRINGLIT = new M68kTokenType("STRINGLIT"); IElementType SYMBOL = new M68kTokenType("SYMBOL"); @@ -161,8 +148,6 @@ public interface M68kTypes { return new M68kAsmInstructionImpl(node); } else if (type == ASM_OP) { return new M68kAsmOpImpl(node); - } else if (type == ASM_OPERANDS) { - return new M68kAsmOperandsImpl(node); } else if (type == ASSIGNMENT) { return new M68kAssignmentImpl(node); } else if (type == BINARY_ADD_EXPR) { diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kVisitor.java index 4421d1e..4cc698f 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 @@ -63,10 +63,6 @@ public class M68kVisitor extends PsiElementVisitor { visitPsiElement(o); } - public void visitAsmOperands(@NotNull M68kAsmOperands o) { - visitPsiElement(o); - } - public void visitAssignment(@NotNull M68kAssignment o) { visitPsiElement(o); } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmInstructionImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmInstructionImpl.java index 2db3104..02820b3 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmInstructionImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmInstructionImpl.java @@ -4,12 +4,14 @@ package de.platon42.intellij.plugins.m68k.psi.impl; import com.intellij.extapi.psi.ASTWrapperPsiElement; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.util.PsiTreeUtil; +import de.platon42.intellij.plugins.m68k.psi.M68kAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kAsmInstruction; import de.platon42.intellij.plugins.m68k.psi.M68kAsmOp; -import de.platon42.intellij.plugins.m68k.psi.M68kAsmOperands; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; + +import java.util.List; public class M68kAsmInstructionImpl extends ASTWrapperPsiElement implements M68kAsmInstruction { @@ -27,16 +29,16 @@ public class M68kAsmInstructionImpl extends ASTWrapperPsiElement implements M68k else super.accept(visitor); } + @Override + @NotNull + public List getAddressingModeList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kAddressingMode.class); + } + @Override @NotNull public M68kAsmOp getAsmOp() { return findNotNullChildByClass(M68kAsmOp.class); } - @Override - @Nullable - public M68kAsmOperands getAsmOperands() { - return findChildByClass(M68kAsmOperands.class); - } - } diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kPreprocessorDirectiveImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kPreprocessorDirectiveImpl.java index 3fd41c0..0bd82cf 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kPreprocessorDirectiveImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kPreprocessorDirectiveImpl.java @@ -6,9 +6,11 @@ import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.util.PsiTreeUtil; import de.platon42.intellij.plugins.m68k.psi.M68kExpr; +import de.platon42.intellij.plugins.m68k.psi.M68kLabel; import de.platon42.intellij.plugins.m68k.psi.M68kPreprocessorDirective; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.List; @@ -28,6 +30,12 @@ public class M68kPreprocessorDirectiveImpl extends ASTWrapperPsiElement implemen else super.accept(visitor); } + @Override + @Nullable + public M68kLabel getLabel() { + return findChildByClass(M68kLabel.class); + } + @Override @NotNull public List getExprList() { diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmOperandsImpl.java b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kRegisterListAddressingModeImpl.java similarity index 56% rename from src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmOperandsImpl.java rename to src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kRegisterListAddressingModeImpl.java index 031d76f..99accf6 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kAsmOperandsImpl.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kRegisterListAddressingModeImpl.java @@ -1,25 +1,25 @@ // This is a generated file. Not intended for manual editing. package de.platon42.intellij.plugins.m68k.psi.impl; -import com.intellij.extapi.psi.ASTWrapperPsiElement; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.util.PsiTreeUtil; -import de.platon42.intellij.plugins.m68k.psi.M68kAddressingMode; -import de.platon42.intellij.plugins.m68k.psi.M68kAsmOperands; +import de.platon42.intellij.plugins.m68k.psi.M68kRegister; +import de.platon42.intellij.plugins.m68k.psi.M68kRegisterListAddressingMode; import de.platon42.intellij.plugins.m68k.psi.M68kVisitor; import org.jetbrains.annotations.NotNull; import java.util.List; -public class M68kAsmOperandsImpl extends ASTWrapperPsiElement implements M68kAsmOperands { +public class M68kRegisterListAddressingModeImpl extends M68kAddressingModeImpl implements M68kRegisterListAddressingMode { - public M68kAsmOperandsImpl(@NotNull ASTNode node) { + public M68kRegisterListAddressingModeImpl(@NotNull ASTNode node) { super(node); } + @Override public void accept(@NotNull M68kVisitor visitor) { - visitor.visitAsmOperands(this); + visitor.visitRegisterListAddressingMode(this); } @Override @@ -30,8 +30,8 @@ public class M68kAsmOperandsImpl extends ASTWrapperPsiElement implements M68kAsm @Override @NotNull - public List getAddressingModeList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kAddressingMode.class); + public List getRegisterList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kRegister.class); } } diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/asm/AssemblerDirectives.kt b/src/main/java/de/platon42/intellij/plugins/m68k/asm/AssemblerDirectives.kt new file mode 100644 index 0000000..6f0a1f0 --- /dev/null +++ b/src/main/java/de/platon42/intellij/plugins/m68k/asm/AssemblerDirectives.kt @@ -0,0 +1,46 @@ +package de.platon42.intellij.plugins.m68k.asm + +object AssemblerDirectives { + + val dataDirectives: Set = setOf( + "section", "pushsection", "popsection", + "bss", "bss_c", "bss_f", + "data", "data_c", "data_f", + "text", "cseg", "code", "code_c", "code_f", + "offset", + + "abs", + "db", "dw", "dl", + "dr.b", "dr.w", "dr.l", + "dc", "dc.b", "dc.w", "dc.l", "dcb", "dcb.b", "dcb.w", "dcb.l", + "blk.b", "blk.w", "blk.l", + "ds", "ds.b", "ds.w", "ds.l", + + "align", "even", "odd", "cnop", "long", "dphrase", "phrase", "qphrase", + + "cargs", "comm", "comment", + "rsset", "clrfo", "clrso", "setfo", "setso" + ) + + val otherDirective: Set = setOf( + "if", + "ifeq", "ifne", "ifgt", "ifge", "iflt", "ifle", "ifb", "ifnb", "ifc", "ifnc", + "ifd", "ifnd", "ifmacrod", "ifmacrond", + //"iif" // not supported + "else", "endif", "endc", + + "macro", "exitm", "mexit", + + "extern", "nref", "xdef", "xref", "globl", "public", "weak", + + "incdir", "include", "incbin", "output", + + "list", "nlist", "nolist", "llen", "nopage", "page", "spc", + "org", + + "assert", "fail", "print", "printt", "printv", "echo", + + "inline", "einline", + "rem", "erem" + ) +} \ No newline at end of file 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 17d1906..f374e7a 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 @@ -1,5 +1,6 @@ package de.platon42.intellij.plugins.m68k.lexer +import de.platon42.intellij.plugins.m68k.asm.AssemblerDirectives import de.platon42.intellij.plugins.m68k.asm.M68kIsa.mnemonics object LexerUtil { @@ -9,12 +10,23 @@ object LexerUtil { @JvmStatic fun isAsmMnemonic(text: CharSequence) = mnemonics.contains(text.toString().lowercase()) + @JvmStatic + fun isAsmMnemonicWithSize(text: CharSequence) = text.contains('.') + && text.dropLast(1).endsWith('.') + && mnemonics.contains(text.dropLast(2).toString().lowercase()) + + @JvmStatic + fun isDataDirective(text: CharSequence) = AssemblerDirectives.dataDirectives.contains(text.toString().lowercase()) + + @JvmStatic + fun isOtherDirective(text: CharSequence) = AssemblerDirectives.otherDirective.contains(text.toString().lowercase()) + @JvmStatic fun pushbackAssignment(text: CharSequence): Int { val spacePos = text.indexOfAny(ASSIGNMENT_SEPARATORS) if (spacePos > -1) { return text.length - spacePos } - return text.length - 1 - text.indexOf('=') + return text.length - 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 c75f8bc..347a709 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 @@ -24,12 +24,8 @@ import static de.platon42.intellij.plugins.m68k.lexer.LexerUtil.*; %unicode %ignorecase -EOL=\R -WHITE_SPACE=\s+ - EOL=\R WHITE_SPACE=\p{Blank}+ -IF_TAG=(if[:letter:]*) AREG=((a[0-7])|sp) DREG=(d[0-7]) ASSIGNMENT=(([:letter:]|_)(([:letter:]|[:digit:])|_)*((\p{Blank}+equ\p{Blank}+)|(\p{Blank}+set\p{Blank}+)|\p{Blank}*=\p{Blank}*)) @@ -37,19 +33,21 @@ LOCAL_LABEL=(\.([:letter:]|_)(([:letter:]|[:digit:])|_)*:?)|(([:letter:]|_)(([:l LOCAL_LABEL_WC=(\.([:letter:]|_)(([:letter:]|[:digit:])|_)*:)|(([:letter:]|_)(([:letter:]|[:digit:])|_)*\$:) GLOBAL_LABEL=(([:letter:]|_)(([:letter:]|[:digit:])|_)*:?:?) GLOBAL_LABEL_WC=(([:letter:]|_)(([:letter:]|[:digit:])|_)*::?) -MNEMONIC=(([:letter:])+) +//MNEMONIC=(([:letter:])+) SYMBOL=(([:letter:]|_|\.)(([:letter:]|[:digit:])|[_\$])*) +DIRECTIVE_KEYWORD=(([:letter:])(([:letter:]))*)(\..)? OPSIZE_BS=(\.[bs]) OPSIZE_WL=(\.[wl]) BINARY=(%[01]+) HEXADECIMAL=(\$[0-9a-f]+) OCTAL=(@[0-7]+) DECIMAL=([0-9]+) -STRINGLIT=(`([^`\\]|\\.)*`|'([^'\\]|\\.)*'|\"([^\"\\]|\\.)*\")|<([^`\\]|\\.)*> +STRINGLIT=(`([^`\\]|\\.)*`|'([^'\\]|\\.)*'|\"([^\"\\]|\\.)*\") +PLAINPARAM=(`([^`\\]|\\.)*`|'([^'\\]|\\.)*'|\"([^\"\\]|\\.)*\")|<([^>\\]|\\.)*>|([^,;\p{Blank}\r\n])+ // why does \R not work, I have no idea COMMENT=([;].*+) HASH_COMMENT=([#;*].*+) -%state NOSOL,INSTRPART,ASMINSTR,ASMOPS,ASSIGNMENT,WAITEOL +%state NOSOL,INSTRPART,ASMINSTR,ASMOPS,ASSIGNMENT,EXPR,MACROCALL,WAITEOL %% { @@ -67,9 +65,15 @@ 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} { if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } else { yybegin(INSTRPART); return SYMBOL; } } + {DIRECTIVE_KEYWORD} { + if(isAsmMnemonicWithSize(yytext())) { yybegin(ASMINSTR); yypushback(2); return MNEMONIC; } + if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } + if(isDataDirective(yytext())) { yybegin(EXPR); return DATA_DIRECTIVE; } + if(isOtherDirective(yytext())) { yybegin(EXPR); return OTHER_DIRECTIVE; } + yybegin(INSTRPART); 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; } } @@ -77,23 +81,14 @@ HASH_COMMENT=([#;*].*+) {WHITE_SPACE} { return WHITE_SPACE; } {EOL} { yybegin(YYINITIAL); return EOL; } - "even" { return EVEN_TAG; } - "cnop" { return CNOP_TAG; } - "section" { return SECTION_TAG; } - "include" { return INCLUDE_TAG; } - "incbin" { return INCBIN_TAG; } - "else" { return ELSE_TAG; } - "endc" { return ENDC_TAG; } - "macro" { return MACRO_TAG; } - "endm" { return MACRO_END_TAG; } - "rept" { return REPT_TAG; } - "endr" { return REPT_END_TAG; } - "fail" { return FAIL_TAG; } - "end" { return END_TAG; } - - {IF_TAG} { return IF_TAG; } - - {MNEMONIC} { if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } else { return SYMBOL; } } + {DIRECTIVE_KEYWORD} { + if(isAsmMnemonicWithSize(yytext())) { yybegin(ASMINSTR); yypushback(2); return MNEMONIC; } + if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } + if(isDataDirective(yytext())) { yybegin(EXPR); return DATA_DIRECTIVE; } + if(isOtherDirective(yytext())) { yybegin(EXPR); return OTHER_DIRECTIVE; } + yybegin(INSTRPART); return SYMBOL; + } +// {MNEMONIC} { if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } else { return SYMBOL; } } {SYMBOL} { return SYMBOL; } {COMMENT} { yybegin(WAITEOL); return COMMENT; } @@ -109,7 +104,29 @@ HASH_COMMENT=([#;*].*+) {COMMENT} { yybegin(WAITEOL); return COMMENT; } } + { + {WHITE_SPACE} { return WHITE_SPACE; } // FIXME space optionally introduces comment + {EOL} { yybegin(YYINITIAL); return EOL; } + + {COMMENT} { yybegin(WAITEOL); return COMMENT; } + + "," { return SEPARATOR; } + + {PLAINPARAM} { return SYMBOL; } +} + { + {WHITE_SPACE} { return WHITE_SPACE; } + {EOL} { yybegin(YYINITIAL); return EOL; } + + "equ"|"set" { yybegin(EXPR); return EQU; } + + "=" { yybegin(EXPR); return OP_ASSIGN; } + + {COMMENT} { yybegin(WAITEOL); return COMMENT; } +} + + { {WHITE_SPACE} { return WHITE_SPACE; } // FIXME space optionally introduces comment {EOL} { yybegin(YYINITIAL); return EOL; } @@ -119,9 +136,6 @@ HASH_COMMENT=([#;*].*+) {DECIMAL} { return DECIMAL; } {STRINGLIT} { return STRINGLIT; } - "equ" { return EQU; } - "set" { return EQU; } - "<<" { return OP_AR_SHIFT_L; } ">>" { return OP_AR_SHIFT_R; } "&&" { return OP_LOGICAL_AND; } @@ -140,6 +154,7 @@ HASH_COMMENT=([#;*].*+) // ";" { return SEMICOLON; } // "[" { return SQUARE_L; } // "]" { return SQUARE_R; } + "," { return SEPARATOR; } "(" { return ROUND_L; } ")" { return ROUND_R; } // "." { return DOT; } 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 d6fa404..34d4854 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf +++ b/src/main/java/de/platon42/intellij/plugins/m68k/m68k.bnf @@ -144,21 +144,7 @@ DataWidth ::= OPSIZE_WL AsmOp ::= MNEMONIC OperandSize? -PreprocessorDirective ::= SYMBOL? - (END_TAG - | EVEN_TAG - | CNOP_TAG - | SECTION_TAG - | INCLUDE_TAG - | INCBIN_TAG - | IF_TAG - | ELSE_TAG - | ENDC_TAG - | MACRO_TAG - | MACRO_END_TAG - | REPT_TAG - | REPT_END_TAG - | FAIL_TAG) +PreprocessorDirective ::= Label? (DATA_DIRECTIVE | OTHER_DIRECTIVE) PreprocessorOperands? MacroCall ::= SYMBOL PreprocessorOperands? @@ -166,7 +152,7 @@ AsmInstruction ::= AsmOp AsmOperands? private Instruction ::= AsmInstruction | MacroCall //external Instruction ::= parseMacroCallOrAsmInstruction -AsmOperands ::= AddressingMode (SEPARATOR AddressingMode)* +private AsmOperands ::= AddressingMode (SEPARATOR AddressingMode)? private PreprocessorOperands ::= PreprocessorOperand (SEPARATOR PreprocessorOperand)* diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/parser/AssignmentTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/parser/AssignmentTest.kt new file mode 100644 index 0000000..5ea05ab --- /dev/null +++ b/src/test/java/de/platon42/intellij/plugins/m68k/parser/AssignmentTest.kt @@ -0,0 +1,30 @@ +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("assignment") +internal class AssignmentTest : AbstractParsingTest() { + + @Test + internal fun assignment_via_equals_with_spaces(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "FOO = 123+10\n") + } + + @Test + internal fun assignment_via_equals_without_spaces(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "FOO=123+10\n") + } + + @Test + internal fun assignment_via_equ(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "FOO equ BAR\n") + } + + @Test + internal fun assignment_via_set(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "FOO set BAR\n") + } +} \ No newline at end of file diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/parser/DataDirectivesTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/parser/DataDirectivesTest.kt new file mode 100644 index 0000000..21fa9bb --- /dev/null +++ b/src/test/java/de/platon42/intellij/plugins/m68k/parser/DataDirectivesTest.kt @@ -0,0 +1,25 @@ +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("directives") +internal class DataDirectivesTest : AbstractParsingTest() { + + @Test + internal fun dc_w_with_some_numbers(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " dc.w 0,1,2,3,4,5\n") + } + + @Test + internal fun dc_b_with_strings_and_global_label(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "foo: dc.b 'It could be good!',10,\"Don't ya think?\",10,0\n") + } + + @Test + internal fun even(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "\teven ; align to even address\n") + } +} \ No newline at end of file diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/parser/OtherDirectivesTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/parser/OtherDirectivesTest.kt new file mode 100644 index 0000000..53b0720 --- /dev/null +++ b/src/test/java/de/platon42/intellij/plugins/m68k/parser/OtherDirectivesTest.kt @@ -0,0 +1,20 @@ +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("directives") +internal class OtherDirectivesTest : AbstractParsingTest() { + + @Test + internal fun include_file(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, " include \"exec/execbase.i\"\n") + } + + @Test + internal fun if_defined_block(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) { + testGoodSyntax(testCase, "\tIFD DEBUG ; cause a crash\n illegal\n ENDC\n") + } +} \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/absolute_address.txt b/src/test/resources/parser/addressingmodes/absolute_address.txt index 4482e6a..d71e7b1 100644 --- a/src/test/resources/parser/addressingmodes/absolute_address.txt +++ b/src/test/resources/parser/addressingmodes/absolute_address.txt @@ -7,14 +7,13 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - M68kAddressSizeImpl(ADDRESS_SIZE) - PsiElement(M68kTokenType.OPSIZE_WL)('.w') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterDirectAddressingModeImpl(ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE) - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a6') + M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + M68kAddressSizeImpl(ADDRESS_SIZE) + PsiElement(M68kTokenType.OPSIZE_WL)('.w') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterDirectAddressingModeImpl(ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a6') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/immediate_data.txt b/src/test/resources/parser/addressingmodes/immediate_data.txt index 88586fd..63c01f7 100644 --- a/src/test/resources/parser/addressingmodes/immediate_data.txt +++ b/src/test/resources/parser/addressingmodes/immediate_data.txt @@ -7,13 +7,12 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kImmediateDataImpl(IMMEDIATE_DATA) - PsiElement(M68kTokenType.HASH)('#') - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('FOO_BAR') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d0') + M68kImmediateDataImpl(IMMEDIATE_DATA) + PsiElement(M68kTokenType.HASH)('#') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('FOO_BAR') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/movem_register_list.txt b/src/test/resources/parser/addressingmodes/movem_register_list.txt index 6099653..3681056 100644 --- a/src/test/resources/parser/addressingmodes/movem_register_list.txt +++ b/src/test/resources/parser/addressingmodes/movem_register_list.txt @@ -7,30 +7,29 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kRegisterListAddressingModeImpl(REGISTER_LIST_ADDRESSING_MODE) - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d0') - PsiElement(M68kTokenType.OP_MINUS)('-') - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d2') - PsiElement(M68kTokenType.OP_AR_DIV)('/') - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d4') - PsiElement(M68kTokenType.OP_AR_DIV)('/') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a0') - PsiElement(M68kTokenType.OP_MINUS)('-') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a2') - PsiElement(M68kTokenType.OP_AR_DIV)('/') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a4') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterIndirectPreDecAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_PRE_DEC_ADDRESSING_MODE) - PsiElement(M68kTokenType.OP_MINUS)('-') - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('sp') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kRegisterListAddressingModeImpl(REGISTER_LIST_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d2') + PsiElement(M68kTokenType.OP_AR_DIV)('/') + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d4') + PsiElement(M68kTokenType.OP_AR_DIV)('/') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a2') + PsiElement(M68kTokenType.OP_AR_DIV)('/') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a4') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterIndirectPreDecAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_PRE_DEC_ADDRESSING_MODE) + PsiElement(M68kTokenType.OP_MINUS)('-') + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('sp') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_indirect_special_case_without_offset.txt b/src/test/resources/parser/addressingmodes/pc_indirect_special_case_without_offset.txt index 743c1c3..189face 100644 --- a/src/test/resources/parser/addressingmodes/pc_indirect_special_case_without_offset.txt +++ b/src/test/resources/parser/addressingmodes/pc_indirect_special_case_without_offset.txt @@ -7,13 +7,12 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d6') + M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d6') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_indirect_with_index_and_offset_new_syntax.txt b/src/test/resources/parser/addressingmodes/pc_indirect_with_index_and_offset_new_syntax.txt index ccc2289..3f4ca11 100644 --- a/src/test/resources/parser/addressingmodes/pc_indirect_with_index_and_offset_new_syntax.txt +++ b/src/test/resources/parser/addressingmodes/pc_indirect_with_index_and_offset_new_syntax.txt @@ -7,45 +7,44 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('foo') + PsiElement(M68kTokenType.SEPARATOR)(',') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kParenExprImpl(PAREN_EXPR) PsiElement(M68kTokenType.ROUND_L)('(') M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) - PsiElement(M68kTokenType.OP_MINUS)('-') + M68kBinaryMulExprImpl(BINARY_MUL_EXPR) M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('20') PsiElement(M68kTokenType.OP_PLUS)('+') - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('foo') - PsiElement(M68kTokenType.SEPARATOR)(',') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a0') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.SEPARATOR)(',') - M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kParenExprImpl(PAREN_EXPR) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kBinaryMulExprImpl(BINARY_MUL_EXPR) - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('10') - PsiElement(M68kTokenType.OP_AR_MUL)('*') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('20') - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d5') - M68kDataWidthImpl(DATA_WIDTH) - PsiElement(M68kTokenType.OPSIZE_WL)('.l') - PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d5') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_WL)('.l') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_indirect_with_index_and_offset_old_syntax.txt b/src/test/resources/parser/addressingmodes/pc_indirect_with_index_and_offset_old_syntax.txt index 582a8ae..75d2684 100644 --- a/src/test/resources/parser/addressingmodes/pc_indirect_with_index_and_offset_old_syntax.txt +++ b/src/test/resources/parser/addressingmodes/pc_indirect_with_index_and_offset_old_syntax.txt @@ -7,43 +7,42 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kProgramCounterIndirectWithIndexOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) - PsiElement(M68kTokenType.OP_MINUS)('-') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('foo') - PsiElement(M68kTokenType.ROUND_L)('(') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d0') - M68kDataWidthImpl(DATA_WIDTH) - PsiElement(M68kTokenType.OPSIZE_WL)('.w') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kProgramCounterIndirectWithIndexOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('foo') + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.PC)('pc') PsiElement(M68kTokenType.SEPARATOR)(',') - M68kProgramCounterIndirectWithIndexOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) - M68kParenExprImpl(PAREN_EXPR) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kBinaryMulExprImpl(BINARY_MUL_EXPR) - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('10') - PsiElement(M68kTokenType.OP_AR_MUL)('*') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('20') - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_WL)('.w') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kProgramCounterIndirectWithIndexOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) + M68kParenExprImpl(PAREN_EXPR) PsiElement(M68kTokenType.ROUND_L)('(') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a3') + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kBinaryMulExprImpl(BINARY_MUL_EXPR) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('20') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a3') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_indirect_with_index_special_case_without_offset.txt b/src/test/resources/parser/addressingmodes/pc_indirect_with_index_special_case_without_offset.txt index fe07180..0d7cd60 100644 --- a/src/test/resources/parser/addressingmodes/pc_indirect_with_index_special_case_without_offset.txt +++ b/src/test/resources/parser/addressingmodes/pc_indirect_with_index_special_case_without_offset.txt @@ -7,22 +7,21 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d0') - M68kDataWidthImpl(DATA_WIDTH) - PsiElement(M68kTokenType.OPSIZE_WL)('.w') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.PC)('pc') PsiElement(M68kTokenType.SEPARATOR)(',') - M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a3') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_WL)('.w') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a3') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_indirect_with_offset_new_syntax.txt b/src/test/resources/parser/addressingmodes/pc_indirect_with_offset_new_syntax.txt index 18e4712..cea3cbb 100644 --- a/src/test/resources/parser/addressingmodes/pc_indirect_with_offset_new_syntax.txt +++ b/src/test/resources/parser/addressingmodes/pc_indirect_with_offset_new_syntax.txt @@ -7,40 +7,39 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE) + M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kParenExprImpl(PAREN_EXPR) PsiElement(M68kTokenType.ROUND_L)('(') - M68kParenExprImpl(PAREN_EXPR) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) - PsiElement(M68kTokenType.OP_MINUS)('-') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('foo') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kParenExprImpl(PAREN_EXPR) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kBinaryMulExprImpl(BINARY_MUL_EXPR) - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('10') - PsiElement(M68kTokenType.OP_AR_MUL)('*') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('20') - PsiElement(M68kTokenType.OP_PLUS)('+') + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') M68kLiteralExprImpl(LITERAL_EXPR) PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('foo') PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kParenExprImpl(PAREN_EXPR) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kBinaryMulExprImpl(BINARY_MUL_EXPR) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('20') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/pc_indirect_with_offset_old_syntax.txt b/src/test/resources/parser/addressingmodes/pc_indirect_with_offset_old_syntax.txt index 82d53e8..35b46ec 100644 --- a/src/test/resources/parser/addressingmodes/pc_indirect_with_offset_old_syntax.txt +++ b/src/test/resources/parser/addressingmodes/pc_indirect_with_offset_old_syntax.txt @@ -7,26 +7,25 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) - M68kBinaryMulExprImpl(BINARY_MUL_EXPR) - M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) - PsiElement(M68kTokenType.OP_MINUS)('-') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) + M68kBinaryMulExprImpl(BINARY_MUL_EXPR) + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') M68kLiteralExprImpl(LITERAL_EXPR) PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.ROUND_L)('(') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) - M68kUnaryPlusExprImpl(UNARY_PLUS_EXPR) - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.ROUND_L)('(') - PsiElement(M68kTokenType.PC)('pc') - PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) + M68kUnaryPlusExprImpl(UNARY_PLUS_EXPR) + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.ROUND_L)('(') + PsiElement(M68kTokenType.PC)('pc') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/register_direct.txt b/src/test/resources/parser/addressingmodes/register_direct.txt index 583884d..01d10d2 100644 --- a/src/test/resources/parser/addressingmodes/register_direct.txt +++ b/src/test/resources/parser/addressingmodes/register_direct.txt @@ -7,12 +7,11 @@ Assembly File: a.asm 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.SEPARATOR)(',') - M68kAddressRegisterDirectAddressingModeImpl(ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE) - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a7') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterDirectAddressingModeImpl(ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a7') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/register_indirect.txt b/src/test/resources/parser/addressingmodes/register_indirect.txt index a6fc9f5..00345ed 100644 --- a/src/test/resources/parser/addressingmodes/register_indirect.txt +++ b/src/test/resources/parser/addressingmodes/register_indirect.txt @@ -7,16 +7,15 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAddressRegisterIndirectAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('sp') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterIndirectAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a0') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kAddressRegisterIndirectAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('sp') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterIndirectAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/register_indirect_predecrement_postincrement.txt b/src/test/resources/parser/addressingmodes/register_indirect_predecrement_postincrement.txt index 545605c..a819050 100644 --- a/src/test/resources/parser/addressingmodes/register_indirect_predecrement_postincrement.txt +++ b/src/test/resources/parser/addressingmodes/register_indirect_predecrement_postincrement.txt @@ -7,18 +7,17 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAddressRegisterIndirectPostIncAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a1') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.OP_PLUS)('+') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterIndirectPreDecAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_PRE_DEC_ADDRESSING_MODE) - PsiElement(M68kTokenType.OP_MINUS)('-') - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('sp') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kAddressRegisterIndirectPostIncAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.OP_PLUS)('+') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterIndirectPreDecAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_PRE_DEC_ADDRESSING_MODE) + PsiElement(M68kTokenType.OP_MINUS)('-') + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('sp') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/register_indirect_with_index_and_offset_new_syntax.txt b/src/test/resources/parser/addressingmodes/register_indirect_with_index_and_offset_new_syntax.txt index 1908f19..c40145b 100644 --- a/src/test/resources/parser/addressingmodes/register_indirect_with_index_and_offset_new_syntax.txt +++ b/src/test/resources/parser/addressingmodes/register_indirect_with_index_and_offset_new_syntax.txt @@ -7,47 +7,46 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('foo') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('sp') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kParenExprImpl(PAREN_EXPR) PsiElement(M68kTokenType.ROUND_L)('(') M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) - PsiElement(M68kTokenType.OP_MINUS)('-') + M68kBinaryMulExprImpl(BINARY_MUL_EXPR) M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('20') PsiElement(M68kTokenType.OP_PLUS)('+') - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('foo') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('sp') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a0') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kParenExprImpl(PAREN_EXPR) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kBinaryMulExprImpl(BINARY_MUL_EXPR) - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('10') - PsiElement(M68kTokenType.OP_AR_MUL)('*') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('20') - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a1') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d5') - M68kDataWidthImpl(DATA_WIDTH) - PsiElement(M68kTokenType.OPSIZE_WL)('.l') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d5') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_WL)('.l') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/register_indirect_with_index_and_offset_old_syntax.txt b/src/test/resources/parser/addressingmodes/register_indirect_with_index_and_offset_old_syntax.txt index b6f6ca3..1448a1a 100644 --- a/src/test/resources/parser/addressingmodes/register_indirect_with_index_and_offset_old_syntax.txt +++ b/src/test/resources/parser/addressingmodes/register_indirect_with_index_and_offset_old_syntax.txt @@ -7,45 +7,44 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) - PsiElement(M68kTokenType.OP_MINUS)('-') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('foo') - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('sp') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d0') - M68kDataWidthImpl(DATA_WIDTH) - PsiElement(M68kTokenType.OPSIZE_WL)('.w') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('foo') + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('sp') PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) - M68kParenExprImpl(PAREN_EXPR) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kBinaryMulExprImpl(BINARY_MUL_EXPR) - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('10') - PsiElement(M68kTokenType.OP_AR_MUL)('*') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('20') - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_WL)('.w') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterIndirectWithIndexOldAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) + M68kParenExprImpl(PAREN_EXPR) PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a1') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a3') + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kBinaryMulExprImpl(BINARY_MUL_EXPR) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('20') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a3') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/register_indirect_with_index_special_case_without_offset.txt b/src/test/resources/parser/addressingmodes/register_indirect_with_index_special_case_without_offset.txt index 319a991..19338fa 100644 --- a/src/test/resources/parser/addressingmodes/register_indirect_with_index_special_case_without_offset.txt +++ b/src/test/resources/parser/addressingmodes/register_indirect_with_index_special_case_without_offset.txt @@ -7,24 +7,23 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('sp') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d0') - M68kDataWidthImpl(DATA_WIDTH) - PsiElement(M68kTokenType.OPSIZE_WL)('.w') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('sp') PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a1') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a3') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + M68kDataWidthImpl(DATA_WIDTH) + PsiElement(M68kTokenType.OPSIZE_WL)('.w') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a3') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/register_indirect_with_offset_new_syntax.txt b/src/test/resources/parser/addressingmodes/register_indirect_with_offset_new_syntax.txt index 4d2059b..a6eb175 100644 --- a/src/test/resources/parser/addressingmodes/register_indirect_with_offset_new_syntax.txt +++ b/src/test/resources/parser/addressingmodes/register_indirect_with_offset_new_syntax.txt @@ -7,39 +7,38 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE) + M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('foo') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('sp') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kParenExprImpl(PAREN_EXPR) PsiElement(M68kTokenType.ROUND_L)('(') M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) - PsiElement(M68kTokenType.OP_MINUS)('-') + M68kBinaryMulExprImpl(BINARY_MUL_EXPR) M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('20') PsiElement(M68kTokenType.OP_PLUS)('+') - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('foo') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('sp') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kParenExprImpl(PAREN_EXPR) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kBinaryMulExprImpl(BINARY_MUL_EXPR) - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('10') - PsiElement(M68kTokenType.OP_AR_MUL)('*') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('20') - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a1') - PsiElement(M68kTokenType.ROUND_R)(')') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/register_indirect_with_offset_old_syntax.txt b/src/test/resources/parser/addressingmodes/register_indirect_with_offset_old_syntax.txt index d574072..6b1e7f1 100644 --- a/src/test/resources/parser/addressingmodes/register_indirect_with_offset_old_syntax.txt +++ b/src/test/resources/parser/addressingmodes/register_indirect_with_offset_old_syntax.txt @@ -7,37 +7,36 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) + M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('foo') + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('sp') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) + M68kParenExprImpl(PAREN_EXPR) + PsiElement(M68kTokenType.ROUND_L)('(') M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kUnaryMinusExprImpl(UNARY_MINUS_EXPR) - PsiElement(M68kTokenType.OP_MINUS)('-') + M68kBinaryMulExprImpl(BINARY_MUL_EXPR) M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.OP_AR_MUL)('*') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('20') PsiElement(M68kTokenType.OP_PLUS)('+') - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('foo') - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('sp') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) - M68kParenExprImpl(PAREN_EXPR) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kBinaryAddExprImpl(BINARY_ADD_EXPR) - M68kBinaryMulExprImpl(BINARY_MUL_EXPR) - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('10') - PsiElement(M68kTokenType.OP_AR_MUL)('*') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('20') - PsiElement(M68kTokenType.OP_PLUS)('+') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('4') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a1') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.ROUND_R)(')') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/addressingmodes/special_register_move.txt b/src/test/resources/parser/addressingmodes/special_register_move.txt index 460fcde..a7a784c 100644 --- a/src/test/resources/parser/addressingmodes/special_register_move.txt +++ b/src/test/resources/parser/addressingmodes/special_register_move.txt @@ -7,14 +7,13 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kSpecialRegisterDirectAddressingModeImpl(SPECIAL_REGISTER_DIRECT_ADDRESSING_MODE) - M68kSpecialRegisterImpl(SPECIAL_REGISTER) - PsiElement(M68kTokenType.REG_USP)('usp') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterDirectAddressingModeImpl(ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE) - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a0') + M68kSpecialRegisterDirectAddressingModeImpl(SPECIAL_REGISTER_DIRECT_ADDRESSING_MODE) + M68kSpecialRegisterImpl(SPECIAL_REGISTER) + PsiElement(M68kTokenType.REG_USP)('usp') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterDirectAddressingModeImpl(ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') PsiElement(M68kTokenType.EOL)('\n') PsiWhiteSpace(' ') M68kStatementImpl(STATEMENT) @@ -24,12 +23,11 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAddressRegisterDirectAddressingModeImpl(ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE) - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a5') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kSpecialRegisterDirectAddressingModeImpl(SPECIAL_REGISTER_DIRECT_ADDRESSING_MODE) - M68kSpecialRegisterImpl(SPECIAL_REGISTER) - PsiElement(M68kTokenType.REG_USP)('usp') + M68kAddressRegisterDirectAddressingModeImpl(ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE) + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a5') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kSpecialRegisterDirectAddressingModeImpl(SPECIAL_REGISTER_DIRECT_ADDRESSING_MODE) + M68kSpecialRegisterImpl(SPECIAL_REGISTER) + PsiElement(M68kTokenType.REG_USP)('usp') PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/assignment/assignment_via_equ.txt b/src/test/resources/parser/assignment/assignment_via_equ.txt new file mode 100644 index 0000000..5af058c --- /dev/null +++ b/src/test/resources/parser/assignment/assignment_via_equ.txt @@ -0,0 +1,10 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kAssignmentImpl(ASSIGNMENT) + PsiElement(M68kTokenType.SYMBOLDEF)('FOO') + PsiWhiteSpace(' ') + PsiElement(M68kTokenType.EQU)('equ') + PsiWhiteSpace(' ') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('BAR') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/assignment/assignment_via_equals_with_spaces.txt b/src/test/resources/parser/assignment/assignment_via_equals_with_spaces.txt new file mode 100644 index 0000000..7689929 --- /dev/null +++ b/src/test/resources/parser/assignment/assignment_via_equals_with_spaces.txt @@ -0,0 +1,14 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kAssignmentImpl(ASSIGNMENT) + PsiElement(M68kTokenType.SYMBOLDEF)('FOO') + PsiWhiteSpace(' ') + PsiElement(M68kTokenType.OP_ASSIGN)('=') + PsiWhiteSpace(' ') + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('123') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/assignment/assignment_via_equals_without_spaces.txt b/src/test/resources/parser/assignment/assignment_via_equals_without_spaces.txt new file mode 100644 index 0000000..16405b2 --- /dev/null +++ b/src/test/resources/parser/assignment/assignment_via_equals_without_spaces.txt @@ -0,0 +1,12 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kAssignmentImpl(ASSIGNMENT) + PsiElement(M68kTokenType.SYMBOLDEF)('FOO') + PsiElement(M68kTokenType.OP_ASSIGN)('=') + M68kBinaryAddExprImpl(BINARY_ADD_EXPR) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('123') + PsiElement(M68kTokenType.OP_PLUS)('+') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/assignment/assignment_via_set.txt b/src/test/resources/parser/assignment/assignment_via_set.txt new file mode 100644 index 0000000..44b62ed --- /dev/null +++ b/src/test/resources/parser/assignment/assignment_via_set.txt @@ -0,0 +1,10 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kAssignmentImpl(ASSIGNMENT) + PsiElement(M68kTokenType.SYMBOLDEF)('FOO') + PsiWhiteSpace(' ') + PsiElement(M68kTokenType.EQU)('set') + PsiWhiteSpace(' ') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('BAR') + PsiElement(M68kTokenType.EOL)('\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 index d59022d..ad882d6 100644 --- a/src/test/resources/parser/basic/basic_block_of_code.txt +++ b/src/test/resources/parser/basic/basic_block_of_code.txt @@ -7,14 +7,13 @@ Assembly File: a.asm 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.SEPARATOR)(',') - M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d0') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') PsiElement(M68kTokenType.EOL)('\n') PsiWhiteSpace('\t') M68kStatementImpl(STATEMENT) @@ -22,15 +21,14 @@ Assembly File: a.asm M68kAsmOpImpl(ASM_OP) PsiElement(M68kTokenType.MNEMONIC)('moveq') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kImmediateDataImpl(IMMEDIATE_DATA) - PsiElement(M68kTokenType.HASH)('#') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('10') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d1') + M68kImmediateDataImpl(IMMEDIATE_DATA) + PsiElement(M68kTokenType.HASH)('#') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d1') PsiElement(M68kTokenType.EOL)('\n') PsiWhiteSpace(' ') M68kStatementImpl(STATEMENT) @@ -47,10 +45,9 @@ Assembly File: a.asm M68kAsmOpImpl(ASM_OP) PsiElement(M68kTokenType.MNEMONIC)('jmp') PsiWhiteSpace('\t') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('resetcode') + M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('resetcode') PsiWhiteSpace(' ') PsiComment(M68kTokenType.COMMENT)('; unreachable') PsiElement(M68kTokenType.EOL)('\n') diff --git a/src/test/resources/parser/comments/end_of_line_comments.txt b/src/test/resources/parser/comments/end_of_line_comments.txt index 15d5e8b..245c43e 100644 --- a/src/test/resources/parser/comments/end_of_line_comments.txt +++ b/src/test/resources/parser/comments/end_of_line_comments.txt @@ -26,14 +26,13 @@ Assembly File: a.asm 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.SEPARATOR)(',') - M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d0') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d0') + PsiElement(M68kTokenType.SEPARATOR)(',') + 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/directives/dc_b_with_strings_and_global_label.txt b/src/test/resources/parser/directives/dc_b_with_strings_and_global_label.txt new file mode 100644 index 0000000..ce8d2cd --- /dev/null +++ b/src/test/resources/parser/directives/dc_b_with_strings_and_global_label.txt @@ -0,0 +1,23 @@ +Assembly File: a.asm + M68kStatementImpl(STATEMENT) + M68kPreprocessorDirectiveImpl(PREPROCESSOR_DIRECTIVE) + M68kGlobalLabelImpl(GLOBAL_LABEL) + PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('foo:') + PsiWhiteSpace(' ') + PsiElement(M68kTokenType.DATA_DIRECTIVE)('dc.b') + PsiWhiteSpace(' ') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.STRINGLIT)(''It could be good!'') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.STRINGLIT)('"Don't ya think?"') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('10') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('0') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/directives/dc_w_with_some_numbers.txt b/src/test/resources/parser/directives/dc_w_with_some_numbers.txt new file mode 100644 index 0000000..e65b697 --- /dev/null +++ b/src/test/resources/parser/directives/dc_w_with_some_numbers.txt @@ -0,0 +1,24 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kPreprocessorDirectiveImpl(PREPROCESSOR_DIRECTIVE) + PsiElement(M68kTokenType.DATA_DIRECTIVE)('dc.w') + PsiWhiteSpace(' ') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('0') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('2') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('3') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('4') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('5') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/directives/even.txt b/src/test/resources/parser/directives/even.txt new file mode 100644 index 0000000..7ab7147 --- /dev/null +++ b/src/test/resources/parser/directives/even.txt @@ -0,0 +1,8 @@ +Assembly File: a.asm + PsiWhiteSpace('\t') + M68kStatementImpl(STATEMENT) + M68kPreprocessorDirectiveImpl(PREPROCESSOR_DIRECTIVE) + PsiElement(M68kTokenType.DATA_DIRECTIVE)('even') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('; align to even address') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/directives/if_defined_block.txt b/src/test/resources/parser/directives/if_defined_block.txt new file mode 100644 index 0000000..2b22e29 --- /dev/null +++ b/src/test/resources/parser/directives/if_defined_block.txt @@ -0,0 +1,22 @@ +Assembly File: a.asm + PsiWhiteSpace('\t') + M68kStatementImpl(STATEMENT) + M68kPreprocessorDirectiveImpl(PREPROCESSOR_DIRECTIVE) + PsiElement(M68kTokenType.OTHER_DIRECTIVE)('IFD') + PsiWhiteSpace(' ') + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('DEBUG') + PsiWhiteSpace(' ') + PsiComment(M68kTokenType.COMMENT)('; cause a crash') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kAsmInstructionImpl(ASM_INSTRUCTION) + M68kAsmOpImpl(ASM_OP) + PsiElement(M68kTokenType.MNEMONIC)('illegal') + PsiElement(M68kTokenType.EOL)('\n') + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kPreprocessorDirectiveImpl(PREPROCESSOR_DIRECTIVE) + PsiElement(M68kTokenType.OTHER_DIRECTIVE)('ENDC') + PsiElement(M68kTokenType.EOL)('\n') \ No newline at end of file diff --git a/src/test/resources/parser/directives/include_file.txt b/src/test/resources/parser/directives/include_file.txt new file mode 100644 index 0000000..a65b134 --- /dev/null +++ b/src/test/resources/parser/directives/include_file.txt @@ -0,0 +1,9 @@ +Assembly File: a.asm + PsiWhiteSpace(' ') + M68kStatementImpl(STATEMENT) + M68kPreprocessorDirectiveImpl(PREPROCESSOR_DIRECTIVE) + PsiElement(M68kTokenType.OTHER_DIRECTIVE)('include') + PsiWhiteSpace(' ') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.STRINGLIT)('"exec/execbase.i"') + 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 index b057b0f..9530e0c 100644 --- a/src/test/resources/parser/labels/complex_label_test.txt +++ b/src/test/resources/parser/labels/complex_label_test.txt @@ -15,19 +15,18 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kImmediateDataImpl(IMMEDIATE_DATA) - PsiElement(M68kTokenType.HASH)('#') - M68kBinarySubExprImpl(BINARY_SUB_EXPR) - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('17') - PsiElement(M68kTokenType.OP_MINUS)('-') - M68kLiteralExprImpl(LITERAL_EXPR) - PsiElement(M68kTokenType.DECIMAL)('1') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) - M68kDataRegisterImpl(DATA_REGISTER) - PsiElement(M68kTokenType.DREG)('d7') + M68kImmediateDataImpl(IMMEDIATE_DATA) + PsiElement(M68kTokenType.HASH)('#') + M68kBinarySubExprImpl(BINARY_SUB_EXPR) + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('17') + PsiElement(M68kTokenType.OP_MINUS)('-') + M68kLiteralExprImpl(LITERAL_EXPR) + PsiElement(M68kTokenType.DECIMAL)('1') + PsiElement(M68kTokenType.SEPARATOR)(',') + 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') @@ -41,20 +40,19 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_WL)('.l') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAddressRegisterIndirectPostIncAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a0') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.OP_PLUS)('+') - PsiElement(M68kTokenType.SEPARATOR)(',') - M68kAddressRegisterIndirectPostIncAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE) - PsiElement(M68kTokenType.ROUND_L)('(') - M68kAddressRegisterImpl(ADDRESS_REGISTER) - PsiElement(M68kTokenType.AREG)('a1') - PsiElement(M68kTokenType.ROUND_R)(')') - PsiElement(M68kTokenType.OP_PLUS)('+') + M68kAddressRegisterIndirectPostIncAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a0') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.OP_PLUS)('+') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAddressRegisterIndirectPostIncAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE) + PsiElement(M68kTokenType.ROUND_L)('(') + M68kAddressRegisterImpl(ADDRESS_REGISTER) + PsiElement(M68kTokenType.AREG)('a1') + PsiElement(M68kTokenType.ROUND_R)(')') + PsiElement(M68kTokenType.OP_PLUS)('+') PsiWhiteSpace(' ') PsiComment(M68kTokenType.COMMENT)('; copy stuff') PsiElement(M68kTokenType.EOL)('\n') @@ -64,14 +62,13 @@ Assembly File: a.asm 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.SEPARATOR)(',') - M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('innerloop$') + M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE) + M68kDataRegisterImpl(DATA_REGISTER) + PsiElement(M68kTokenType.DREG)('d7') + PsiElement(M68kTokenType.SEPARATOR)(',') + M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('innerloop$') PsiWhiteSpace(' ') PsiComment(M68kTokenType.COMMENT)('; copy more') PsiElement(M68kTokenType.EOL)('\n') @@ -86,10 +83,9 @@ Assembly File: a.asm M68kOperandSizeImpl(OPERAND_SIZE) PsiElement(M68kTokenType.OPSIZE_BS)('.s') PsiWhiteSpace(' ') - M68kAsmOperandsImpl(ASM_OPERANDS) - M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) - M68kRefExprImpl(REF_EXPR) - PsiElement(M68kTokenType.SYMBOL)('.outerloop') + M68kAbsoluteAddressAddressingModeImpl(ABSOLUTE_ADDRESS_ADDRESSING_MODE) + M68kRefExprImpl(REF_EXPR) + PsiElement(M68kTokenType.SYMBOL)('.outerloop') PsiWhiteSpace(' ') PsiComment(M68kTokenType.COMMENT)('; end of chunk?') PsiElement(M68kTokenType.EOL)('\n')