From ea58b3887a7deba05e3fc85eb536038a547f8871 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 17 Jul 2016 18:56:29 +0200 Subject: lexer/parser: o Renaming the ASSERT_K token to ASSERT. o Fixing a bug in the NAME regex where underscored where not allowed in certain names. o All ASSERT statements use string instead of NAME. o Improving STRING_ANY, allow many non-quote tokens instead of just one. Can probably replace the entire string rule with STRING_ANY now. o Fixing naming of '!', "~" and "?" operators. Ld: o Implement support for multiplication and division operators. o Better error messages. --- includes/trygvis/elfinfo/Ld.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'includes/trygvis/elfinfo/Ld.h') diff --git a/includes/trygvis/elfinfo/Ld.h b/includes/trygvis/elfinfo/Ld.h index 09dcaec..03559a2 100644 --- a/includes/trygvis/elfinfo/Ld.h +++ b/includes/trygvis/elfinfo/Ld.h @@ -10,11 +10,17 @@ namespace elfinfo { class LdParseException : public std::runtime_error { public: - explicit LdParseException(const std::vector messages) : runtime_error("Parse error"), messages(messages) {} + explicit LdParseException(const std::vector &messages) : + runtime_error("Parse error"), messages(messages) {} const std::vector messages; }; +class LdInternalErrorException : public std::runtime_error { +public: + explicit LdInternalErrorException(const std::string &what) : runtime_error(what) {} +}; + enum class MemoryAttribute { R, W, X }; @@ -69,6 +75,7 @@ public: LdScript load(std::string path); void setDebug(bool debug); + private: bool debug_; }; -- cgit v1.2.3