xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
ITokenizer.h
Go to the documentation of this file.
1#ifndef QUERY_I_TOKENIZER_H
2#define QUERY_I_TOKENIZER_H
3
4#include "Query/Token.h"
5
6#include <string>
7#include <vector>
8
9namespace Xale::Query
10{
15 {
16 public:
21 virtual void setInput(const std::string& input) = 0;
22
27 virtual Token nextToken() = 0;
28
33 virtual Token peekToken() const = 0;
34
38 virtual void reset() = 0;
39
44 virtual std::vector<Token> tokenize() = 0;
45 };
46}
47
48#endif // QUERY_I_TOKENIZER_H
Interface for SQL tokenizer that converts an input string into a sequence of tokens.
Definition ITokenizer.h:15
virtual Token nextToken()=0
Retrieve the next token from the input.
virtual void setInput(const std::string &input)=0
Set the input SQL string to be tokenized.
virtual std::vector< Token > tokenize()=0
Tokenize the entire input into a vector of tokens.
virtual void reset()=0
Reset the tokenizer state to the beginning of the input.
virtual Token peekToken() const =0
Peek at the next token without consuming it.
Definition BasicParser.h:16
Token struct defined by type, value and pos.
Definition Token.h:32