Last active
March 5, 2016 10:52
-
-
Save matovitch/7044e410a1be046c8264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mode ASSEMBLER | |
{ | |
"iadd" => TKN_IADD; | |
"isub" => TKN_ISUB; | |
"imul" => TKN_IMUL; | |
"idiv" => TKN_IDIV; | |
"imod" => TKN_IMOD; | |
"ineg" => TKN_INEG; | |
"fadd" => TKN_IADD; | |
"fsub" => TKN_ISUB; | |
"fmul" => TKN_IMUL; | |
"fdiv" => TKN_IDIV; | |
"fneg" => TKN_INEG; | |
"jieq" => TKN_JIEQ; | |
"jilt" => TKN_JILT; | |
"jile" => TKN_JILE; | |
"jigt" => TKN_JIGT; | |
"jige" => TKN_JIGE; | |
"jfeq" => TKN_JIEQ; | |
"jflt" => TKN_JILT; | |
"jfle" => TKN_JILE; | |
"jfgt" => TKN_JIGT; | |
"jfge" => TKN_JIGE; | |
"cpush" => TKN_CPUSH; | |
"opush" => TKN_OPUSH; | |
"cpop" => TKN_CPUSH; | |
"opop" => TKN_OPUSH; | |
"read" => TKN_READ; | |
"write" => TKN_WRITE; | |
"cread" => TKN_CREAD; | |
"cwrite" => TKN_CWRITE; | |
"%[+-]?[0-9]+" => TKN_ADDR_SHFT(Lexeme); | |
"$[+-]?[0-9]+" => TKN_IIMM(Lexeme); | |
"$[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?" => TKN_FIMM(Lexeme); | |
} | |
cwrite $address_shift | |
cread $address_shift | |
write $address_shift | |
read $address_shift | |
opop $address_shift | |
cpop $address_shift | |
opush $32_bits_literal | |
cpush $32_bits_literal | |
cpop | |
opop | |
j*** $address_shift | |
i*** | |
f*** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment