mirror of
https://github.com/creeperlv/SVM.git
synced 2026-01-11 12:59:54 +00:00
Simplified the lexer definition.
This commit is contained in:
@@ -14,15 +14,6 @@ namespace SVM.Assembler.Core
|
|||||||
@"
|
@"
|
||||||
Match:
|
Match:
|
||||||
|
|
||||||
InstMath bmath
|
|
||||||
InstSDInt32 sd\.int32
|
|
||||||
InstSDInt sd\.int
|
|
||||||
InstSDInt64 sd\.int64
|
|
||||||
InstSDLong sd\.long
|
|
||||||
InstCvt cvt
|
|
||||||
InstSystem system
|
|
||||||
InstSys sys
|
|
||||||
InstSD sd
|
|
||||||
Register \${D}+
|
Register \${D}+
|
||||||
LabelCode \.code\:
|
LabelCode \.code\:
|
||||||
LabelData \.data\:
|
LabelData \.data\:
|
||||||
@@ -37,15 +28,6 @@ D \d
|
|||||||
|
|
||||||
Id:
|
Id:
|
||||||
word Word
|
word Word
|
||||||
InstSDInt64 inst
|
|
||||||
InstSDLong inst
|
|
||||||
InstMath inst
|
|
||||||
InstSDInt inst
|
|
||||||
InstSDInt32 inst
|
|
||||||
InstCvt inst
|
|
||||||
InstSystem inst
|
|
||||||
InstSys inst
|
|
||||||
InstSD sd
|
|
||||||
string String
|
string String
|
||||||
Number Number
|
Number Number
|
||||||
Register Register
|
Register Register
|
||||||
|
|||||||
@@ -140,5 +140,34 @@
|
|||||||
</InstructionParameter>
|
</InstructionParameter>
|
||||||
</Parameters>
|
</Parameters>
|
||||||
</InstructionDefinition>
|
</InstructionDefinition>
|
||||||
|
<InstructionDefinition Id="save" PrimaryInstruction="Save" InstructionCount="1">
|
||||||
|
<Aliases>
|
||||||
|
<Alias Name="save"/>
|
||||||
|
<Alias Name="sd"/>
|
||||||
|
</Aliases>
|
||||||
|
<Parameters>
|
||||||
|
<InstructionParameter>
|
||||||
|
<MatchingItems>
|
||||||
|
<Item Id="Register"/>
|
||||||
|
<Item Id="Word"/>
|
||||||
|
</MatchingItems>
|
||||||
|
<ExpectedValue Type="UInt8" Pos="1" Converter="Register" />
|
||||||
|
</InstructionParameter>
|
||||||
|
<InstructionParameter>
|
||||||
|
<MatchingItems>
|
||||||
|
<Item Id="Number"/>
|
||||||
|
<Item Id="Word"/>
|
||||||
|
</MatchingItems>
|
||||||
|
<ExpectedValue Type="UInt8" Pos="2" Converter="UInt8" />
|
||||||
|
</InstructionParameter>
|
||||||
|
<InstructionParameter>
|
||||||
|
<MatchingItems>
|
||||||
|
<Item Id="Register"/>
|
||||||
|
<Item Id="Word"/>
|
||||||
|
</MatchingItems>
|
||||||
|
<ExpectedValue Type="UInt8" Pos="3" Converter="Register" />
|
||||||
|
</InstructionParameter>
|
||||||
|
</Parameters>
|
||||||
|
</InstructionDefinition>
|
||||||
</Definitions>
|
</Definitions>
|
||||||
</ISARoot>
|
</ISARoot>
|
||||||
Reference in New Issue
Block a user