xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
Xale::Query::ITokenizer Class Referenceabstract

Interface for SQL tokenizer that converts an input string into a sequence of tokens. More...

#include <ITokenizer.h>

Inheritance diagram for Xale::Query::ITokenizer:
Inheritance graph
Collaboration diagram for Xale::Query::ITokenizer:
Collaboration graph

Public Member Functions

virtual void setInput (const std::string &input)=0
 Set the input SQL string to be tokenized.
virtual Token nextToken ()=0
 Retrieve the next token from the input.
virtual Token peekToken () const =0
 Peek at the next token without consuming it.
virtual void reset ()=0
 Reset the tokenizer state to the beginning of the input.
virtual std::vector< Tokentokenize ()=0
 Tokenize the entire input into a vector of tokens.

Detailed Description

Interface for SQL tokenizer that converts an input string into a sequence of tokens.

Member Function Documentation

◆ nextToken()

virtual Token Xale::Query::ITokenizer::nextToken ( )
pure virtual

Retrieve the next token from the input.

Returns
The next token in the sequence

Implemented in Xale::Query::BasicTokenizer.

◆ peekToken()

virtual Token Xale::Query::ITokenizer::peekToken ( ) const
pure virtual

Peek at the next token without consuming it.

Returns
The next token in the sequence

Implemented in Xale::Query::BasicTokenizer.

◆ reset()

virtual void Xale::Query::ITokenizer::reset ( )
pure virtual

Reset the tokenizer state to the beginning of the input.

Implemented in Xale::Query::BasicTokenizer.

◆ setInput()

virtual void Xale::Query::ITokenizer::setInput ( const std::string & input)
pure virtual

Set the input SQL string to be tokenized.

Parameters
inputThe SQL query string

Implemented in Xale::Query::BasicTokenizer.

◆ tokenize()

virtual std::vector< Token > Xale::Query::ITokenizer::tokenize ( )
pure virtual

Tokenize the entire input into a vector of tokens.

Returns
A vector containing all tokens from the input

Implemented in Xale::Query::BasicTokenizer.


The documentation for this class was generated from the following file: