public class RuleRegExp extends Object implements SemanticRule
| Constructor and Description |
|---|
RuleRegExp(String ruleName,
String regExp)
The rule specified by the regular expression.
|
| Modifier and Type | Method and Description |
|---|---|
int |
cost(Stack<Node> stack)
This function returns the cost of the rule for the specified stack.
|
String |
getName() |
public RuleRegExp(String ruleName, String regExp)
ruleName - name of the ruleregExp - regular expression for the rulepublic int cost(Stack<Node> stack) throws SemanticException
cost in interface Rulecost in interface SemanticRulestack - Node stack encountered so farSemanticExceptionpublic String getName()
getName in interface RulegetName in interface SemanticRuleCopyright © 2022 The Apache Software Foundation. All rights reserved.