From 94ef3b0248485714ca8e635af3811d788ee930e2 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 2 Apr 2022 19:19:08 +0200 Subject: Moved def format implementation to own module --- DefinitionEx/Parser.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 DefinitionEx/Parser.h (limited to 'DefinitionEx/Parser.h') 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 -- cgit v1.1