summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorHombreLaser <buran@silosneeded.com>2024-07-15 22:52:10 -0600
committerHombreLaser <buran@silosneeded.com>2024-07-15 22:52:10 -0600
commitee906c84b866cd175b31b6d90778b3d8c19212c8 (patch)
treead80d5ba1acf88538f0a78a9c15b83c506443c5e /src/include
parent404826e78a56e15e20d3938aed80945295921745 (diff)
Add parserHEADmaster
Diffstat (limited to 'src/include')
-rw-r--r--src/include/parser.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/parser.hpp b/src/include/parser.hpp
index 7bc7997..1399943 100644
--- a/src/include/parser.hpp
+++ b/src/include/parser.hpp
@@ -5,12 +5,18 @@
* PrimeTerm --> (*|/)Term | Null
* Factor --> -Expression | (Expression) | operand */
#pragma once
+#include <string>
#include "tokenizer.hpp"
#include "syntax_tree.hpp"
class Parser {
private:
+ // Private attributes.
+ Tokenizer tokenizer = Tokenizer();
+ Token **tokens;
+ Token *current_token;
+ // End of private attributes.
// Private methods.
void parseExpression();
void parsePrimeExpression();
@@ -20,5 +26,5 @@ private:
// End of private methods.
public:
Parser();
- const SyntaxTree *parse();
+ const SyntaxTree *parse(const std::string &input);
};