From dc5e05681dfbacfcdbd875ce48c8839fcab20271 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 1 Nov 2016 01:01:35 +0000 Subject: LLL: simplify integer parsing --- liblll/Parser.cpp | 4 ++-- 1 file 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 strsh = '\'' > qi::lexeme[+(~qi::char_(std::string(" ;$@()[]{}:\n\t") + '\0'))]; qi::rule symbol = qi::lexeme[+(~qi::char_(std::string(" $@[]{}:();\"\x01-\x1f\x7f") + '\0'))]; qi::rule 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 integer = intstr; - qi::rule atom = integer[qi::_val = px::construct(px::new_(qi::_1))] | (str | strsh)[qi::_val = qi::_1] | symbol[qi::_val = qi::_1]; + qi::rule integer = intstr[qi::_val = px::construct(px::new_(qi::_1))]; + qi::rule atom = integer[qi::_val = qi::_1] | (str | strsh)[qi::_val = qi::_1] | symbol[qi::_val = qi::_1]; qi::rule seq = '{' > *element > '}'; qi::rule mload = '@' > element; qi::rule sload = qi::lit("@@") > element; -- cgit