aboutsummaryrefslogtreecommitdiffstats
path: root/liblll/Parser.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-11-01 08:17:53 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-12-01 00:17:50 +0800
commita8696c6d8e1d64f02f65c98818f89532b5694953 (patch)
tree20f3450521f9f5fed2b25c64054c731dfaa4bdaf /liblll/Parser.cpp
parentac357d12252ceb113a823a400418a59a94521c71 (diff)
downloaddexon-solidity-a8696c6d8e1d64f02f65c98818f89532b5694953.tar.gz
dexon-solidity-a8696c6d8e1d64f02f65c98818f89532b5694953.tar.zst
dexon-solidity-a8696c6d8e1d64f02f65c98818f89532b5694953.zip
LLL: do not accept '0x' as 0
Diffstat (limited to 'liblll/Parser.cpp')
-rw-r--r--liblll/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/liblll/Parser.cpp b/liblll/Parser.cpp
index 219d4f54..4d2736ba 100644
--- a/liblll/Parser.cpp
+++ b/liblll/Parser.cpp
@@ -100,7 +100,7 @@ void dev::eth::parseTreeLLL(string const& _s, sp::utree& o_out)
qi::rule<it, string()> str = '"' > qi::lexeme[+(~qi::char_(std::string("\"") + '\0'))] > '"';
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, 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, 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 > '}';