summaryrefslogtreecommitdiffhomepage
path: root/DefinitionEx/include/Parser_ss.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-03-19 22:56:52 +0100
committerAki <please@ignore.pl>2024-03-19 22:56:52 +0100
commitf5b8091ee91b8323b8e2b1044ba8be676f2bfaf4 (patch)
treebbcfc73dd8db75579127686f9cd07e9c45d374d0 /DefinitionEx/include/Parser_ss.h
parent2066e4911948d11cac5a234d2f7773dc5f06ba96 (diff)
downloadstarshatter-f5b8091ee91b8323b8e2b1044ba8be676f2bfaf4.zip
starshatter-f5b8091ee91b8323b8e2b1044ba8be676f2bfaf4.tar.gz
starshatter-f5b8091ee91b8323b8e2b1044ba8be676f2bfaf4.tar.bz2
Definition Parser now consumes from the new Reader
Next steps are to move ParseUtils functionality to DefinitinoEx, sort things into the namespaces in this library, and then prepare it to handle overloading like nlohmann_json does. On the other side, it's time for starshatter::data.
Diffstat (limited to 'DefinitionEx/include/Parser_ss.h')
-rw-r--r--DefinitionEx/include/Parser_ss.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/DefinitionEx/include/Parser_ss.h b/DefinitionEx/include/Parser_ss.h
new file mode 100644
index 0000000..50659b9
--- /dev/null
+++ b/DefinitionEx/include/Parser_ss.h
@@ -0,0 +1,43 @@
+/* Starshatter: The Open Source Project
+ Copyright (c) 2021-2024, Starshatter: The Open Source Project Contributors
+ Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
+ Copyright (c) 1997-2006, Destroyer Studios LLC.
+
+ AUTHOR: John DiCamillo
+
+
+ OVERVIEW
+ ========
+ Declaration of the generic Parser class
+*/
+
+#pragma once
+
+#include <starshatter/foundation/reader.h>
+#include <Text.h>
+
+#include "Term.h"
+
+// +-------------------------------------------------------------------+
+
+class Scanner;
+
+// +-------------------------------------------------------------------+
+
+class Parser
+{
+public:
+ Parser();
+ Parser(starshatter::foundation::Reader r);
+ ~Parser();
+
+ Term* ParseTerm();
+ Term* ParseTermBase();
+ Term* ParseTermRest(Term* base);
+ TermList* ParseTermList(int for_struct);
+ TermArray* ParseArray();
+ TermStruct* ParseStruct();
+
+private:
+ Scanner* lexer;
+};