summaryrefslogtreecommitdiffhomepage
path: root/DefinitionEx/Parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'DefinitionEx/Parser.h')
-rw-r--r--DefinitionEx/Parser.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/DefinitionEx/Parser.h b/DefinitionEx/Parser.h
new file mode 100644
index 0000000..84fe268
--- /dev/null
+++ b/DefinitionEx/Parser.h
@@ -0,0 +1,45 @@
+/* Starshatter: The Open Source Project
+ Copyright (c) 2021-2022, 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
+*/
+
+#ifndef PARSER_H
+#define PARSER_H
+
+#include "Text.h"
+#include "Term.h"
+
+// +-------------------------------------------------------------------+
+
+class Reader;
+class Scanner;
+
+// +-------------------------------------------------------------------+
+
+class Parser
+{
+public:
+ Parser(Reader* r = 0);
+ ~Parser();
+
+ Term* ParseTerm();
+ Term* ParseTermBase();
+ Term* ParseTermRest(Term* base);
+ TermList* ParseTermList(int for_struct);
+ TermArray* ParseArray();
+ TermStruct* ParseStruct();
+
+private:
+ Reader* reader;
+ Scanner* lexer;
+};
+
+#endif