Add parser AST node definitions
This commit is contained in:
30
regex_humanizer/parser/__init__.py
Normal file
30
regex_humanizer/parser/__init__.py
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
"""Parser module for tokenizing and building AST from regex patterns."""
|
||||||
|
|
||||||
|
from .ast import (
|
||||||
|
ASTNode,
|
||||||
|
Literal,
|
||||||
|
CharacterClass,
|
||||||
|
Quantifier,
|
||||||
|
Group,
|
||||||
|
Alternation,
|
||||||
|
Anchor,
|
||||||
|
SpecialSequence,
|
||||||
|
Backreference,
|
||||||
|
)
|
||||||
|
from .tokenizer import tokenize
|
||||||
|
from .parser import parse_regex, ParseError
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"ASTNode",
|
||||||
|
"Literal",
|
||||||
|
"CharacterClass",
|
||||||
|
"Quantifier",
|
||||||
|
"Group",
|
||||||
|
"Alternation",
|
||||||
|
"Anchor",
|
||||||
|
"SpecialSequence",
|
||||||
|
"Backreference",
|
||||||
|
"tokenize",
|
||||||
|
"parse_regex",
|
||||||
|
"ParseError",
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user