mirror of
https://github.com/cheat/cheat.git
synced 2024-12-19 03:05:06 +01:00
279 lines
60 KiB
XML
279 lines
60 KiB
XML
|
<lexer>
|
||
|
<config>
|
||
|
<name>Solidity</name>
|
||
|
<alias>sol</alias>
|
||
|
<alias>solidity</alias>
|
||
|
<filename>*.sol</filename>
|
||
|
<dot_all>true</dot_all>
|
||
|
</config>
|
||
|
<rules>
|
||
|
<state name="strings">
|
||
|
<rule pattern="hex'[0-9a-fA-F]+'">
|
||
|
<token type="LiteralString"/>
|
||
|
</rule>
|
||
|
<rule pattern="hex"[0-9a-fA-F]+"">
|
||
|
<token type="LiteralString"/>
|
||
|
</rule>
|
||
|
<rule pattern=""">
|
||
|
<token type="LiteralString"/>
|
||
|
<combined state="string-parse-common" state="string-parse-double"/>
|
||
|
</rule>
|
||
|
<rule pattern="'">
|
||
|
<token type="LiteralString"/>
|
||
|
<combined state="string-parse-common" state="string-parse-single"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="numbers">
|
||
|
<rule pattern="0[xX][0-9a-fA-F]+">
|
||
|
<token type="LiteralNumberHex"/>
|
||
|
</rule>
|
||
|
<rule pattern="[0-9]+">
|
||
|
<token type="LiteralNumberInteger"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="root">
|
||
|
<rule>
|
||
|
<include state="comments"/>
|
||
|
</rule>
|
||
|
<rule>
|
||
|
<include state="keywords-types"/>
|
||
|
</rule>
|
||
|
<rule>
|
||
|
<include state="keywords-other"/>
|
||
|
</rule>
|
||
|
<rule>
|
||
|
<include state="numbers"/>
|
||
|
</rule>
|
||
|
<rule>
|
||
|
<include state="strings"/>
|
||
|
</rule>
|
||
|
<rule>
|
||
|
<include state="whitespace"/>
|
||
|
</rule>
|
||
|
<rule pattern="\+\+|--|\*\*|\?|:|~|&&|\|\||=>|==?|!=?|(<<|>>>?|[-<>+*%&|^/])=?">
|
||
|
<token type="Operator"/>
|
||
|
</rule>
|
||
|
<rule pattern="[{(\[;,]">
|
||
|
<token type="Punctuation"/>
|
||
|
</rule>
|
||
|
<rule pattern="[})\].]">
|
||
|
<token type="Punctuation"/>
|
||
|
</rule>
|
||
|
<rule pattern="(abi|block|msg|tx)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(?!abi\.)(decode|encode|encodePacked|encodeWithSelector|encodeWithSignature|encodeWithSelector)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(?!block\.)(chainid|coinbase|difficulty|gaslimit|number|timestamp)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(?!msg\.)(data|gas|sender|value)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(?!tx\.)(gasprice|origin)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(type)(\()([a-zA-Z_]\w*)(\))">
|
||
|
<bygroups>
|
||
|
<token type="NameBuiltin"/>
|
||
|
<token type="Punctuation"/>
|
||
|
<token type="NameClass"/>
|
||
|
<token type="Punctuation"/>
|
||
|
</bygroups>
|
||
|
</rule>
|
||
|
<rule pattern="(?!type\([a-zA-Z_]\w*\)\.)(creationCode|interfaceId|max|min|name|runtimeCode)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(now|this|super|gasleft)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(selfdestruct|suicide)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(?!0x[0-9a-fA-F]+\.)(balance|code|codehash|send|transfer)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(assert|revert|require)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(call|callcode|delegatecall)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="selector\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="(addmod|blockhash|ecrecover|keccak256|mulmod|ripemd160|sha256|sha3)\b">
|
||
|
<token type="NameBuiltin"/>
|
||
|
</rule>
|
||
|
<rule pattern="[a-zA-Z_]\w*">
|
||
|
<token type="Name"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="keywords-types">
|
||
|
<rule pattern="(address|ufixed|string|bytes|fixed|byte|bool|uint|int)\b">
|
||
|
<token type="KeywordType"/>
|
||
|
</rule>
|
||
|
<rule pattern="(int160|int248|int240|int232|int224|int216|int208|int200|int192|int184|int176|int168|int104|int112|int120|int128|int136|int144|int152|int256|int96|int88|int80|int72|int64|int56|int48|int40|int32|int24|int16|int8)\b">
|
||
|
<token type="KeywordType"/>
|
||
|
</rule>
|
||
|
<rule pattern="(uint160|uint248|uint240|uint232|uint224|uint216|uint208|uint200|uint192|uint184|uint176|uint168|uint104|uint112|uint120|uint128|uint136|uint144|uint152|uint256|uint96|uint88|uint80|uint72|uint64|uint56|uint48|uint40|uint32|uint24|uint16|uint8)\b">
|
||
|
<token type="KeywordType"/>
|
||
|
</rule>
|
||
|
<rule pattern="(bytes23|bytes31|bytes30|bytes29|bytes28|bytes27|bytes26|bytes25|bytes24|bytes10|bytes11|bytes12|bytes13|bytes14|bytes15|bytes16|bytes17|bytes18|bytes19|bytes20|bytes21|bytes22|bytes32|bytes9|bytes8|bytes7|bytes6|bytes5|bytes4|bytes3|bytes2|bytes1)\b">
|
||
|
<token type="KeywordType"/>
|
||
|
</rule>
|
||
|
<rule pattern="(fixed104x17|fixed240x16|fixed240x15|fixed240x14|fixed240x13|fixed240x12|fixed240x11|fixed240x10|fixed232x24|fixed232x23|fixed232x22|fixed232x21|fixed232x20|fixed232x19|fixed232x18|fixed232x17|fixed232x16|fixed232x15|fixed232x14|fixed232x13|fixed232x12|fixed232x11|fixed232x10|fixed224x32|fixed224x31|fixed224x30|fixed224x29|fixed224x28|fixed224x27|fixed224x26|fixed224x25|fixed224x24|fixed224x23|fixed224x22|fixed224x21|fixed224x20|fixed224x19|fixed224x18|fixed224x17|fixed224x16|fixed224x15|fixed224x14|fixed224x13|fixed224x12|fixed224x11|fixed224x10|fixed216x40|fixed216x39|fixed216x38|fixed216x37|fixed216x36|fixed216x35|fixed216x34|fixed216x33|fixed216x32|fixed216x31|fixed216x30|fixed216x29|fixed216x28|fixed216x27|fixed216x26|fixed216x25|fixed216x24|fixed216x23|fixed216x22|fixed216x21|fixed216x20|fixed216x19|fixed216x18|fixed216x17|fixed216x16|fixed216x15|fixed216x14|fixed216x13|fixed216x12|fixed216x11|fixed216x10|fixed208x48|fixed208x47|fixed208x46|fixed208x45|fixed208x44|fixed208x43|fixed208x42|fixed208x41|fixed208x40|fixed208x39|fixed208x38|fixed208x37|fixed208x36|fixed208x35|fixed208x34|fixed208x33|fixed208x32|fixed208x31|fixed208x30|fixed208x29|fixed208x28|fixed208x27|fixed208x26|fixed208x25|fixed208x24|fixed208x23|fixed208x22|fixed208x21|fixed208x20|fixed208x19|fixed208x18|fixed208x17|fixed208x16|fixed208x15|fixed208x14|fixed208x13|fixed208x12|fixed208x11|fixed208x10|fixed200x56|fixed200x55|fixed200x54|fixed200x53|fixed200x52|fixed200x51|fixed200x50|fixed200x49|fixed200x48|fixed200x47|fixed200x46|fixed200x45|fixed200x44|fixed200x43|fixed200x42|fixed200x41|fixed200x40|fixed200x39|fixed200x38|fixed200x37|fixed200x36|fixed200x35|fixed200x34|fixed200x33|fixed200x32|fixed200x31|fixed200x30|fixed200x29|fixed200x28|fixed200x27|fixed200x26|fixed200x25|fixed200x24|fixed200x23|fixed200x22|fixed200x21|fixed200x20|fixed200x19|fixed200x18|fixed200x17|fixed200x16|fixed200x15|fixed200x14|fixed200x13|fixed200x12|fixed200x11|fixed200x10|fixed192x64|fixed192x63|fixed192x62|fixed192x61|fixed192x60|fixed192x59|fixed192x58|fixed192x57|fixed192x56|fixed192x55|fixed192x54|fixed192x53|fixed192x52|fixed192x51|fixed192x50|fixed192x49|fixed192x48|fixed192x47|fixed192x46|fixed192x45|fixed192x44|fixed192x43|fixed192x42|fixed192x41|fixed192x40|fixed192x39|fixed192x38|fixed192x37|fixed192x36|fixed192x35|fixed192x34|fixed192x33|fixed192x32|fixed192x31|fixed192x30|fixed192x29|fixed192x28|fixed192x27|fixed192x26|fixed192x25|fixed192x24|fixed192x23|fixed192x22|fixed192x21|fixed192x20|fixed192x19|fixed192x18|fixed192x17|fixed192x16|fixed192x15|fixed192x14|fixed192x13|fixed192x12|fixed192x11|fixed192x10|fixed184x72|fixed184x71|fixed184x70|fixed184x69|fixed184x68|fixed184x67|fixed184x66|fixed184x65|fixed184x64|fixed184x63|fixed184x62|fixed184x61|fixed184x60|fixed184x59|fixed184x58|fixed184x57|fixed184x56|fixed184x55|fixed184x54|fixed184x53|fixed184x52|fixed184x51|fixed184x50|fixed184x49|fixed184x48|fixed184x47|fixed184x46|fixed184x45|fixed184x44|fixed184x43|fixed184x42|fixed184x41|fixed184x40|fixed184x39|fixed184x38|fixed184x37|fixed184x36|fixed184x35|fixed184x34|fixed184x33|fixed184x32|fixed184x31|fixed184x30|fixed184x29|fixed184x28|fixed184x27|fixed184x26|fixed184x25|fixed184x24|fixed184x23|fixed184x22|fixed184x21|fixed184x20|fixed184x19|fixed184x18|fixed184x17|fixed184x16|fixed184x15|fixed184x14|fixed184x13|fixed184x12|fixed184x11|fixed184x10|fixed176x80|fixed176x79|fixed176x78|fixed176x77|fixed176x76|fixed176x75|fixed176x74|fixed176x73|fixed176x72|fixed176x71|fixed176x70|fixed176x69|fixed176x68|fixed176x67|fixed176x66|fixed176x65|fixed176x64|fixed176x63|fixed176x62|fixed176x61|fixed176x60|fixed176x59|fixed176x58|fixed176x57|fixed176x56|fixed176x55|fixed176x54|fixed176x53|fixed176x52|fixed176x51|fixed176x50|fixed176x49|fixed176x48|fixed176x47|fixed176x46|fixed176x45|fixed176x44|fixed176x43|fixed176x42|fixed176x41|fixed176x40|fixed176x39|fixed176x38|fixed176x37|fixed176x36|fixed176x35|fixed176x34|fixed176x33|fixed176x32|fixed176x31|fixed176x30|fixed176x29|fixed176x28|fixed176x27|fixed176x26|fixed176x25|fixed176x24|fixed176x23|fixed
|
||
|
<token type="KeywordType"/>
|
||
|
</rule>
|
||
|
<rule pattern="(ufixed104x17|ufixed240x16|ufixed240x15|ufixed240x14|ufixed240x13|ufixed240x12|ufixed240x11|ufixed240x10|ufixed232x24|ufixed232x23|ufixed232x22|ufixed232x21|ufixed232x20|ufixed232x19|ufixed232x18|ufixed232x17|ufixed232x16|ufixed232x15|ufixed232x14|ufixed232x13|ufixed232x12|ufixed232x11|ufixed232x10|ufixed224x32|ufixed224x31|ufixed224x30|ufixed224x29|ufixed224x28|ufixed224x27|ufixed224x26|ufixed224x25|ufixed224x24|ufixed224x23|ufixed224x22|ufixed224x21|ufixed224x20|ufixed224x19|ufixed224x18|ufixed224x17|ufixed224x16|ufixed224x15|ufixed224x14|ufixed224x13|ufixed224x12|ufixed224x11|ufixed224x10|ufixed216x40|ufixed216x39|ufixed216x38|ufixed216x37|ufixed216x36|ufixed216x35|ufixed216x34|ufixed216x33|ufixed216x32|ufixed216x31|ufixed216x30|ufixed216x29|ufixed216x28|ufixed216x27|ufixed216x26|ufixed216x25|ufixed216x24|ufixed216x23|ufixed216x22|ufixed216x21|ufixed216x20|ufixed216x19|ufixed216x18|ufixed216x17|ufixed216x16|ufixed216x15|ufixed216x14|ufixed216x13|ufixed216x12|ufixed216x11|ufixed216x10|ufixed208x48|ufixed208x47|ufixed208x46|ufixed208x45|ufixed208x44|ufixed208x43|ufixed208x42|ufixed208x41|ufixed208x40|ufixed208x39|ufixed208x38|ufixed208x37|ufixed208x36|ufixed208x35|ufixed208x34|ufixed208x33|ufixed208x32|ufixed208x31|ufixed208x30|ufixed208x29|ufixed208x28|ufixed208x27|ufixed208x26|ufixed208x25|ufixed208x24|ufixed208x23|ufixed208x22|ufixed208x21|ufixed208x20|ufixed208x19|ufixed208x18|ufixed208x17|ufixed208x16|ufixed208x15|ufixed208x14|ufixed208x13|ufixed208x12|ufixed208x11|ufixed208x10|ufixed200x56|ufixed200x55|ufixed200x54|ufixed200x53|ufixed200x52|ufixed200x51|ufixed200x50|ufixed200x49|ufixed200x48|ufixed200x47|ufixed200x46|ufixed200x45|ufixed200x44|ufixed200x43|ufixed200x42|ufixed200x41|ufixed200x40|ufixed200x39|ufixed200x38|ufixed200x37|ufixed200x36|ufixed200x35|ufixed200x34|ufixed200x33|ufixed200x32|ufixed200x31|ufixed200x30|ufixed200x29|ufixed200x28|ufixed200x27|ufixed200x26|ufixed200x25|ufixed200x24|ufixed200x23|ufixed200x22|ufixed200x21|ufixed200x20|ufixed200x19|ufixed200x18|ufixed200x17|ufixed200x16|ufixed200x15|ufixed200x14|ufixed200x13|ufixed200x12|ufixed200x11|ufixed200x10|ufixed192x64|ufixed192x63|ufixed192x62|ufixed192x61|ufixed192x60|ufixed192x59|ufixed192x58|ufixed192x57|ufixed192x56|ufixed192x55|ufixed192x54|ufixed192x53|ufixed192x52|ufixed192x51|ufixed192x50|ufixed192x49|ufixed192x48|ufixed192x47|ufixed192x46|ufixed192x45|ufixed192x44|ufixed192x43|ufixed192x42|ufixed192x41|ufixed192x40|ufixed192x39|ufixed192x38|ufixed192x37|ufixed192x36|ufixed192x35|ufixed192x34|ufixed192x33|ufixed192x32|ufixed192x31|ufixed192x30|ufixed192x29|ufixed192x28|ufixed192x27|ufixed192x26|ufixed192x25|ufixed192x24|ufixed192x23|ufixed192x22|ufixed192x21|ufixed192x20|ufixed192x19|ufixed192x18|ufixed192x17|ufixed192x16|ufixed192x15|ufixed192x14|ufixed192x13|ufixed192x12|ufixed192x11|ufixed192x10|ufixed184x72|ufixed184x71|ufixed184x70|ufixed184x69|ufixed184x68|ufixed184x67|ufixed184x66|ufixed184x65|ufixed184x64|ufixed184x63|ufixed184x62|ufixed184x61|ufixed184x60|ufixed184x59|ufixed184x58|ufixed184x57|ufixed184x56|ufixed184x55|ufixed184x54|ufixed184x53|ufixed184x52|ufixed184x51|ufixed184x50|ufixed184x49|ufixed184x48|ufixed184x47|ufixed184x46|ufixed184x45|ufixed184x44|ufixed184x43|ufixed184x42|ufixed184x41|ufixed184x40|ufixed184x39|ufixed184x38|ufixed184x37|ufixed184x36|ufixed184x35|ufixed184x34|ufixed184x33|ufixed184x32|ufixed184x31|ufixed184x30|ufixed184x29|ufixed184x28|ufixed184x27|ufixed184x26|ufixed184x25|ufixed184x24|ufixed184x23|ufixed184x22|ufixed184x21|ufixed184x20|ufixed184x19|ufixed184x18|ufixed184x17|ufixed184x16|ufixed184x15|ufixed184x14|ufixed184x13|ufixed184x12|ufixed184x11|ufixed184x10|ufixed176x80|ufixed176x79|ufixed176x78|ufixed176x77|ufixed176x76|ufixed176x75|ufixed176x74|ufixed176x73|ufixed176x72|ufixed176x71|ufixed176x70|ufixed176x69|ufixed176x68|ufixed176x67|ufixed176x66|ufixed176x65|ufixed176x64|ufixed176x63|ufixed176x62|ufixed176x61|ufixed176x60|ufixed176x59|ufixed176x58|ufixed176x57|ufixed176x56|ufixed176x55|ufixed176x54|ufixed176x53|ufixed176x52|ufixed176x51|ufixed176x50|ufixed176x49|ufix
|
||
|
<token type="KeywordType"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="string-parse-double">
|
||
|
<rule pattern=""">
|
||
|
<token type="LiteralString"/>
|
||
|
<pop depth="1"/>
|
||
|
</rule>
|
||
|
<rule pattern="'">
|
||
|
<token type="LiteralString"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="string-parse-single">
|
||
|
<rule pattern="'">
|
||
|
<token type="LiteralString"/>
|
||
|
<pop depth="1"/>
|
||
|
</rule>
|
||
|
<rule pattern=""">
|
||
|
<token type="LiteralString"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="whitespace">
|
||
|
<rule pattern="\s+">
|
||
|
<token type="Text"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="keywords-other">
|
||
|
<rule pattern="(continue|returns|storage|memory|delete|return|throw|break|catch|while|else|from|new|try|for|if|is|as|do|in|_)\b">
|
||
|
<token type="Keyword"/>
|
||
|
</rule>
|
||
|
<rule pattern="assembly\b">
|
||
|
<token type="Keyword"/>
|
||
|
<push state="assembly"/>
|
||
|
</rule>
|
||
|
<rule pattern="(contract|interface|enum|event|struct)(\s+)([a-zA-Z_]\w*)">
|
||
|
<bygroups>
|
||
|
<token type="KeywordDeclaration"/>
|
||
|
<token type="Text"/>
|
||
|
<token type="NameClass"/>
|
||
|
</bygroups>
|
||
|
</rule>
|
||
|
<rule pattern="(function|modifier)(\s+)([a-zA-Z_]\w*)">
|
||
|
<bygroups>
|
||
|
<token type="KeywordDeclaration"/>
|
||
|
<token type="Text"/>
|
||
|
<token type="NameFunction"/>
|
||
|
</bygroups>
|
||
|
</rule>
|
||
|
<rule pattern="(constructor|interface|contract|modifier|function|library|mapping|struct|event|enum|var)\b">
|
||
|
<token type="KeywordDeclaration"/>
|
||
|
</rule>
|
||
|
<rule pattern="(abstract|external|internal|private|public)\b">
|
||
|
<token type="Keyword"/>
|
||
|
</rule>
|
||
|
<rule pattern="(anonymous|immutable|constant|override|indexed|payable|virtual|pure|view)\b">
|
||
|
<token type="Keyword"/>
|
||
|
</rule>
|
||
|
<rule pattern="(import|using)\b">
|
||
|
<token type="KeywordNamespace"/>
|
||
|
</rule>
|
||
|
<rule pattern="pragma (solidity|experimental)\b">
|
||
|
<token type="Keyword"/>
|
||
|
</rule>
|
||
|
<rule pattern="(relocatable|implements|unchecked|reference|supports|typedef|promise|default|partial|mutable|switch|typeof|sealed|inline|copyof|define|static|sizeof|alias|final|match|apply|macro|after|auto|null|case|let|of)\b">
|
||
|
<token type="KeywordReserved"/>
|
||
|
</rule>
|
||
|
<rule pattern="(true|false)\b">
|
||
|
<token type="KeywordConstant"/>
|
||
|
</rule>
|
||
|
<rule pattern="(wei|finney|szabo|ether)\b">
|
||
|
<token type="KeywordConstant"/>
|
||
|
</rule>
|
||
|
<rule pattern="(seconds|minutes|hours|days|weeks|years)\b">
|
||
|
<token type="KeywordConstant"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="comments">
|
||
|
<rule pattern="//([\w\W]*?\n)">
|
||
|
<token type="CommentSingle"/>
|
||
|
</rule>
|
||
|
<rule pattern="/[*][\w\W]*?[*]/">
|
||
|
<token type="CommentMultiline"/>
|
||
|
</rule>
|
||
|
<rule pattern="/[*][\w\W]*">
|
||
|
<token type="CommentMultiline"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="assembly">
|
||
|
<rule>
|
||
|
<include state="comments"/>
|
||
|
</rule>
|
||
|
<rule>
|
||
|
<include state="numbers"/>
|
||
|
</rule>
|
||
|
<rule>
|
||
|
<include state="strings"/>
|
||
|
</rule>
|
||
|
<rule>
|
||
|
<include state="whitespace"/>
|
||
|
</rule>
|
||
|
<rule pattern="\{">
|
||
|
<token type="Punctuation"/>
|
||
|
<push/>
|
||
|
</rule>
|
||
|
<rule pattern="\}">
|
||
|
<token type="Punctuation"/>
|
||
|
<pop depth="1"/>
|
||
|
</rule>
|
||
|
<rule pattern="[(),]">
|
||
|
<token type="Punctuation"/>
|
||
|
</rule>
|
||
|
<rule pattern=":=|=:">
|
||
|
<token type="Operator"/>
|
||
|
</rule>
|
||
|
<rule pattern="(let)(\s*)(\w*\b)">
|
||
|
<bygroups>
|
||
|
<token type="OperatorWord"/>
|
||
|
<token type="Text"/>
|
||
|
<token type="NameVariable"/>
|
||
|
</bygroups>
|
||
|
</rule>
|
||
|
<rule pattern="(\w*\b)(\:[^=])">
|
||
|
<bygroups>
|
||
|
<token type="NameLabel"/>
|
||
|
<token type="Punctuation"/>
|
||
|
</bygroups>
|
||
|
</rule>
|
||
|
<rule pattern="(stop|add|mul|sub|div|sdiv|mod|smod|addmod|mulmod|exp|signextend|lt|gt|slt|sgt|eq|iszero|and|or|xor|not|byte|keccak256|sha3|address|balance|origin|caller|callvalue|calldataload|calldatasize|calldatacopy|codesize|codecopy|gasprice|extcodesize|extcodecopy|blockhash|coinbase|timestamp|number|difficulty|gaslimit|pop|mload|mstore|mstore8|sload|sstore|for|switch|jump|jumpi|pc|msize|gas|jumpdest|push1|push2|push32|dup1|dup2|dup16|swap1|swap2|swap16|log0|log1|log4|create|call|callcode|return|delegatecall|suicide|returndatasize|returndatacopy|staticcall|revert|invalid)\b">
|
||
|
<token type="NameFunction"/>
|
||
|
</rule>
|
||
|
<rule pattern="[a-zA-Z_]\w*">
|
||
|
<token type="Name"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
<state name="string-parse-common">
|
||
|
<rule pattern="\\(u[0-9a-fA-F]{4}|x..|[^x])">
|
||
|
<token type="LiteralStringEscape"/>
|
||
|
</rule>
|
||
|
<rule pattern="[^\\"\'\n]+">
|
||
|
<token type="LiteralString"/>
|
||
|
</rule>
|
||
|
<rule pattern="\\\n">
|
||
|
<token type="LiteralString"/>
|
||
|
</rule>
|
||
|
<rule pattern="\\">
|
||
|
<token type="LiteralString"/>
|
||
|
</rule>
|
||
|
</state>
|
||
|
</rules>
|
||
|
</lexer>
|