Class RegexStringVisitor
- All Implemented Interfaces:
RegexVisitor<String>,org.antlr.v4.runtime.tree.ParseTreeVisitor<String>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionVisit a parse tree produced byRegexParser.atom().CharClass:
1.Visit a parse tree produced byRegexParser.charRange().Visit a parse tree produced byRegexParser.classAtom().Visit a parse tree produced byRegexParser.element().Visit a parse tree produced byRegexParser.expr().Visit a parse tree produced byRegexParser.group().+ : 1번 이상 * : 0번 이상 ? : 0 또는 1번 {n} : n번 반복 {n,m} : n ~ m 번 반복 {n,} : n번 이상 반복Visit a parse tree produced byRegexParser.regex().Methods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
aggregateResult, defaultResult, shouldVisitNextChild, visit, visitChildren, visitErrorNode, visitTerminalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.antlr.v4.runtime.tree.ParseTreeVisitor
visit, visitChildren, visitErrorNode, visitTerminal
-
Constructor Details
-
RegexStringVisitor
-
-
Method Details
-
visitRegex
Description copied from class:RegexBaseVisitorVisit a parse tree produced byRegexParser.regex().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRegexin interfaceRegexVisitor<String>- Overrides:
visitRegexin classRegexBaseVisitor<String>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitExpr
Description copied from class:RegexBaseVisitorVisit a parse tree produced byRegexParser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitExprin interfaceRegexVisitor<String>- Overrides:
visitExprin classRegexBaseVisitor<String>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitElement
Description copied from class:RegexBaseVisitorVisit a parse tree produced byRegexParser.element().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitElementin interfaceRegexVisitor<String>- Overrides:
visitElementin classRegexBaseVisitor<String>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAtom
Description copied from class:RegexBaseVisitorVisit a parse tree produced byRegexParser.atom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAtomin interfaceRegexVisitor<String>- Overrides:
visitAtomin classRegexBaseVisitor<String>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitGroup
Description copied from class:RegexBaseVisitorVisit a parse tree produced byRegexParser.group().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitGroupin interfaceRegexVisitor<String>- Overrides:
visitGroupin classRegexBaseVisitor<String>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitQuantifier
+ : 1번 이상 * : 0번 이상 ? : 0 또는 1번 {n} : n번 반복 {n,m} : n ~ m 번 반복 {n,} : n번 이상 반복- Specified by:
visitQuantifierin interfaceRegexVisitor<String>- Overrides:
visitQuantifierin classRegexBaseVisitor<String>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCharRange
Description copied from class:RegexBaseVisitorVisit a parse tree produced byRegexParser.charRange().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCharRangein interfaceRegexVisitor<String>- Overrides:
visitCharRangein classRegexBaseVisitor<String>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCharClass
CharClass:
1. Selects one of the characters inside the brackets. e.g. [abc] -> c
2. Selects a character within a specified range. e.g. [a-z] -> any character from 'a' to 'z'
3. Negation: selects a character that is not in the brackets. e.g. [^a] -> any character except 'a'- Specified by:
visitCharClassin interfaceRegexVisitor<String>- Overrides:
visitCharClassin classRegexBaseVisitor<String>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitClassAtom
Description copied from class:RegexBaseVisitorVisit a parse tree produced byRegexParser.classAtom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitClassAtomin interfaceRegexVisitor<String>- Overrides:
visitClassAtomin classRegexBaseVisitor<String>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-