diff --git a/README.md b/README.md
index 3a3b54e..7b29ba5 100644
--- a/README.md
+++ b/README.md
@@ -71,14 +71,15 @@ make it work with JUnit 5. Feel free to use the code (in package ```de.platon42.
### V0.3 (unreleased)
-- Enhancement: Macros contents are no longer parsed, added syntax highlighting options for macros.
+- Enhancement: Macro contents are no longer parsed, added syntax highlighting options for macros.
- Enhancement: Macro definitions are now word and stub indexed, macro calls reference to definition.
- Enhancement: Macro definition refactoring and find usages support.
- Enhancement: Structural View also shows macro definitions.
- Bugfix: Missing REPT and ENDR assembler directives added.
- Cosmetics: Changed or added some icons at various places.
- Performance: Reference search for global labels and symbols now uses stub index.
-- Compatibility: Restored compatibility with IDEs versions < 2021.1.
+- Compatibility: Restored compatibility with IDE versions < 2021.1.
+- Performance: Optimized lexer.
### V0.2 (27-Jul-21)
diff --git a/build.gradle b/build.gradle
index d3f1a02..16e75da 100644
--- a/build.gradle
+++ b/build.gradle
@@ -58,14 +58,15 @@ patchPluginXml {
setChangeNotes("""
V0.3 (unreleased)
- - Enhancement: Macros contents are no longer parsed, added syntax highlighting options for macros.
+
- Enhancement: Macro contents are no longer parsed, added syntax highlighting options for macros.
- Enhancement: Macro definitions are now word and stub indexed, macro calls reference to definition.
- Enhancement: Macro definition refactoring and find usages support.
- Enhancement: Structural View also shows macro definitions.
- Bugfix: Missing REPT and ENDR assembler directives added.
- Cosmetics: Changed or added some icons at various places.
- Performance: Reference search for global labels and symbols now uses stub index.
-
- Compatibility: Restored compatibility with IDEs versions < 2021.1.
+
- Compatibility: Restored compatibility with IDE versions < 2021.1.
+
- Performance: Optimized lexer.
V0.2 (27-Jul-21)
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 91c9844..ffb3081 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
@@ -194,32 +194,26 @@ public class _M68kLexer implements FlexLexer {
private static final int[] ZZ_ACTION = zzUnpackAction();
private static final String ZZ_ACTION_PACKED_0 =
- "\17\0\1\1\2\2\1\3\1\4\1\1\1\5\2\6" +
- "\1\2\1\7\1\10\1\1\1\7\1\11\2\12\1\7" +
- "\1\10\1\13\1\14\1\15\1\1\1\16\1\17\1\20" +
- "\4\17\1\1\1\17\5\1\1\21\1\22\1\23\1\24" +
- "\1\25\1\26\1\27\1\30\1\31\1\32\2\17\1\33" +
- "\1\34\1\33\1\35\1\36\1\37\1\40\1\41\1\42" +
- "\1\43\1\44\1\45\1\46\1\47\1\50\1\51\1\44" +
- "\1\52\2\1\1\53\1\54\1\55\6\1\1\56\1\57" +
- "\1\60\1\61\1\62\1\63\1\64\1\65\1\66\1\67" +
- "\1\70\1\71\1\72\1\73\1\74\1\67\1\75\1\76" +
- "\1\12\4\76\1\5\1\12\2\77\2\100\1\101\1\102" +
- "\3\103\1\102\1\103\1\0\1\4\1\104\2\105\1\106" +
- "\3\0\1\7\1\107\1\110\1\111\1\112\1\113\1\114" +
- "\1\17\1\115\1\116\1\17\1\117\1\120\2\0\1\121" +
- "\4\0\1\122\1\17\1\34\1\107\1\110\1\111\1\123" +
- "\1\124\1\125\1\126\1\127\1\130\1\131\2\0\1\132" +
- "\1\133\1\134\2\0\1\135\4\0\1\60\1\136\1\137" +
- "\1\140\1\141\1\142\1\143\1\144\1\0\1\76\1\0" +
- "\1\76\1\0\1\76\1\0\1\76\1\100\1\102\4\0" +
- "\1\4\1\105\1\106\1\7\1\145\1\7\1\146\1\147" +
- "\1\150\1\151\1\0\1\76\3\0\1\100\1\102\3\0" +
- "\1\7\1\100\1\102\2\0\1\152\1\153\1\154\1\0" +
- "\1\155";
+ "\17\0\1\1\2\2\1\3\1\4\1\1\1\5\1\6" +
+ "\1\7\1\10\1\1\1\7\2\11\1\7\1\10\1\12" +
+ "\1\13\1\14\1\1\1\15\1\16\1\17\4\16\1\1" +
+ "\1\16\5\1\1\20\1\21\1\22\1\23\1\24\1\25" +
+ "\1\26\1\27\1\30\1\31\2\16\1\32\1\33\1\34" +
+ "\1\35\1\36\1\37\1\40\1\41\1\42\1\43\1\44" +
+ "\1\45\1\46\1\47\1\42\1\50\2\1\1\51\1\16" +
+ "\1\52\1\11\4\52\1\53\1\11\2\54\2\55\1\56" +
+ "\1\57\3\60\1\57\1\60\1\0\1\4\1\61\2\62" +
+ "\1\63\3\0\1\7\1\64\1\65\1\66\1\67\1\70" +
+ "\1\71\1\16\1\72\1\73\1\16\1\74\1\75\2\0" +
+ "\1\76\4\0\1\77\1\16\1\32\1\100\1\101\1\102" +
+ "\1\103\1\104\1\105\1\106\3\0\1\52\1\0\1\52" +
+ "\1\0\1\52\1\0\1\52\1\55\1\57\4\0\1\4" +
+ "\1\62\1\63\1\7\1\107\1\7\1\110\1\111\1\112" +
+ "\1\113\1\0\1\52\3\0\1\55\1\57\3\0\1\7" +
+ "\1\55\1\57\2\0\1\114\1\115\1\116\1\0\1\117";
private static int[] zzUnpackAction() {
- int[] result = new int[235];
+ int[] result = new int[185];
int offset = 0;
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
return result;
@@ -246,37 +240,31 @@ public class _M68kLexer implements FlexLexer {
private static final String ZZ_ROWMAP_PACKED_0 =
"\0\0\0\76\0\174\0\272\0\370\0\u0136\0\u0174\0\u01b2" +
"\0\u01f0\0\u022e\0\u026c\0\u02aa\0\u02e8\0\u0326\0\u0364\0\u03a2" +
- "\0\u03a2\0\u03e0\0\u041e\0\u045c\0\u049a\0\u04d8\0\u03a2\0\u0516" +
- "\0\u0554\0\u0592\0\u05d0\0\u060e\0\u064c\0\u068a\0\u03a2\0\u06c8" +
- "\0\u0706\0\u0744\0\u03a2\0\u0782\0\u07c0\0\u07fe\0\u083c\0\u087a" +
- "\0\u08b8\0\u08f6\0\u0934\0\u0972\0\u09b0\0\u09ee\0\u0a2c\0\u0a6a" +
- "\0\u0aa8\0\u0ae6\0\u0b24\0\u0b62\0\u03a2\0\u03a2\0\u03a2\0\u03a2" +
- "\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u0ba0\0\u0bde" +
- "\0\u0c1c\0\u0c5a\0\u0c98\0\u03a2\0\u0cd6\0\u0d14\0\u03a2\0\u03a2" +
- "\0\u03a2\0\u03a2\0\u0d52\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u0d90" +
- "\0\u0dce\0\u0e0c\0\u0e4a\0\u0e88\0\u03a2\0\u0ec6\0\u0f04\0\u0f42" +
- "\0\u0f80\0\u0fbe\0\u0ffc\0\u103a\0\u1078\0\u03a2\0\u03a2\0\u10b6" +
- "\0\u03a2\0\u10f4\0\u1132\0\u03a2\0\u03a2\0\u03a2\0\u1170\0\u03a2" +
- "\0\u03a2\0\u03a2\0\u03a2\0\u11ae\0\u11ec\0\u122a\0\u1268\0\u1268" +
- "\0\u12a6\0\u12e4\0\u1322\0\u1360\0\u139e\0\u139e\0\u03a2\0\u13dc" +
- "\0\u141a\0\u1458\0\u1496\0\u14d4\0\u14d4\0\u03a2\0\u1512\0\u1550" +
- "\0\u139e\0\u158e\0\u15cc\0\u160a\0\u1648\0\u1686\0\u16c4\0\u1702" +
- "\0\u1740\0\u177e\0\u17bc\0\u03a2\0\u03a2\0\u03a2\0\u0934\0\u0934" +
- "\0\u0934\0\u17fa\0\u0934\0\u09ee\0\u1838\0\u0a6a\0\u0aa8\0\u0ae6" +
- "\0\u1876\0\u03a2\0\u0b24\0\u18b4\0\u0b62\0\u18f2\0\u0934\0\u1930" +
- "\0\u03a2\0\u0c1c\0\u0c1c\0\u0c1c\0\u03a2\0\u03a2\0\u03a2\0\u03a2" +
- "\0\u03a2\0\u03a2\0\u03a2\0\u196e\0\u19ac\0\u0f42\0\u0f80\0\u0fbe" +
- "\0\u0ffc\0\u19ea\0\u03a2\0\u103a\0\u1a28\0\u1078\0\u1a66\0\u03a2" +
- "\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u1aa4" +
- "\0\u1ae2\0\u1b20\0\u1b5e\0\u1b9c\0\u1bda\0\u1c18\0\u1c56\0\u1c94" +
- "\0\u1cd2\0\u1d10\0\u1d4e\0\u1d8c\0\u1dca\0\u03a2\0\u03a2\0\u03a2" +
- "\0\u03a2\0\u03a2\0\u1e08\0\u0934\0\u0934\0\u0934\0\u03a2\0\u1e46" +
- "\0\u03a2\0\u1e84\0\u1ec2\0\u1f00\0\u1f3e\0\u1f7c\0\u1fba\0\u1ff8" +
- "\0\u2036\0\u2074\0\u20b2\0\u20f0\0\u160a\0\u212e\0\u0592\0\u141a" +
- "\0\u216c\0\u21aa\0\u21e8";
+ "\0\u03a2\0\u03e0\0\u041e\0\u045c\0\u049a\0\u04d8\0\u0516\0\u0554" +
+ "\0\u0592\0\u05d0\0\u060e\0\u03a2\0\u064c\0\u068a\0\u06c8\0\u03a2" +
+ "\0\u0706\0\u0744\0\u0782\0\u07c0\0\u07fe\0\u083c\0\u087a\0\u08b8" +
+ "\0\u08f6\0\u0934\0\u0972\0\u09b0\0\u09ee\0\u0a2c\0\u0a6a\0\u0aa8" +
+ "\0\u0ae6\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2" +
+ "\0\u03a2\0\u03a2\0\u03a2\0\u0b24\0\u0b62\0\u0ba0\0\u03a2\0\u0bde" +
+ "\0\u0c1c\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u0c5a\0\u03a2\0\u03a2" +
+ "\0\u03a2\0\u03a2\0\u0c98\0\u0cd6\0\u0d14\0\u0d52\0\u0d90\0\u03a2" +
+ "\0\u0dce\0\u0e0c\0\u0e0c\0\u0e4a\0\u0e88\0\u0ec6\0\u0f04\0\u0f42" +
+ "\0\u0f42\0\u03a2\0\u0f80\0\u0fbe\0\u0ffc\0\u103a\0\u1078\0\u1078" +
+ "\0\u03a2\0\u10b6\0\u10f4\0\u0f42\0\u1132\0\u1170\0\u11ae\0\u11ec" +
+ "\0\u122a\0\u1268\0\u12a6\0\u12e4\0\u1322\0\u1360\0\u03a2\0\u03a2" +
+ "\0\u03a2\0\u08b8\0\u08b8\0\u08b8\0\u139e\0\u08b8\0\u0972\0\u13dc" +
+ "\0\u09ee\0\u0a2c\0\u0a6a\0\u141a\0\u03a2\0\u0aa8\0\u1458\0\u0ae6" +
+ "\0\u1496\0\u08b8\0\u14d4\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2" +
+ "\0\u03a2\0\u03a2\0\u03a2\0\u1512\0\u1550\0\u158e\0\u15cc\0\u160a" +
+ "\0\u1648\0\u1686\0\u16c4\0\u1702\0\u1740\0\u177e\0\u17bc\0\u17fa" +
+ "\0\u1838\0\u1876\0\u18b4\0\u03a2\0\u03a2\0\u03a2\0\u03a2\0\u03a2" +
+ "\0\u18f2\0\u08b8\0\u08b8\0\u08b8\0\u03a2\0\u1930\0\u03a2\0\u196e" +
+ "\0\u19ac\0\u19ea\0\u1a28\0\u1a66\0\u1aa4\0\u1ae2\0\u1b20\0\u1b5e" +
+ "\0\u1b9c\0\u1bda\0\u11ae\0\u1c18\0\u0554\0\u0fbe\0\u1c56\0\u1c94" +
+ "\0\u1cd2";
private static int[] zzUnpackRowMap() {
- int[] result = new int[235];
+ int[] result = new int[185];
int offset = 0;
offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
return result;
@@ -302,166 +290,151 @@ public class _M68kLexer implements FlexLexer {
"\1\20\2\21\1\22\1\23\1\24\1\20\1\24\1\20" +
"\2\24\2\20\5\24\1\20\1\25\1\20\5\24\1\26" +
"\1\20\4\24\2\20\3\24\1\20\2\24\7\20\1\26" +
- "\7\20\1\26\3\20\3\24\1\20\2\27\1\30\1\31" +
- "\1\32\1\20\1\32\1\20\1\32\1\33\2\20\5\32" +
- "\1\20\1\34\1\20\1\35\4\32\1\36\1\20\4\32" +
- "\2\20\3\32\1\20\2\32\7\20\1\36\7\20\1\36" +
- "\3\20\3\32\1\20\2\37\1\40\1\31\1\41\1\20" +
- "\1\41\1\20\1\41\1\42\1\20\1\43\5\41\3\20" +
- "\5\41\1\44\1\20\4\41\2\20\3\41\1\20\2\41" +
- "\23\20\3\41\1\20\2\37\1\40\1\45\16\20\1\46" +
- "\6\20\1\44\44\20\2\37\1\40\1\47\1\50\1\51" +
- "\1\52\1\51\2\53\2\20\2\53\1\54\1\55\1\53" +
- "\1\20\1\53\1\56\1\53\1\57\3\53\1\44\1\20" +
- "\1\53\1\55\2\53\1\60\1\51\1\50\1\52\1\53" +
- "\1\51\1\53\1\57\1\61\1\62\1\63\1\64\2\20" +
- "\1\65\1\66\1\67\1\70\1\71\1\72\1\73\1\74" +
- "\1\75\1\76\3\20\1\77\1\100\1\53\1\20\2\37" +
- "\1\40\1\47\1\101\1\20\1\101\1\20\2\101\2\20" +
- "\5\101\1\102\1\103\1\20\5\101\1\44\1\20\4\101" +
- "\1\104\1\20\3\101\1\20\2\101\4\20\1\105\1\106" +
- "\1\107\1\20\1\110\1\111\1\112\1\113\1\114\1\115" +
- "\1\116\1\117\1\120\1\121\1\122\3\101\1\20\2\37" +
- "\1\40\1\31\7\20\1\43\1\123\2\20\1\124\1\20" +
- "\1\125\7\20\1\44\2\20\1\124\10\20\1\123\30\20" +
- "\2\37\1\40\1\47\1\126\1\127\1\126\1\127\2\126" +
- "\2\20\5\126\1\20\1\126\1\130\5\126\1\44\1\20" +
- "\4\126\1\131\1\127\3\126\1\127\2\126\1\132\1\133" +
- "\1\134\1\135\2\20\1\65\1\20\1\67\1\70\1\136" +
- "\1\72\1\73\1\74\1\75\1\137\3\20\3\126\1\20" +
- "\2\37\1\40\1\47\15\20\1\140\7\20\1\44\5\20" +
- "\1\141\13\20\1\142\1\143\1\144\1\20\1\145\1\146" +
- "\1\112\1\147\1\150\1\151\1\152\1\153\1\154\1\155" +
- "\1\156\3\20\1\157\1\160\1\37\1\40\1\47\25\157" +
- "\1\44\16\157\1\161\1\162\1\163\1\164\1\157\1\65" +
- "\17\157\1\165\1\166\1\37\1\40\72\165\1\20\2\167" +
- "\1\170\1\31\1\171\1\20\1\171\1\20\2\171\2\20" +
- "\5\171\3\20\1\172\4\171\1\173\1\20\4\171\2\20" +
- "\3\171\1\20\2\171\23\20\3\171\1\174\1\175\1\176" +
- "\1\177\1\200\25\174\1\173\43\174\1\20\2\37\1\40" +
- "\1\31\25\20\1\44\43\20\1\165\1\201\1\176\1\177" +
- "\72\165\100\0\1\21\77\0\1\23\75\0\1\202\7\24" +
- "\1\203\5\24\1\204\1\0\1\205\5\24\2\0\4\24" +
- "\1\0\7\24\23\0\3\24\5\0\1\206\1\0\1\206" +
- "\1\0\2\206\2\0\5\206\3\0\5\206\2\0\4\206" +
- "\2\0\3\206\1\0\2\206\23\0\3\206\1\26\3\0" +
- "\72\26\2\0\1\27\77\0\1\31\76\0\1\32\1\33" +
- "\1\32\1\33\1\32\2\33\1\207\5\32\1\0\1\210" +
- "\1\211\5\32\2\0\4\32\1\0\1\33\3\32\1\33" +
- "\2\32\23\0\3\32\5\0\7\33\1\207\5\33\2\0" +
- "\1\211\5\33\2\0\4\33\1\0\7\33\23\0\3\33" +
- "\5\0\1\212\1\0\1\212\1\0\2\212\2\0\5\212" +
- "\3\0\5\212\2\0\4\212\2\0\3\212\1\0\2\212" +
- "\23\0\3\212\5\0\1\213\1\33\1\32\1\33\1\32" +
- "\2\33\1\207\5\32\1\0\1\210\1\211\5\32\2\0" +
- "\4\32\1\0\1\33\1\213\2\32\1\33\2\32\23\0" +
- "\3\32\1\36\3\0\72\36\2\0\1\37\100\0\1\41" +
- "\1\42\1\41\1\42\1\41\2\42\1\0\5\41\1\0" +
- "\1\210\1\0\5\41\2\0\4\41\1\0\1\42\3\41" +
- "\1\42\2\41\23\0\3\41\5\0\7\42\1\0\5\42" +
- "\3\0\5\42\2\0\4\42\1\0\7\42\23\0\3\42" +
- "\1\44\3\0\72\44\4\0\1\45\125\0\2\214\1\215" +
- "\1\216\42\0\1\47\76\0\1\53\1\217\1\53\1\220" +
- "\3\53\1\0\5\53\2\0\6\53\2\0\4\53\1\0" +
- "\1\217\6\53\23\0\3\53\6\0\1\51\1\0\1\51" +
- "\30\0\1\51\3\0\1\51\35\0\1\53\1\221\1\53" +
- "\1\221\3\53\1\0\5\53\2\0\6\53\2\0\4\53" +
- "\1\0\1\221\6\53\23\0\3\53\5\0\7\53\1\0" +
- "\5\53\2\0\6\53\2\0\4\53\1\0\7\53\23\0" +
- "\3\53\5\0\7\53\1\0\3\53\1\222\1\53\2\0" +
- "\6\53\2\0\1\53\1\222\2\53\1\0\7\53\23\0" +
- "\3\53\5\0\7\53\1\0\5\53\2\0\3\53\1\223" +
- "\2\53\2\0\4\53\1\0\7\53\23\0\1\220\2\53" +
- "\6\0\1\224\1\0\1\224\23\0\1\224\4\0\7\224" +
- "\33\0\7\53\1\0\5\53\2\0\2\53\1\225\3\53" +
- "\2\0\4\53\1\0\6\53\1\225\23\0\3\53\41\0" +
- "\1\226\42\0\1\227\1\0\1\227\30\0\1\227\34\0" +
- "\2\230\2\0\27\230\1\231\15\230\1\232\24\230\2\233" +
- "\2\0\27\233\1\234\16\233\1\232\23\233\2\235\2\0" +
- "\27\235\1\236\17\235\1\232\22\235\5\0\7\53\1\0" +
- "\5\53\2\0\2\53\1\237\3\53\2\0\4\53\1\0" +
- "\6\53\1\237\23\0\3\53\5\0\7\53\1\0\5\53" +
- "\2\0\6\53\2\0\1\240\3\53\1\0\7\53\23\0" +
- "\2\53\1\240\5\0\7\101\1\0\5\101\2\0\6\101" +
- "\2\0\4\101\1\0\7\101\23\0\3\101\22\0\1\241" +
- "\60\0\7\101\1\0\5\101\2\0\6\101\2\0\2\242" +
- "\1\243\1\244\1\0\7\101\23\0\3\101\22\0\1\245" +
- "\31\0\1\246\1\247\42\0\1\250\32\0\1\251\42\0" +
- "\1\247\143\0\1\252\76\0\1\253\76\0\1\104\21\0" +
- "\1\254\74\0\1\255\30\0\1\255\34\0\7\126\1\0" +
- "\5\126\1\0\7\126\1\0\5\126\1\0\7\126\23\0" +
- "\3\126\6\0\1\127\1\0\1\127\30\0\1\127\3\0" +
- "\1\127\36\0\1\256\1\0\1\256\23\0\1\256\4\0" +
- "\7\256\67\0\1\257\42\0\1\260\1\0\1\260\30\0" +
- "\1\260\34\0\2\261\2\0\27\261\1\262\15\261\1\263" +
- "\24\261\2\264\2\0\27\264\1\265\16\264\1\263\23\264" +
- "\2\266\2\0\27\266\1\267\17\266\1\263\22\266\22\0" +
- "\1\270\75\0\1\271\31\0\1\272\1\273\42\0\1\274" +
- "\32\0\1\275\42\0\1\273\143\0\1\276\76\0\1\277" +
- "\76\0\1\141\3\0\2\157\3\0\25\157\1\0\23\157" +
- "\1\0\17\157\2\161\2\0\1\300\25\161\1\300\1\301" +
- "\15\161\1\157\4\161\1\300\17\161\2\162\2\0\1\302" +
- "\25\162\1\302\1\303\16\162\1\157\3\162\1\302\17\162" +
- "\2\163\2\0\1\304\25\163\1\304\1\305\17\163\1\157" +
- "\2\163\1\304\17\163\2\164\2\0\1\306\25\164\1\306" +
- "\1\307\21\164\1\157\1\306\17\164\2\165\2\0\72\165" +
- "\2\0\1\167\100\0\7\171\1\0\5\171\3\0\5\171" +
- "\2\0\4\171\1\0\7\171\23\0\3\171\5\0\1\310" +
- "\6\171\1\0\5\171\3\0\5\171\2\0\4\171\1\0" +
- "\1\171\1\310\5\171\23\0\3\171\1\173\3\0\72\173" +
- "\2\174\2\0\26\174\1\0\43\174\2\0\1\176\73\0" +
- "\2\174\2\0\1\200\10\174\1\311\14\174\1\0\13\174" +
- "\1\311\27\174\4\0\1\202\10\0\1\312\2\0\1\313" +
- "\1\0\1\204\2\0\1\314\7\0\1\313\10\0\1\312" +
- "\33\0\1\315\7\0\1\316\5\0\1\204\57\0\1\204" +
- "\105\0\1\317\66\0\7\206\1\317\5\206\3\0\5\206" +
- "\2\0\4\206\1\0\7\206\23\0\3\206\14\0\1\320" +
- "\61\0\1\321\3\0\72\321\14\0\1\322\66\0\7\212" +
- "\1\322\5\212\3\0\5\212\2\0\4\212\1\0\7\212" +
- "\23\0\3\212\5\0\1\32\1\33\1\32\1\33\1\32" +
- "\2\33\1\207\5\32\1\0\1\210\1\211\1\32\1\323" +
- "\3\32\2\0\4\32\1\0\1\33\3\32\1\33\1\32" +
- "\1\323\23\0\3\32\5\0\7\53\1\0\5\53\2\0" +
- "\6\53\2\0\4\53\1\0\7\53\23\0\1\324\2\53" +
- "\5\0\7\53\1\0\5\53\2\0\3\53\1\325\2\53" +
- "\2\0\4\53\1\0\7\53\23\0\3\53\1\230\3\0" +
- "\72\230\1\233\3\0\72\233\1\235\3\0\72\235\5\0" +
- "\7\53\1\0\5\53\2\0\3\53\1\326\2\53\2\0" +
- "\4\53\1\0\7\53\23\0\3\53\17\0\1\327\77\0" +
- "\1\327\54\0\1\261\3\0\72\261\1\264\3\0\72\264" +
- "\1\266\3\0\72\266\2\300\2\0\27\300\1\330\15\300" +
- "\1\331\24\300\1\161\1\157\2\0\1\300\25\161\1\300" +
- "\23\161\1\300\17\161\2\302\2\0\27\302\1\332\16\302" +
- "\1\331\23\302\1\162\1\157\2\0\1\302\25\162\1\302" +
- "\23\162\1\302\17\162\2\304\2\0\27\304\1\333\17\304" +
- "\1\331\22\304\1\163\1\157\2\0\1\304\25\163\1\304" +
- "\23\163\1\304\17\163\2\306\2\0\27\306\1\334\21\306" +
- "\1\331\20\306\1\164\1\157\2\0\1\306\25\164\1\306" +
- "\23\164\1\306\17\164\5\0\7\171\1\0\5\171\3\0" +
- "\1\171\1\335\3\171\2\0\4\171\1\0\6\171\1\335" +
- "\23\0\3\171\2\174\2\0\25\174\1\336\1\0\43\174" +
- "\16\0\1\337\74\0\1\340\30\0\1\340\34\0\1\341" +
- "\34\0\1\341\37\0\1\315\10\0\1\312\2\0\1\313" +
- "\1\0\1\204\12\0\1\313\10\0\1\312\34\0\1\32" +
- "\1\33\1\32\1\33\1\32\2\33\1\207\5\32\1\0" +
- "\1\210\1\211\2\32\1\342\2\32\2\0\4\32\1\0" +
- "\1\33\3\32\1\33\2\32\23\0\3\32\1\300\3\0" +
- "\72\300\1\302\3\0\72\302\1\304\3\0\72\304\1\306" +
- "\3\0\72\306\5\0\7\171\1\0\5\171\3\0\2\171" +
- "\1\343\2\171\2\0\4\171\1\0\7\171\23\0\3\171" +
- "\2\174\2\0\3\174\1\344\22\174\1\0\10\174\1\344" +
- "\32\174\17\0\1\345\77\0\1\345\102\0\1\346\20\0" +
- "\1\346\33\0\1\32\1\33\1\32\1\33\1\32\2\33" +
- "\1\207\5\32\1\0\1\210\1\211\3\32\1\347\1\32" +
- "\2\0\4\32\1\0\1\33\3\32\1\33\2\32\23\0" +
- "\3\32\5\0\7\171\1\0\5\171\3\0\3\171\1\350" +
- "\1\171\2\0\4\171\1\0\7\171\23\0\3\171\2\174" +
- "\2\0\21\174\1\351\4\174\1\0\43\174\27\0\1\352" +
- "\46\0\2\351\2\0\26\351\1\0\43\351\30\0\1\353" +
- "\51\0\1\353\71\0";
+ "\7\20\1\26\3\20\3\24\1\20\2\21\1\22\1\27" +
+ "\1\30\1\20\1\30\1\20\1\30\1\31\2\20\5\30" +
+ "\1\20\1\32\1\20\1\33\4\30\1\26\1\20\4\30" +
+ "\2\20\3\30\1\20\2\30\7\20\1\26\7\20\1\26" +
+ "\3\20\3\30\1\20\2\34\1\35\1\27\1\36\1\20" +
+ "\1\36\1\20\1\36\1\37\1\20\1\40\5\36\3\20" +
+ "\5\36\1\41\1\20\4\36\2\20\3\36\1\20\2\36" +
+ "\23\20\3\36\1\20\2\34\1\35\1\42\16\20\1\43" +
+ "\6\20\1\41\44\20\2\34\1\35\1\44\1\45\1\46" +
+ "\1\47\1\46\2\50\2\20\2\50\1\51\1\52\1\50" +
+ "\1\20\1\50\1\53\1\50\1\54\3\50\1\41\1\20" +
+ "\1\50\1\52\2\50\1\55\1\46\1\45\1\47\1\50" +
+ "\1\46\1\50\1\54\1\56\1\57\1\60\1\61\2\20" +
+ "\1\62\1\63\1\64\1\65\1\66\1\67\1\70\1\71" +
+ "\1\72\1\73\3\20\1\74\1\75\1\50\1\20\2\34" +
+ "\1\35\1\44\15\20\1\76\1\43\6\20\1\41\5\20" +
+ "\1\77\13\20\1\100\1\101\1\102\1\20\1\103\1\104" +
+ "\1\105\1\106\1\107\1\110\1\111\1\112\1\113\1\114" +
+ "\1\115\4\20\2\34\1\35\1\27\7\20\1\40\1\116" +
+ "\2\20\1\117\1\20\1\120\7\20\1\41\2\20\1\117" +
+ "\10\20\1\116\30\20\2\34\1\35\1\44\1\121\1\46" +
+ "\1\121\1\46\2\121\2\20\5\121\1\20\1\121\1\53" +
+ "\5\121\1\41\1\20\4\121\1\55\1\46\3\121\1\46" +
+ "\2\121\1\56\1\57\1\60\1\61\2\20\1\62\1\20" +
+ "\1\64\1\65\1\66\1\67\1\70\1\71\1\72\1\73" +
+ "\3\20\3\121\1\20\2\34\1\35\1\44\15\20\1\76" +
+ "\7\20\1\41\5\20\1\77\13\20\1\100\1\101\1\102" +
+ "\1\20\1\103\1\104\1\105\1\106\1\107\1\110\1\111" +
+ "\1\112\1\113\1\114\1\115\3\20\1\122\1\123\1\34" +
+ "\1\35\1\44\25\122\1\41\16\122\1\124\1\125\1\126" +
+ "\1\127\1\122\1\62\17\122\1\130\1\131\1\34\1\35" +
+ "\72\130\1\20\2\132\1\133\1\27\1\134\1\20\1\134" +
+ "\1\20\2\134\2\20\5\134\3\20\1\135\4\134\1\136" +
+ "\1\20\4\134\2\20\3\134\1\20\2\134\23\20\3\134" +
+ "\1\137\1\140\1\141\1\142\1\143\25\137\1\136\43\137" +
+ "\1\20\2\34\1\35\1\27\25\20\1\41\43\20\1\130" +
+ "\1\144\1\141\1\142\72\130\100\0\1\21\77\0\1\23" +
+ "\75\0\1\145\7\24\1\146\5\24\1\147\1\0\1\150" +
+ "\5\24\2\0\4\24\1\0\7\24\23\0\3\24\5\0" +
+ "\1\151\1\0\1\151\1\0\2\151\2\0\5\151\3\0" +
+ "\5\151\2\0\4\151\2\0\3\151\1\0\2\151\23\0" +
+ "\3\151\1\26\3\0\72\26\4\0\1\27\76\0\1\30" +
+ "\1\31\1\30\1\31\1\30\2\31\1\152\5\30\1\0" +
+ "\1\153\1\154\5\30\2\0\4\30\1\0\1\31\3\30" +
+ "\1\31\2\30\23\0\3\30\5\0\7\31\1\152\5\31" +
+ "\2\0\1\154\5\31\2\0\4\31\1\0\7\31\23\0" +
+ "\3\31\5\0\1\155\1\0\1\155\1\0\2\155\2\0" +
+ "\5\155\3\0\5\155\2\0\4\155\2\0\3\155\1\0" +
+ "\2\155\23\0\3\155\5\0\1\156\1\31\1\30\1\31" +
+ "\1\30\2\31\1\152\5\30\1\0\1\153\1\154\5\30" +
+ "\2\0\4\30\1\0\1\31\1\156\2\30\1\31\2\30" +
+ "\23\0\3\30\2\0\1\34\100\0\1\36\1\37\1\36" +
+ "\1\37\1\36\2\37\1\0\5\36\1\0\1\153\1\0" +
+ "\5\36\2\0\4\36\1\0\1\37\3\36\1\37\2\36" +
+ "\23\0\3\36\5\0\7\37\1\0\5\37\3\0\5\37" +
+ "\2\0\4\37\1\0\7\37\23\0\3\37\1\41\3\0" +
+ "\72\41\4\0\1\42\125\0\2\157\1\160\1\161\42\0" +
+ "\1\44\76\0\1\50\1\162\1\50\1\163\3\50\1\0" +
+ "\5\50\2\0\6\50\2\0\4\50\1\0\1\162\6\50" +
+ "\23\0\3\50\6\0\1\46\1\0\1\46\30\0\1\46" +
+ "\3\0\1\46\35\0\1\50\1\164\1\50\1\164\3\50" +
+ "\1\0\5\50\2\0\6\50\2\0\4\50\1\0\1\164" +
+ "\6\50\23\0\3\50\5\0\7\50\1\0\5\50\2\0" +
+ "\6\50\2\0\4\50\1\0\7\50\23\0\3\50\5\0" +
+ "\7\50\1\0\3\50\1\165\1\50\2\0\6\50\2\0" +
+ "\1\50\1\165\2\50\1\0\7\50\23\0\3\50\5\0" +
+ "\7\50\1\0\5\50\2\0\3\50\1\166\2\50\2\0" +
+ "\4\50\1\0\7\50\23\0\1\163\2\50\6\0\1\167" +
+ "\1\0\1\167\23\0\1\167\4\0\7\167\33\0\7\50" +
+ "\1\0\5\50\2\0\2\50\1\170\3\50\2\0\4\50" +
+ "\1\0\6\50\1\170\23\0\3\50\41\0\1\171\42\0" +
+ "\1\172\1\0\1\172\30\0\1\172\34\0\2\173\2\0" +
+ "\27\173\1\174\15\173\1\175\24\173\2\176\2\0\27\176" +
+ "\1\177\16\176\1\175\23\176\2\200\2\0\27\200\1\201" +
+ "\17\200\1\175\22\200\5\0\7\50\1\0\5\50\2\0" +
+ "\2\50\1\202\3\50\2\0\4\50\1\0\6\50\1\202" +
+ "\23\0\3\50\5\0\7\50\1\0\5\50\2\0\6\50" +
+ "\2\0\1\203\3\50\1\0\7\50\23\0\2\50\1\203" +
+ "\22\0\1\204\75\0\1\205\31\0\1\206\1\207\42\0" +
+ "\1\210\32\0\1\211\42\0\1\207\143\0\1\212\76\0" +
+ "\1\213\76\0\1\77\21\0\1\214\74\0\1\215\30\0" +
+ "\1\215\34\0\7\121\1\0\5\121\1\0\7\121\1\0" +
+ "\5\121\1\0\7\121\23\0\3\121\2\122\3\0\25\122" +
+ "\1\0\23\122\1\0\17\122\2\124\2\0\1\216\25\124" +
+ "\1\216\1\217\15\124\1\122\4\124\1\216\17\124\2\125" +
+ "\2\0\1\220\25\125\1\220\1\221\16\125\1\122\3\125" +
+ "\1\220\17\125\2\126\2\0\1\222\25\126\1\222\1\223" +
+ "\17\126\1\122\2\126\1\222\17\126\2\127\2\0\1\224" +
+ "\25\127\1\224\1\225\21\127\1\122\1\224\17\127\2\130" +
+ "\2\0\72\130\2\0\1\132\100\0\7\134\1\0\5\134" +
+ "\3\0\5\134\2\0\4\134\1\0\7\134\23\0\3\134" +
+ "\5\0\1\226\6\134\1\0\5\134\3\0\5\134\2\0" +
+ "\4\134\1\0\1\134\1\226\5\134\23\0\3\134\1\136" +
+ "\3\0\72\136\2\137\2\0\26\137\1\0\43\137\2\0" +
+ "\1\141\73\0\2\137\2\0\1\143\10\137\1\227\14\137" +
+ "\1\0\13\137\1\227\27\137\4\0\1\145\10\0\1\230" +
+ "\2\0\1\231\1\0\1\147\2\0\1\232\7\0\1\231" +
+ "\10\0\1\230\33\0\1\233\7\0\1\234\5\0\1\147" +
+ "\57\0\1\147\105\0\1\235\66\0\7\151\1\235\5\151" +
+ "\3\0\5\151\2\0\4\151\1\0\7\151\23\0\3\151" +
+ "\14\0\1\236\61\0\1\237\3\0\72\237\14\0\1\240" +
+ "\66\0\7\155\1\240\5\155\3\0\5\155\2\0\4\155" +
+ "\1\0\7\155\23\0\3\155\5\0\1\30\1\31\1\30" +
+ "\1\31\1\30\2\31\1\152\5\30\1\0\1\153\1\154" +
+ "\1\30\1\241\3\30\2\0\4\30\1\0\1\31\3\30" +
+ "\1\31\1\30\1\241\23\0\3\30\5\0\7\50\1\0" +
+ "\5\50\2\0\6\50\2\0\4\50\1\0\7\50\23\0" +
+ "\1\242\2\50\5\0\7\50\1\0\5\50\2\0\3\50" +
+ "\1\243\2\50\2\0\4\50\1\0\7\50\23\0\3\50" +
+ "\1\173\3\0\72\173\1\176\3\0\72\176\1\200\3\0" +
+ "\72\200\5\0\7\50\1\0\5\50\2\0\3\50\1\244" +
+ "\2\50\2\0\4\50\1\0\7\50\23\0\3\50\17\0" +
+ "\1\245\77\0\1\245\54\0\2\216\2\0\27\216\1\246" +
+ "\15\216\1\247\24\216\1\124\1\122\2\0\1\216\25\124" +
+ "\1\216\23\124\1\216\17\124\2\220\2\0\27\220\1\250" +
+ "\16\220\1\247\23\220\1\125\1\122\2\0\1\220\25\125" +
+ "\1\220\23\125\1\220\17\125\2\222\2\0\27\222\1\251" +
+ "\17\222\1\247\22\222\1\126\1\122\2\0\1\222\25\126" +
+ "\1\222\23\126\1\222\17\126\2\224\2\0\27\224\1\252" +
+ "\21\224\1\247\20\224\1\127\1\122\2\0\1\224\25\127" +
+ "\1\224\23\127\1\224\17\127\5\0\7\134\1\0\5\134" +
+ "\3\0\1\134\1\253\3\134\2\0\4\134\1\0\6\134" +
+ "\1\253\23\0\3\134\2\137\2\0\25\137\1\254\1\0" +
+ "\43\137\16\0\1\255\74\0\1\256\30\0\1\256\34\0" +
+ "\1\257\34\0\1\257\37\0\1\233\10\0\1\230\2\0" +
+ "\1\231\1\0\1\147\12\0\1\231\10\0\1\230\34\0" +
+ "\1\30\1\31\1\30\1\31\1\30\2\31\1\152\5\30" +
+ "\1\0\1\153\1\154\2\30\1\260\2\30\2\0\4\30" +
+ "\1\0\1\31\3\30\1\31\2\30\23\0\3\30\1\216" +
+ "\3\0\72\216\1\220\3\0\72\220\1\222\3\0\72\222" +
+ "\1\224\3\0\72\224\5\0\7\134\1\0\5\134\3\0" +
+ "\2\134\1\261\2\134\2\0\4\134\1\0\7\134\23\0" +
+ "\3\134\2\137\2\0\3\137\1\262\22\137\1\0\10\137" +
+ "\1\262\32\137\17\0\1\263\77\0\1\263\102\0\1\264" +
+ "\20\0\1\264\33\0\1\30\1\31\1\30\1\31\1\30" +
+ "\2\31\1\152\5\30\1\0\1\153\1\154\3\30\1\265" +
+ "\1\30\2\0\4\30\1\0\1\31\3\30\1\31\2\30" +
+ "\23\0\3\30\5\0\7\134\1\0\5\134\3\0\3\134" +
+ "\1\266\1\134\2\0\4\134\1\0\7\134\23\0\3\134" +
+ "\2\137\2\0\21\137\1\267\4\137\1\0\43\137\27\0" +
+ "\1\270\46\0\2\267\2\0\26\267\1\0\43\267\30\0" +
+ "\1\271\51\0\1\271\71\0";
private static int[] zzUnpackTrans() {
- int[] result = new int[8742];
+ int[] result = new int[7440];
int offset = 0;
offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
return result;
@@ -499,18 +472,16 @@ public class _M68kLexer implements FlexLexer {
private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute();
private static final String ZZ_ATTRIBUTE_PACKED_0 =
- "\17\0\2\11\5\1\1\11\7\1\1\11\3\1\1\11" +
- "\21\1\12\11\5\1\1\11\2\1\4\11\1\1\4\11" +
- "\5\1\1\11\10\1\2\11\1\1\1\11\2\1\3\11" +
- "\1\1\4\11\13\1\1\11\6\1\1\11\3\1\1\0" +
- "\5\1\3\0\1\1\3\11\11\1\2\0\1\11\4\0" +
- "\2\1\1\11\3\1\7\11\2\0\3\1\2\0\1\11" +
- "\4\0\10\11\1\0\1\1\1\0\1\1\1\0\1\1" +
- "\1\0\3\1\4\0\5\11\4\1\1\11\1\0\1\11" +
- "\3\0\2\1\3\0\3\1\2\0\3\1\1\0\1\1";
+ "\17\0\2\11\12\1\1\11\3\1\1\11\21\1\12\11" +
+ "\3\1\1\11\2\1\4\11\1\1\4\11\5\1\1\11" +
+ "\11\1\1\11\6\1\1\11\3\1\1\0\5\1\3\0" +
+ "\1\1\3\11\11\1\2\0\1\11\4\0\2\1\10\11" +
+ "\3\0\1\1\1\0\1\1\1\0\1\1\1\0\3\1" +
+ "\4\0\5\11\4\1\1\11\1\0\1\11\3\0\2\1" +
+ "\3\0\3\1\2\0\3\1\1\0\1\1";
private static int[] zzUnpackAttribute() {
- int[] result = new int[235];
+ int[] result = new int[185];
int offset = 0;
offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
return result;
@@ -589,6 +560,8 @@ public class _M68kLexer implements FlexLexer {
private M68kLexerPrefs lexerPrefs;
boolean eatOneWhitespace = false;
int macroLines = 0;
+ int exprState = 0;
+ int exprOpState = 0;
public M68kLexerPrefs getLexerPrefs() {
return lexerPrefs;
@@ -599,6 +572,12 @@ public class _M68kLexer implements FlexLexer {
this.lexerPrefs = lexerPrefs;
}
+ private void startExpr(int newExprState, int newExprOpState) {
+ exprState = newExprState;
+ exprOpState = newExprOpState;
+ yybegin(exprState);
+ }
+
/**
* Creates a new scanner
@@ -842,13 +821,14 @@ public class _M68kLexer implements FlexLexer {
return BAD_CHARACTER;
}
// fall through
- case 110:
+ case 80:
break;
case 2: {
+ yybegin(YYINITIAL);
return WHITE_SPACE;
}
// fall through
- case 111:
+ case 81:
break;
case 3: {
yybegin(NOSOL);
@@ -856,7 +836,7 @@ public class _M68kLexer implements FlexLexer {
return WHITE_SPACE;
}
// fall through
- case 112:
+ case 82:
break;
case 4: {
yybegin(INSTRPART);
@@ -865,20 +845,20 @@ public class _M68kLexer implements FlexLexer {
return GLOBAL_LABEL_DEF;
}
// fall through
- case 113:
+ case 83:
break;
case 5: {
+ yybegin(YYINITIAL);
return COMMENT;
}
// fall through
- case 114:
+ case 84:
break;
case 6: {
- yybegin(YYINITIAL);
return WHITE_SPACE;
}
// fall through
- case 115:
+ case 85:
break;
case 7: {
if (isAsmMnemonicWithSize(yytext())) {
@@ -891,718 +871,508 @@ public class _M68kLexer implements FlexLexer {
return MNEMONIC;
}
if (isDataDirective(yytext())) {
- yybegin(EXPR);
+ startExpr(EXPR, EXPR_OP);
return DATA_DIRECTIVE;
}
if (isOtherDirective(yytext())) {
- yybegin(EXPR);
+ startExpr(EXPR, EXPR_OP);
return OTHER_DIRECTIVE;
}
return handleMacroMode(this);
}
// fall through
- case 116:
+ case 86:
break;
case 8: {
return handleMacroMode(this);
}
// fall through
- case 117:
+ case 87:
break;
case 9: {
- yybegin(YYINITIAL);
- return COMMENT;
- }
- // fall through
- case 118:
- break;
- case 10: {
yybegin(YYINITIAL);
return EOL;
}
// fall through
- case 119:
+ case 88:
break;
- case 11: {
+ case 10: {
return COLON;
}
// fall through
- case 120:
+ case 89:
break;
- case 12: {
+ case 11: {
yybegin(WAITEOL);
return COMMENT;
}
// fall through
- case 121:
+ case 90:
+ break;
+ case 12: {
+ startExpr(ASMOPS, ASMOPS_OP);
+ return WHITE_SPACE;
+ }
+ // fall through
+ case 91:
break;
case 13: {
- yybegin(ASMOPS);
- return WHITE_SPACE;
+ return handleEolCommentWhitespace(this);
+ }
+ // fall through
+ case 92:
+ break;
+ case 14: {
+ yybegin(exprOpState);
+ return SYMBOL;
+ }
+ // fall through
+ case 93:
+ break;
+ case 15: {
+ yybegin(exprOpState);
+ return DECIMAL;
+ }
+ // fall through
+ case 94:
+ break;
+ case 16: {
+ return SEPARATOR;
+ }
+ // fall through
+ case 95:
+ break;
+ case 17: {
+ return HASH;
+ }
+ // fall through
+ case 96:
+ break;
+ case 18: {
+ return OP_BITWISE_XOR;
+ }
+ // fall through
+ case 97:
+ break;
+ case 19: {
+ return ROUND_L;
+ }
+ // fall through
+ case 98:
+ break;
+ case 20: {
+ yybegin(exprOpState);
+ return ROUND_R;
+ }
+ // fall through
+ case 99:
+ break;
+ case 21: {
+ return OP_UNARY_NOT;
+ }
+ // fall through
+ case 100:
+ break;
+ case 22: {
+ return OP_UNARY_COMPL;
+ }
+ // fall through
+ case 101:
+ break;
+ case 23: {
+ return OP_PLUS;
+ }
+ // fall through
+ case 102:
+ break;
+ case 24: {
+ return OP_MINUS;
+ }
+ // fall through
+ case 103:
+ break;
+ case 25: {
+ yybegin(exprOpState);
+ return CURRENT_PC_SYMBOL;
+ }
+ // fall through
+ case 104:
+ break;
+ case 26: {
+ yybegin(exprState);
+ return OP_CMP_EQ;
+ }
+ // fall through
+ case 105:
+ break;
+ case 27: {
+ yybegin(exprState);
+ return OP_AR_MOD;
+ }
+ // fall through
+ case 106:
+ break;
+ case 28: {
+ yybegin(exprState);
+ return OP_CMP_LT;
+ }
+ // fall through
+ case 107:
+ break;
+ case 29: {
+ yybegin(exprState);
+ return OP_CMP_GT;
+ }
+ // fall through
+ case 108:
+ break;
+ case 30: {
+ yybegin(exprState);
+ return SEPARATOR;
+ }
+ // fall through
+ case 109:
+ break;
+ case 31: {
+ yybegin(exprState);
+ return OP_BITWISE_XOR;
+ }
+ // fall through
+ case 110:
+ break;
+ case 32: {
+ yybegin(exprState);
+ return ROUND_L;
+ }
+ // fall through
+ case 111:
+ break;
+ case 33: {
+ return ROUND_R;
+ }
+ // fall through
+ case 112:
+ break;
+ case 34: {
+ yybegin(exprState);
+ return OP_BITWISE_OR;
+ }
+ // fall through
+ case 113:
+ break;
+ case 35: {
+ yybegin(exprState);
+ return OP_UNARY_COMPL;
+ }
+ // fall through
+ case 114:
+ break;
+ case 36: {
+ yybegin(exprState);
+ return OP_PLUS;
+ }
+ // fall through
+ case 115:
+ break;
+ case 37: {
+ yybegin(exprState);
+ return OP_MINUS;
+ }
+ // fall through
+ case 116:
+ break;
+ case 38: {
+ yybegin(exprState);
+ return OP_AR_MUL;
+ }
+ // fall through
+ case 117:
+ break;
+ case 39: {
+ yybegin(exprState);
+ return OP_BITWISE_AND;
+ }
+ // fall through
+ case 118:
+ break;
+ case 40: {
+ yybegin(exprState);
+ return OP_AR_DIV;
+ }
+ // fall through
+ case 119:
+ break;
+ case 41: {
+ startExpr(EXPR, EXPR_OP);
+ return OP_ASSIGN;
+ }
+ // fall through
+ case 120:
+ break;
+ case 42: {
+ return STRINGLIT;
+ }
+ // fall through
+ case 121:
+ break;
+ case 43: {
+ return COMMENT;
}
// fall through
case 122:
break;
- case 14: {
- return handleEolCommentWhitespace(this);
- }
- // fall through
- case 123:
- break;
- case 15: {
- yybegin(ASMOPS_OP);
- return SYMBOL;
- }
- // fall through
- case 124:
- break;
- case 16: {
- yybegin(ASMOPS_OP);
- return DECIMAL;
- }
- // fall through
- case 125:
- break;
- case 17: {
- return SEPARATOR;
- }
- // fall through
- case 126:
- break;
- case 18: {
- return HASH;
- }
- // fall through
- case 127:
- break;
- case 19: {
- return OP_BITWISE_XOR;
- }
- // fall through
- case 128:
- break;
- case 20: {
- return ROUND_L;
- }
- // fall through
- case 129:
- break;
- case 21: {
- yybegin(ASMOPS_OP);
- return ROUND_R;
- }
- // fall through
- case 130:
- break;
- case 22: {
- return OP_UNARY_NOT;
- }
- // fall through
- case 131:
- break;
- case 23: {
- return OP_UNARY_COMPL;
- }
- // fall through
- case 132:
- break;
- case 24: {
- return OP_PLUS;
- }
- // fall through
- case 133:
- break;
- case 25: {
- return OP_MINUS;
- }
- // fall through
- case 134:
- break;
- case 26: {
- yybegin(ASMOPS_OP);
- return CURRENT_PC_SYMBOL;
- }
- // fall through
- case 135:
- break;
- case 27: {
- return SYMBOL;
- }
- // fall through
- case 136:
- break;
- case 28: {
- yybegin(ASMOPS);
- return OP_CMP_EQ;
- }
- // fall through
- case 137:
- break;
- case 29: {
- yybegin(ASMOPS);
- return OP_AR_MOD;
- }
- // fall through
- case 138:
- break;
- case 30: {
- yybegin(ASMOPS);
- return OP_CMP_LT;
- }
- // fall through
- case 139:
- break;
- case 31: {
- yybegin(ASMOPS);
- return OP_CMP_GT;
- }
- // fall through
- case 140:
- break;
- case 32: {
- yybegin(ASMOPS);
- return SEPARATOR;
- }
- // fall through
- case 141:
- break;
- case 33: {
- yybegin(ASMOPS);
- return OP_BITWISE_XOR;
- }
- // fall through
- case 142:
- break;
- case 34: {
- yybegin(ASMOPS);
- return ROUND_L;
- }
- // fall through
- case 143:
- break;
- case 35: {
- return ROUND_R;
- }
- // fall through
- case 144:
- break;
- case 36: {
- yybegin(ASMOPS);
- return OP_BITWISE_OR;
- }
- // fall through
- case 145:
- break;
- case 37: {
- yybegin(ASMOPS);
- return OP_UNARY_COMPL;
- }
- // fall through
- case 146:
- break;
- case 38: {
- yybegin(ASMOPS);
- return OP_PLUS;
- }
- // fall through
- case 147:
- break;
- case 39: {
- yybegin(ASMOPS);
- return OP_MINUS;
- }
- // fall through
- case 148:
- break;
- case 40: {
- yybegin(ASMOPS);
- return OP_AR_MUL;
- }
- // fall through
- case 149:
- break;
- case 41: {
- yybegin(ASMOPS);
- return OP_BITWISE_AND;
- }
- // fall through
- case 150:
- break;
- case 42: {
- yybegin(ASMOPS);
- return OP_AR_DIV;
- }
- // fall through
- case 151:
- break;
- case 43: {
- yybegin(EXPR);
- return OP_ASSIGN;
- }
- // fall through
- case 152:
- break;
case 44: {
- yybegin(EXPR_OP);
- return SYMBOL;
- }
- // fall through
- case 153:
- break;
- case 45: {
- yybegin(EXPR_OP);
- return DECIMAL;
- }
- // fall through
- case 154:
- break;
- case 46: {
- yybegin(EXPR_OP);
- return ROUND_R;
- }
- // fall through
- case 155:
- break;
- case 47: {
- yybegin(EXPR_OP);
- return CURRENT_PC_SYMBOL;
- }
- // fall through
- case 156:
- break;
- case 48: {
- yybegin(EXPR);
- return OP_CMP_EQ;
- }
- // fall through
- case 157:
- break;
- case 49: {
- yybegin(EXPR);
- return OP_AR_MOD;
- }
- // fall through
- case 158:
- break;
- case 50: {
- yybegin(EXPR);
- return OP_CMP_LT;
- }
- // fall through
- case 159:
- break;
- case 51: {
- yybegin(EXPR);
- return OP_CMP_GT;
- }
- // fall through
- case 160:
- break;
- case 52: {
- yybegin(EXPR);
- return SEPARATOR;
- }
- // fall through
- case 161:
- break;
- case 53: {
- yybegin(EXPR);
- return OP_BITWISE_XOR;
- }
- // fall through
- case 162:
- break;
- case 54: {
- yybegin(EXPR);
- return ROUND_L;
- }
- // fall through
- case 163:
- break;
- case 55: {
- yybegin(EXPR);
- return OP_BITWISE_OR;
- }
- // fall through
- case 164:
- break;
- case 56: {
- yybegin(EXPR);
- return OP_UNARY_COMPL;
- }
- // fall through
- case 165:
- break;
- case 57: {
- yybegin(EXPR);
- return OP_PLUS;
- }
- // fall through
- case 166:
- break;
- case 58: {
- yybegin(EXPR);
- return OP_MINUS;
- }
- // fall through
- case 167:
- break;
- case 59: {
- yybegin(EXPR);
- return OP_AR_MUL;
- }
- // fall through
- case 168:
- break;
- case 60: {
- yybegin(EXPR);
- return OP_BITWISE_AND;
- }
- // fall through
- case 169:
- break;
- case 61: {
- yybegin(EXPR);
- return OP_AR_DIV;
- }
- // fall through
- case 170:
- break;
- case 62: {
- return STRINGLIT;
- }
- // fall through
- case 171:
- break;
- case 63: {
yybegin(MACROLINE);
macroLines = 0;
return WHITE_SPACE;
}
// fall through
- case 172:
+ case 123:
break;
- case 64: {
+ case 45: {
return MACRO_NAME;
}
// fall through
- case 173:
+ case 124:
break;
- case 65: {
+ case 46: {
yybegin(MACROWAITEOL);
return COMMENT;
}
// fall through
- case 174:
+ case 125:
break;
- case 66: {
+ case 47: {
return MACRO_LINE;
}
// fall through
- case 175:
+ case 126:
break;
- case 67: {
+ case 48: {
return handleMacroLineEol(this);
}
// fall through
- case 176:
+ case 127:
break;
- case 68: {
+ case 49: {
yybegin(ASSIGNMENT);
eatOneWhitespace = true;
yypushback(pushbackAssignment(yytext()));
return SYMBOLDEF;
}
// fall through
- case 177:
+ case 128:
break;
- case 69: {
+ case 50: {
yybegin(INSTRPART);
eatOneWhitespace = false;
yypushback(pushbackLabelColons(yytext()));
return LOCAL_LABEL_DEF;
}
// fall through
- case 178:
+ case 129:
break;
- case 70: {
+ case 51: {
yybegin(INSTRPART);
yypushback(pushbackLabelColons(yytext()));
return GLOBAL_LABEL_DEF;
}
// fall through
- case 179:
+ case 130:
break;
- case 71: {
+ case 52: {
return OPSIZE_BS;
}
// fall through
- case 180:
+ case 131:
break;
- case 72: {
+ case 53: {
return OPSIZE_W;
}
// fall through
- case 181:
+ case 132:
break;
- case 73: {
+ case 54: {
return OPSIZE_L;
}
// fall through
- case 182:
+ case 133:
break;
- case 74: {
- yybegin(ASMOPS_OP);
+ case 55: {
+ yybegin(exprOpState);
return AREG;
}
// fall through
- case 183:
+ case 134:
break;
- case 75: {
- yybegin(ASMOPS_OP);
+ case 56: {
+ yybegin(exprOpState);
return REG_SP;
}
// fall through
- case 184:
+ case 135:
break;
- case 76: {
- yybegin(ASMOPS_OP);
+ case 57: {
+ yybegin(exprOpState);
return DREG;
}
// fall through
- case 185:
+ case 136:
break;
- case 77: {
- yybegin(ASMOPS_OP);
+ case 58: {
+ yybegin(exprOpState);
return REG_SR;
}
// fall through
- case 186:
+ case 137:
break;
- case 78: {
- yybegin(ASMOPS_OP);
+ case 59: {
+ yybegin(exprOpState);
return HEXADECIMAL;
}
// fall through
- case 187:
+ case 138:
break;
- case 79: {
- yybegin(ASMOPS_OP);
+ case 60: {
+ yybegin(exprOpState);
return BINARY;
}
// fall through
- case 188:
+ case 139:
break;
- case 80: {
- yybegin(ASMOPS_OP);
+ case 61: {
+ yybegin(exprOpState);
return OCTAL;
}
// fall through
- case 189:
+ case 140:
break;
- case 81: {
- yybegin(ASMOPS_OP);
+ case 62: {
+ yybegin(exprOpState);
return STRINGLIT;
}
// fall through
- case 190:
+ case 141:
break;
- case 82: {
- yybegin(ASMOPS_OP);
+ case 63: {
+ yybegin(exprOpState);
return PC;
}
// fall through
- case 191:
+ case 142:
break;
- case 83: {
- yybegin(ASMOPS);
+ case 64: {
+ yybegin(exprState);
return OP_CMP_LT_EQ;
}
// fall through
- case 192:
+ case 143:
break;
- case 84: {
- yybegin(ASMOPS);
+ case 65: {
+ yybegin(exprState);
return OP_AR_SHIFT_L;
}
// fall through
- case 193:
+ case 144:
break;
- case 85: {
- yybegin(ASMOPS);
+ case 66: {
+ yybegin(exprState);
return OP_CMP_NOT_EQ;
}
// fall through
- case 194:
+ case 145:
break;
- case 86: {
- yybegin(ASMOPS);
+ case 67: {
+ yybegin(exprState);
return OP_CMP_GT_EQ;
}
// fall through
- case 195:
+ case 146:
break;
- case 87: {
- yybegin(ASMOPS);
+ case 68: {
+ yybegin(exprState);
return OP_AR_SHIFT_R;
}
// fall through
- case 196:
+ case 147:
break;
- case 88: {
- yybegin(ASMOPS);
+ case 69: {
+ yybegin(exprState);
return OP_LOGICAL_AND;
}
// fall through
- case 197:
+ case 148:
break;
- case 89: {
- yybegin(ASMOPS);
+ case 70: {
+ yybegin(exprState);
return OP_LOGICAL_OR;
}
// fall through
- case 198:
+ case 149:
break;
- case 90: {
- yybegin(EXPR_OP);
- return HEXADECIMAL;
- }
- // fall through
- case 199:
- break;
- case 91: {
- yybegin(EXPR_OP);
- return BINARY;
- }
- // fall through
- case 200:
- break;
- case 92: {
- yybegin(EXPR_OP);
- return OCTAL;
- }
- // fall through
- case 201:
- break;
- case 93: {
- yybegin(EXPR_OP);
- return STRINGLIT;
- }
- // fall through
- case 202:
- break;
- case 94: {
- yybegin(EXPR);
- return OP_CMP_LT_EQ;
- }
- // fall through
- case 203:
- break;
- case 95: {
- yybegin(EXPR);
- return OP_AR_SHIFT_L;
- }
- // fall through
- case 204:
- break;
- case 96: {
- yybegin(EXPR);
- return OP_CMP_NOT_EQ;
- }
- // fall through
- case 205:
- break;
- case 97: {
- yybegin(EXPR);
- return OP_CMP_GT_EQ;
- }
- // fall through
- case 206:
- break;
- case 98: {
- yybegin(EXPR);
- return OP_AR_SHIFT_R;
- }
- // fall through
- case 207:
- break;
- case 99: {
- yybegin(EXPR);
- return OP_LOGICAL_AND;
- }
- // fall through
- case 208:
- break;
- case 100: {
- yybegin(EXPR);
- return OP_LOGICAL_OR;
- }
- // fall through
- case 209:
- break;
- case 101: {
+ case 71: {
yybegin(INSTRPART);
yypushback(pushbackLabelColons(yytext()));
return LOCAL_LABEL_DEF;
}
// fall through
- case 210:
+ case 150:
break;
- case 102: {
- yybegin(ASMOPS_OP);
+ case 72: {
+ yybegin(exprOpState);
return REG_USP;
}
// fall through
- case 211:
+ case 151:
break;
- case 103: {
- yybegin(ASMOPS_OP);
+ case 73: {
+ yybegin(exprOpState);
return REG_CCR;
}
// fall through
- case 212:
+ case 152:
break;
- case 104: {
- yybegin(ASMOPS_OP);
+ case 74: {
+ yybegin(exprOpState);
return REG_VBR;
}
// fall through
- case 213:
+ case 153:
break;
- case 105: {
- yybegin(EXPR);
+ case 75: {
+ startExpr(EXPR, EXPR_OP);
return EQU;
}
// fall through
- case 214:
+ case 154:
break;
- case 106: {
+ case 76: {
yybegin(MACRODEF);
return MACRO_TAG;
}
// fall through
- case 215:
+ case 155:
break;
- case 107: {
+ case 77: {
return MACRO_TAG;
}
// fall through
- case 216:
+ case 156:
break;
- case 108: {
+ case 78: {
yybegin(MACROTERMINATION);
return MACRO_END_TAG;
}
// fall through
- case 217:
+ case 157:
break;
- case 109: {
+ case 79: {
yybegin(MACRODEF);
yypushback(pushbackAfterFirstToken(yytext()));
return MACRO_NAME;
}
// fall through
- case 218:
+ case 158:
break;
default:
zzScanError(ZZ_NO_MATCH);
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 30166eb..b0d474a 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
@@ -14,6 +14,8 @@ import static de.platon42.intellij.plugins.m68k.lexer.LexerUtil.*;
private M68kLexerPrefs lexerPrefs;
boolean eatOneWhitespace = false;
int macroLines = 0;
+ int exprState = 0;
+ int exprOpState = 0;
public M68kLexerPrefs getLexerPrefs()
{
@@ -24,6 +26,12 @@ import static de.platon42.intellij.plugins.m68k.lexer.LexerUtil.*;
this((java.io.Reader)null);
this.lexerPrefs = lexerPrefs;
}
+
+ private void startExpr(int newExprState, int newExprOpState) {
+ exprState = newExprState;
+ exprOpState = newExprOpState;
+ yybegin(exprState);
+ }
%}
%public
@@ -67,225 +75,154 @@ PLAIN_MACRO_LINE=[^;\r\n]+
%state NOSOL,INSTRPART,ASMINSTR,ASMOPS,ASMOPS_OP,ASSIGNMENT,EXPR,EXPR_OP,MACROCALL,WAITEOL,MACRODEF,MACROLINE,MACROTERMINATION,MACROWAITEOL
%%
+
+{
+ {EOL} { yybegin(YYINITIAL); return WHITE_SPACE; }
+ {HASH_COMMENT} { yybegin(YYINITIAL); return COMMENT; }
+}
+
+
+{
+ {EOL} { yybegin(YYINITIAL); return EOL; }
+ {COMMENT} { yybegin(WAITEOL); return COMMENT; }
+}
+
+
+{
+ {WHITE_SPACE} { return WHITE_SPACE; }
+}
+
+ {
+ {WHITE_SPACE} { return handleEolCommentWhitespace(this); }
+}
+
{
{WHITE_SPACE} { yybegin(NOSOL); eatOneWhitespace = false; return WHITE_SPACE; }
- {EOL} { return WHITE_SPACE; }
{ASSIGNMENT} { yybegin(ASSIGNMENT); eatOneWhitespace = true; yypushback(pushbackAssignment(yytext())); return SYMBOLDEF; }
{MACRO_DEF_LEFT} { yybegin(MACRODEF); yypushback(pushbackAfterFirstToken(yytext())); return MACRO_NAME; }
{LOCAL_LABEL} { yybegin(INSTRPART); eatOneWhitespace = false; yypushback(pushbackLabelColons(yytext())); return LOCAL_LABEL_DEF; }
{GLOBAL_LABEL} { yybegin(INSTRPART); eatOneWhitespace = false; yypushback(pushbackLabelColons(yytext())); return GLOBAL_LABEL_DEF; }
-
- {HASH_COMMENT} { return COMMENT; }
}
{
- {WHITE_SPACE} { return WHITE_SPACE; }
- {EOL} { yybegin(YYINITIAL); return WHITE_SPACE; }
+ "macro" { yybegin(MACRODEF); return MACRO_TAG; }
{LOCAL_LABEL_WC} { yybegin(INSTRPART); yypushback(pushbackLabelColons(yytext())); return LOCAL_LABEL_DEF; }
{GLOBAL_LABEL_WC} { yybegin(INSTRPART); yypushback(pushbackLabelColons(yytext())); return GLOBAL_LABEL_DEF; }
- "macro" { yybegin(MACRODEF); return MACRO_TAG; }
+// {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; }
+ if(isDataDirective(yytext())) { startExpr(EXPR, EXPR_OP); return DATA_DIRECTIVE; }
+ if(isOtherDirective(yytext())) { startExpr(EXPR, EXPR_OP); return OTHER_DIRECTIVE; }
return handleMacroMode(this);
}
-// {MNEMONIC} { if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } else { yybegin(INSTRPART); return SYMBOL; } }
{MACRONAME} { return handleMacroMode(this); }
- {HASH_COMMENT} { yybegin(YYINITIAL); return COMMENT; }
}
{
- {WHITE_SPACE} { return WHITE_SPACE; }
- {EOL} { yybegin(YYINITIAL); return EOL; }
-
":" { return COLON; }
-
- {DIRECTIVE_KEYWORD} {
- if(isAsmMnemonicWithSize(yytext())) { yybegin(ASMINSTR); yypushback(2); return MNEMONIC; }
- if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; }
- if(isDataDirective(yytext())) { yybegin(EXPR); return DATA_DIRECTIVE; }
- if(isOtherDirective(yytext())) { yybegin(EXPR); return OTHER_DIRECTIVE; }
- return handleMacroMode(this);
- }
// {MNEMONIC} { if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; } else { return SYMBOL; } }
- {MACRONAME} { return handleMacroMode(this); }
-
- {COMMENT} { yybegin(WAITEOL); return COMMENT; }
}
{
- {WHITE_SPACE} { yybegin(ASMOPS); return WHITE_SPACE; }
- {EOL} { yybegin(YYINITIAL); return EOL; }
+ {WHITE_SPACE} { startExpr(ASMOPS, ASMOPS_OP); return WHITE_SPACE; }
{OPSIZE_BS} { return OPSIZE_BS; }
{OPSIZE_W} { return OPSIZE_W; }
{OPSIZE_L} { return OPSIZE_L; }
-
- {COMMENT} { yybegin(WAITEOL); return COMMENT; }
}
{
- {WHITE_SPACE} { return handleEolCommentWhitespace(this); }
- {EOL} { yybegin(YYINITIAL); return EOL; }
-
"," { return SEPARATOR; }
- {COMMENT} { yybegin(WAITEOL); return COMMENT; }
-
{PLAINPARAM} { return STRINGLIT; }
}
{
- {WHITE_SPACE} { return WHITE_SPACE; }
- {EOL} { yybegin(YYINITIAL); return EOL; }
-
- "equ"|"set" { yybegin(EXPR); return EQU; }
+ "equ"|"set" { startExpr(EXPR, EXPR_OP); return EQU; }
":" { return COLON; }
- "=" { yybegin(EXPR); return OP_ASSIGN; }
+ "=" { startExpr(EXPR, EXPR_OP); return OP_ASSIGN; }
+}
+
+ {
+ {BINARY} { yybegin(exprOpState); return BINARY; }
+ {HEXADECIMAL} { yybegin(exprOpState); return HEXADECIMAL; }
+ {OCTAL} { yybegin(exprOpState); return OCTAL; }
+ {DECIMAL} { yybegin(exprOpState); return DECIMAL; }
+ {STRINGLIT} { yybegin(exprOpState); return STRINGLIT; }
+
+ "^" { return OP_BITWISE_XOR; }
+ "," { return SEPARATOR; }
+ "(" { return ROUND_L; }
+ ")" { yybegin(exprOpState); return ROUND_R; }
+ "!" { return OP_UNARY_NOT; }
+ "~" { return OP_UNARY_COMPL; }
+ "+" { return OP_PLUS; }
+ "-" { return OP_MINUS; }
+ "*" { yybegin(exprOpState); return CURRENT_PC_SYMBOL; }
- {COMMENT} { yybegin(WAITEOL); return COMMENT; }
}
{
- {WHITE_SPACE} { return handleEolCommentWhitespace(this); }
- {EOL} { yybegin(YYINITIAL); return EOL; }
-
- {BINARY} { yybegin(EXPR_OP); return BINARY; }
- {HEXADECIMAL} { yybegin(EXPR_OP); return HEXADECIMAL; }
- {OCTAL} { yybegin(EXPR_OP); return OCTAL; }
- {DECIMAL} { yybegin(EXPR_OP); return DECIMAL; }
- {STRINGLIT} { yybegin(EXPR_OP); return STRINGLIT; }
-
- "^" { return OP_BITWISE_XOR; }
- "," { return SEPARATOR; }
- "(" { return ROUND_L; }
- ")" { yybegin(EXPR_OP); return ROUND_R; }
- "!" { return OP_UNARY_NOT; }
- "~" { return OP_UNARY_COMPL; }
- "+" { return OP_PLUS; }
- "-" { return OP_MINUS; }
- "*" { yybegin(EXPR_OP); return CURRENT_PC_SYMBOL; }
-
- {BONUSSYMBOL} { yybegin(EXPR_OP); return SYMBOL; }
-
- {COMMENT} { yybegin(WAITEOL); return COMMENT; }
+ {BONUSSYMBOL} { yybegin(exprOpState); return SYMBOL; }
}
- {
- {WHITE_SPACE} { return handleEolCommentWhitespace(this); }
- {EOL} { yybegin(YYINITIAL); return EOL; }
+ {
+ "<<" { yybegin(exprState); return OP_AR_SHIFT_L; }
+ ">>" { yybegin(exprState); return OP_AR_SHIFT_R; }
+ "&&" { yybegin(exprState); return OP_LOGICAL_AND; }
+ "||" { yybegin(exprState); return OP_LOGICAL_OR; }
+ "=="|"=" { yybegin(exprState); return OP_CMP_EQ; }
+ "<>"|"!=" { yybegin(exprState); return OP_CMP_NOT_EQ; }
+ ">=" { yybegin(exprState); return OP_CMP_GT_EQ; }
+ "<=" { yybegin(exprState); return OP_CMP_LT_EQ; }
+ "<" { yybegin(exprState); return OP_CMP_LT; }
+ ">" { yybegin(exprState); return OP_CMP_GT; }
+ "&" { yybegin(exprState); return OP_BITWISE_AND; }
+ "|"|"!" { yybegin(exprState); return OP_BITWISE_OR; }
+ "^" { yybegin(exprState); return OP_BITWISE_XOR; }
- "<<" { yybegin(EXPR); return OP_AR_SHIFT_L; }
- ">>" { yybegin(EXPR); return OP_AR_SHIFT_R; }
- "&&" { yybegin(EXPR); return OP_LOGICAL_AND; }
- "||" { yybegin(EXPR); return OP_LOGICAL_OR; }
- "=="|"=" { yybegin(EXPR); return OP_CMP_EQ; }
- "<>"|"!=" { yybegin(EXPR); return OP_CMP_NOT_EQ; }
- ">=" { yybegin(EXPR); return OP_CMP_GT_EQ; }
- "<=" { yybegin(EXPR); return OP_CMP_LT_EQ; }
- "<" { yybegin(EXPR); return OP_CMP_LT; }
- ">" { yybegin(EXPR); return OP_CMP_GT; }
- "&" { yybegin(EXPR); return OP_BITWISE_AND; }
- "|"|"!" { yybegin(EXPR); return OP_BITWISE_OR; }
- "^" { yybegin(EXPR); return OP_BITWISE_XOR; }
// ":" { return COLON; }
// ";" { return SEMICOLON; }
// "[" { return SQUARE_L; }
// "]" { return SQUARE_R; }
- "," { yybegin(EXPR); return SEPARATOR; }
- "(" { yybegin(EXPR); return ROUND_L; }
+ "," { yybegin(exprState); return SEPARATOR; }
+ "(" { yybegin(exprState); return ROUND_L; }
")" { return ROUND_R; }
// "." { return DOT; }
// "$" { return DOLLAR; }
- "~" { yybegin(EXPR); return OP_UNARY_COMPL; }
- "+" { yybegin(EXPR); return OP_PLUS; }
- "-" { yybegin(EXPR); return OP_MINUS; }
- "*" { yybegin(EXPR); return OP_AR_MUL; }
- "%"|"//" { yybegin(EXPR); return OP_AR_MOD; }
- "/" { yybegin(EXPR); return OP_AR_DIV; }
-
- {COMMENT} { yybegin(WAITEOL); return COMMENT; }
+ "~" { yybegin(exprState); return OP_UNARY_COMPL; }
+ "+" { yybegin(exprState); return OP_PLUS; }
+ "-" { yybegin(exprState); return OP_MINUS; }
+ "*" { yybegin(exprState); return OP_AR_MUL; }
+ "%"|"//" { yybegin(exprState); return OP_AR_MOD; }
+ "/" { yybegin(exprState); return OP_AR_DIV; }
}
{
- {WHITE_SPACE} { return handleEolCommentWhitespace(this); }
- {EOL} { yybegin(YYINITIAL); return EOL; }
-
- {BINARY} { yybegin(ASMOPS_OP); return BINARY; }
- {HEXADECIMAL} { yybegin(ASMOPS_OP); return HEXADECIMAL; }
- {OCTAL} { yybegin(ASMOPS_OP); return OCTAL; }
- {DECIMAL} { yybegin(ASMOPS_OP); return DECIMAL; }
- {STRINGLIT} { yybegin(ASMOPS_OP); return STRINGLIT; }
-
- {AREG} { yybegin(ASMOPS_OP); return AREG; }
- {DREG} { yybegin(ASMOPS_OP); return DREG; }
- "sp"|"a7" { yybegin(ASMOPS_OP); return REG_SP; }
- "pc" { yybegin(ASMOPS_OP); return PC; }
- "ccr" { yybegin(ASMOPS_OP); return REG_CCR; }
- "sr" { yybegin(ASMOPS_OP); return REG_SR; }
- "usp" { yybegin(ASMOPS_OP); return REG_USP; }
- "vbr" { yybegin(ASMOPS_OP); return REG_VBR; }
-
- "^" { return OP_BITWISE_XOR; }
- "," { return SEPARATOR; }
- "(" { return ROUND_L; }
- ")" { yybegin(ASMOPS_OP); return ROUND_R; }
- "!" { return OP_UNARY_NOT; }
- "~" { return OP_UNARY_COMPL; }
- "+" { return OP_PLUS; }
- "-" { return OP_MINUS; }
- "*" { yybegin(ASMOPS_OP); return CURRENT_PC_SYMBOL; }
+ {AREG} { yybegin(exprOpState); return AREG; }
+ {DREG} { yybegin(exprOpState); return DREG; }
+ "sp"|"a7" { yybegin(exprOpState); return REG_SP; }
+ "pc" { yybegin(exprOpState); return PC; }
+ "ccr" { yybegin(exprOpState); return REG_CCR; }
+ "sr" { yybegin(exprOpState); return REG_SR; }
+ "usp" { yybegin(exprOpState); return REG_USP; }
+ "vbr" { yybegin(exprOpState); return REG_VBR; }
"#" { return HASH; }
- {SYMBOL} { yybegin(ASMOPS_OP); return SYMBOL; }
-
- {COMMENT} { yybegin(WAITEOL); return COMMENT; }
+ {SYMBOL} { yybegin(exprOpState); return SYMBOL; }
}
{
- {WHITE_SPACE} { return handleEolCommentWhitespace(this); }
- {EOL} { yybegin(YYINITIAL); return EOL; }
-
{OPSIZE_BS} { return OPSIZE_BS; }
{OPSIZE_W} { return OPSIZE_W; }
{OPSIZE_L} { return OPSIZE_L; }
-
- "<<" { yybegin(ASMOPS); return OP_AR_SHIFT_L; }
- ">>" { yybegin(ASMOPS); return OP_AR_SHIFT_R; }
- "&&" { yybegin(ASMOPS); return OP_LOGICAL_AND; }
- "||" { yybegin(ASMOPS); return OP_LOGICAL_OR; }
- "=="|"=" { yybegin(ASMOPS); return OP_CMP_EQ; }
- "<>"|"!=" { yybegin(ASMOPS); return OP_CMP_NOT_EQ; }
- ">=" { yybegin(ASMOPS); return OP_CMP_GT_EQ; }
- "<=" { yybegin(ASMOPS); return OP_CMP_LT_EQ; }
- "<" { yybegin(ASMOPS); return OP_CMP_LT; }
- ">" { yybegin(ASMOPS); return OP_CMP_GT; }
- "&" { yybegin(ASMOPS); return OP_BITWISE_AND; }
- "|"|"!" { yybegin(ASMOPS); return OP_BITWISE_OR; }
- "^" { yybegin(ASMOPS); return OP_BITWISE_XOR; }
-// ":" { return COLON; }
-// ";" { return SEMICOLON; }
-// "[" { return SQUARE_L; }
-// "]" { return SQUARE_R; }
- "," { yybegin(ASMOPS); return SEPARATOR; }
- "(" { yybegin(ASMOPS); return ROUND_L; }
- ")" { return ROUND_R; }
-// "." { return DOT; }
-// "$" { return DOLLAR; }
- "~" { yybegin(ASMOPS); return OP_UNARY_COMPL; }
- "+" { yybegin(ASMOPS); return OP_PLUS; }
- "-" { yybegin(ASMOPS); return OP_MINUS; }
- "*" { yybegin(ASMOPS); return OP_AR_MUL; }
- "%"|"//" { yybegin(ASMOPS); return OP_AR_MOD; }
- "/" { yybegin(ASMOPS); return OP_AR_DIV; }
-
- {SYMBOL} { return SYMBOL; }
-
- {COMMENT} { yybegin(WAITEOL); return COMMENT; }
}