add class representing the node tree

add CParser class

This class holds the definitions of all the grammars. It also holds a reference a CTree instance it uses when parsing. This means, that it doesn't have to be declared globally.

Change-Id: I3ca23253b546e26612106067045e1e7d3e2ef919
diff --git a/src/CParser.hpp b/src/CParser.hpp
new file mode 100644
index 0000000..c3333af
--- /dev/null
+++ b/src/CParser.hpp
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2018 CESNET, https://photonics.cesnet.cz/
+ *
+ * Written by Václav Kubernát <kubervac@fit.cvut.cz>
+ *
+ */
+
+#pragma once
+#include <boost/spirit/home/x3.hpp>
+#include "CTree.hpp"
+namespace x3 = boost::spirit::x3;
+namespace ascii = boost::spirit::x3::ascii;
+using Cmd = std::vector<std::string>;
+using x3::alpha;
+using x3::lit;
+using x3::char_;
+using x3::_attr;
+using x3::lexeme;
+using ascii::space;
+
+class TooManyArgumentsException : public std::invalid_argument {
+public:
+    using std::invalid_argument::invalid_argument;
+    ~TooManyArgumentsException() override;
+};
+
+class CParser {
+public:
+    CParser(const CTree& tree);
+    Cmd parseInput(const std::string& line);
+
+private:
+    const CTree& m_tree;
+};