Made AsmOperands private. Added support for generic assembler directives. Bugfixes. Added more Tests.
This commit is contained in:
parent
f482948abe
commit
aa14984a8e
File diff suppressed because it is too large
Load Diff
@ -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, "<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;
|
||||
}
|
||||
|
||||
|
@ -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<M68kAddressingMode> getAddressingModeList();
|
||||
|
||||
@NotNull
|
||||
M68kAsmOp getAsmOp();
|
||||
|
||||
@Nullable
|
||||
M68kAsmOperands getAsmOperands();
|
||||
|
||||
}
|
||||
|
@ -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<M68kAddressingMode> getAddressingModeList();
|
||||
|
||||
}
|
@ -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<M68kExpr> getExprList();
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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<M68kAddressingMode> 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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<M68kExpr> getExprList() {
|
||||
|
@ -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<M68kAddressingMode> getAddressingModeList() {
|
||||
return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kAddressingMode.class);
|
||||
public List<M68kRegister> getRegisterList() {
|
||||
return PsiTreeUtil.getChildrenOfTypeAsList(this, M68kRegister.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package de.platon42.intellij.plugins.m68k.asm
|
||||
|
||||
object AssemblerDirectives {
|
||||
|
||||
val dataDirectives: Set<String> = 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<String> = 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"
|
||||
)
|
||||
}
|
@ -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('=')
|
||||
}
|
||||
}
|
@ -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
|
||||
|
||||
%%
|
||||
<YYINITIAL> {
|
||||
@ -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; }
|
||||
}
|
||||
|
||||
<MACROCALL> {
|
||||
{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; }
|
||||
}
|
||||
|
||||
<ASSIGNMENT> {
|
||||
{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; }
|
||||
}
|
||||
|
||||
<EXPR> {
|
||||
{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; }
|
||||
|
@ -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)*
|
||||
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
@ -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")
|
||||
}
|
||||
}
|
@ -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")
|
||||
}
|
||||
}
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
@ -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')
|
10
src/test/resources/parser/assignment/assignment_via_equ.txt
Normal file
10
src/test/resources/parser/assignment/assignment_via_equ.txt
Normal file
@ -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')
|
@ -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')
|
@ -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')
|
10
src/test/resources/parser/assignment/assignment_via_set.txt
Normal file
10
src/test/resources/parser/assignment/assignment_via_set.txt
Normal file
@ -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')
|
@ -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')
|
||||
|
@ -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')
|
@ -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')
|
@ -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')
|
8
src/test/resources/parser/directives/even.txt
Normal file
8
src/test/resources/parser/directives/even.txt
Normal file
@ -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')
|
22
src/test/resources/parser/directives/if_defined_block.txt
Normal file
22
src/test/resources/parser/directives/if_defined_block.txt
Normal file
@ -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')
|
9
src/test/resources/parser/directives/include_file.txt
Normal file
9
src/test/resources/parser/directives/include_file.txt
Normal file
@ -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')
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user