Blame src/regex/tbnf_regex_defs.h

c25718
/**************************************************************/
c25718
/*  treebnf: a tree oriented bnf library                      */
c25718
/*  Copyright (C) 2024  SysDeer Technologies, LLC             */
c25718
/*  Released under GPLv2 and GPLv3; see COPYING.TREEBNF.      */
c25718
/**************************************************************/
c25718
c25718
#ifndef TBNF_REGEX_DEFS_H
c25718
#define TBNF_REGEX_DEFS_H
c25718
c25718
enum tbnf_regex_scan_state {
c25718
	TBNF_REGEX_STATE_INIT,
c25718
	TBNF_REGEX_STATE_BRACE,
c25718
	TBNF_REGEX_STATE_BRACKET,
c25718
	TBNF_REGEX_STATE_CAP,
c25718
};
c25718
c25718
enum tbnf_regex_token_type {
c25718
	TBNF_REGEX_TOK_NONE,
c25718
c25718
	/* in-brace tokens */
c25718
	TBNF_REGEX_TOK_BRACE_RBRACE,
c25718
	TBNF_REGEX_TOK_BRACE_DIGIT,
c25718
	TBNF_REGEX_TOK_BRACE_COMMA,
c25718
c25718
	/* in-bracket tokens */
c25718
	TBNF_REGEX_TOK_BRACKET_ESCAPED_CHAR,
c25718
	TBNF_REGEX_TOK_BRACKET_CHARACTER_CLASS,
c25718
	TBNF_REGEX_TOK_BRACKET_COLLATION_SYMBOL,
c25718
	TBNF_REGEX_TOK_BRACKET_EQUIVALENCE_CLASS,
c25718
	TBNF_REGEX_TOK_BRACKET_RBRACKET,
c25718
	TBNF_REGEX_TOK_BRACKET_HYPHEN,
c25718
	TBNF_REGEX_TOK_BRACKET_ERROR,
c25718
	TBNF_REGEX_TOK_BRACKET_CHAR,
c25718
c25718
	/* brace state initializer token */
c25718
	TBNF_REGEX_TOK_LBRACE,
c25718
c25718
	/* bracket state initializer tokens */
c25718
	TBNF_REGEX_TOK_LBRACKET_CIRCUMFLEX_RBRACKET,
c25718
	TBNF_REGEX_TOK_LBRACKET_CIRCUMFLEX,
c25718
	TBNF_REGEX_TOK_LBRACKET_RBRACKET,
c25718
	TBNF_REGEX_TOK_LBRACKET,
c25718
c25718
	/* init state tokens */
c25718
	TBNF_REGEX_TOK_ESCAPED_CHAR,
c25718
c25718
	TBNF_REGEX_TOK_CIRCUMFLEX_ASTERISK,
c25718
	TBNF_REGEX_TOK_CIRCUMFLEX,
c25718
c25718
	TBNF_REGEX_TOK_LPAREN,
c25718
	TBNF_REGEX_TOK_RPAREN,
c25718
c25718
	TBNF_REGEX_TOK_ASTERISK,
c25718
	TBNF_REGEX_TOK_PERIOD,
c25718
	TBNF_REGEX_TOK_DOLLAR,
c25718
	TBNF_REGEX_TOK_VLINE,
c25718
	TBNF_REGEX_TOK_QMARK,
c25718
	TBNF_REGEX_TOK_PLUS,
c25718
	TBNF_REGEX_TOK_CHAR,
c25718
c25718
	TBNF_REGEX_TOK_CAP,
c25718
};
c25718
c25718
#endif