From 9b65a79cb35860f4de6c653ded0e6ab58cf6d57e Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 26 Oct 2016 13:48:13 +0100 Subject: LLL: report back unsupported keywords --- liblll/CodeFragment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'liblll/CodeFragment.cpp') diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 0f8f2606..0ba072a4 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -587,7 +587,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_") == string::npos) m_asm.append((u256)varAddress(s)); else - error(); + error("Unsupported keyword: '" + us + "'"); } } -- cgit v1.2.3 From b24eed1c3e2f4527444b33cf1bba418480934f64 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 26 Oct 2016 14:27:39 +0100 Subject: LLL: remove unneeded includes --- liblll/CodeFragment.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'liblll/CodeFragment.cpp') diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 0ba072a4..ac9eac37 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -35,9 +35,6 @@ using namespace std; using namespace dev; using namespace dev::eth; -namespace qi = boost::spirit::qi; -namespace px = boost::phoenix; -namespace sp = boost::spirit; void CodeFragment::finalise(CompilerState const& _cs) { -- cgit v1.2.3 From ac3c8a553a0b943984742f6b12d9d0a3cabcb877 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 1 Nov 2016 02:06:40 +0000 Subject: LLL: properly support dashes (-) as part of variable names --- liblll/CodeFragment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'liblll/CodeFragment.cpp') diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index ac9eac37..bc53d777 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -87,7 +87,7 @@ CodeFragment::CodeFragment(sp::utree const& _t, CompilerState& _s, bool _allowAS m_asm.append(_s.args.at(s).m_asm); else if (_s.outers.count(s)) m_asm.append(_s.outers.at(s).m_asm); - else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_") == string::npos) + else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_-") == string::npos) { auto it = _s.vars.find(s); if (it == _s.vars.end()) @@ -581,7 +581,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) { m_asm.appendJump(m_asm.errorTag()); } - else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_") == string::npos) + else if (us.find_first_of("1234567890") != 0 && us.find_first_not_of("QWERTYUIOPASDFGHJKLZXCVBNM1234567890_-") == string::npos) m_asm.append((u256)varAddress(s)); else error("Unsupported keyword: '" + us + "'"); -- cgit v1.2.3