diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-01 09:01:35 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-01 18:45:13 +0800 |
commit | dc5e05681dfbacfcdbd875ce48c8839fcab20271 (patch) | |
tree | 8dd9d27f71400ddbdbca25bee59eea8803bfb5e1 /liblll/Parser.cpp | |
parent | b92bb41be78c4277a16974353ec2e21ea8cd5f7b (diff) | |
download | dexon-solidity-dc5e05681dfbacfcdbd875ce48c8839fcab20271.tar.gz dexon-solidity-dc5e05681dfbacfcdbd875ce48c8839fcab20271.tar.zst dexon-solidity-dc5e05681dfbacfcdbd875ce48c8839fcab20271.zip |
LLL: simplify integer parsing
Diffstat (limited to 'liblll/Parser.cpp')
-rw-r--r-- | liblll/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/liblll/Parser.cpp b/liblll/Parser.cpp index 7d594e31..219d4f54 100644 --- a/liblll/Parser.cpp +++ b/liblll/Parser.cpp @@ -101,8 +101,8 @@ void dev::eth::parseTreeLLL(string const& _s, sp::utree& o_out) qi::rule<it, string()> strsh = '\'' > qi::lexeme[+(~qi::char_(std::string(" ;$@()[]{}:\n\t") + '\0'))]; qi::rule<it, symbol_type()> symbol = qi::lexeme[+(~qi::char_(std::string(" $@[]{}:();\"\x01-\x1f\x7f") + '\0'))]; qi::rule<it, string()> intstr = qi::lexeme[ qi::no_case["0x"][qi::_val = "0x"] >> *qi::char_("0-9a-fA-F")[qi::_val += qi::_1]] | qi::lexeme[+qi::char_("0-9")[qi::_val += qi::_1]]; - qi::rule<it, bigint()> integer = intstr; - qi::rule<it, space_type, sp::utree()> atom = integer[qi::_val = px::construct<sp::any_ptr>(px::new_<bigint>(qi::_1))] | (str | strsh)[qi::_val = qi::_1] | symbol[qi::_val = qi::_1]; + qi::rule<it, sp::utree()> integer = intstr[qi::_val = px::construct<sp::any_ptr>(px::new_<bigint>(qi::_1))]; + qi::rule<it, space_type, sp::utree()> atom = integer[qi::_val = qi::_1] | (str | strsh)[qi::_val = qi::_1] | symbol[qi::_val = qi::_1]; qi::rule<it, space_type, sp::utree::list_type()> seq = '{' > *element > '}'; qi::rule<it, space_type, sp::utree::list_type()> mload = '@' > element; qi::rule<it, space_type, sp::utree::list_type()> sload = qi::lit("@@") > element; |