#pragma once
#include <string_view>
#include <unordered_set>
#include <vector>
#include "tokenizer/sql_base.hpp"
namespace ddwaf {
class pgsql_tokenizer : public sql_tokenizer<pgsql_tokenizer> {
public:
explicit pgsql_tokenizer(
std::string_view str, std::unordered_set<sql_token_type> skip_tokens = {});
static bool initialise_regexes();
protected:
std::vector<sql_token> tokenize_impl();
void tokenize_string_keyword_operator_or_identifier();
void tokenize_inline_comment_or_operator();
void tokenize_eol_comment();
void tokenize_eol_comment_or_operator_or_number();
void tokenize_dollar_quoted_string();
void tokenize_dollar_string_or_identifier();
friend class sql_tokenizer<pgsql_tokenizer>;
};
}