Class RegexParser
java.lang.Object
org.eu.autogex.regex.parser.RegexParser
A Recursive Descent Parser that converts a Regular Expression string into an Abstract Syntax Tree (AST). * Grammar implemented: Regex -> Term ( '|' Term )* Term -> Factor ( Factor )* (Implicit concatenation) Factor -> Base ( '*' )* Base -> char | '(' Regex ')'
-
Method Summary
-
Method Details
-
parse
Parses a regular expression string into an AST.- Parameters:
regex- The regular expression string to parse.- Returns:
- The root node of the generated AST.
- Throws:
IllegalArgumentException- If the regex syntax is invalid.
-