public class ExpressionUnion extends Expression
Expression.Provider, Expression.Type
allowsEmpty, TOKEN_MS_MARK, TOKEN_MT_CLOSE, TOKEN_MT_OPEN, TOKEN_OP_CONCAT, TOKEN_OP_STAR, TOKEN_OP_UNION, TOKEN_RE_EMPTY, TOKEN_RE_EPSILON
Modifier | Constructor and Description |
---|---|
protected |
ExpressionUnion(Expression leftOperand,
Expression rightOperand)
Creates an instance of the union regular subexpression.
|
Modifier and Type | Method and Description |
---|---|
ExpressionUnion |
duplicateExpression()
Creates a new independent copy of the particular expression.
|
java.util.Set<java.lang.String> |
getSymbols()
Returns the set of alphabet symbols occurring in the expression.
|
Expression.Type |
getType()
Returns the type of a given regular subexpression.
|
protected void |
markSymbols(Expression.Provider provider)
Marks all individual symbols of the alphabet.
|
boolean |
resolveEmpty()
The Empty function for Glushkov automaton construction.
|
java.util.Set<java.lang.String> |
resolveFirst()
The First function for Glushkov automaton construction.
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
resolveFollow()
The Follow function for Glushkov automaton construction.
|
java.util.Set<java.lang.String> |
resolveLast()
The Last function for Glushkov automaton construction.
|
java.lang.String |
serializeExpression()
Serializes the inductive structure of the regular expression.
|
createExpression, markExpression, parseOperand, trimMarking
protected ExpressionUnion(Expression leftOperand, Expression rightOperand)
leftOperand
- Left subexpression of the concatenation operation.rightOperand
- Right subexpression of the concatenation operation.public ExpressionUnion duplicateExpression()
Expression
duplicateExpression
in class Expression
public Expression.Type getType()
Expression
getType
in class Expression
public java.lang.String serializeExpression()
Expression
serializeExpression
in class Expression
public java.util.Set<java.lang.String> getSymbols()
Expression
getSymbols
in class Expression
protected void markSymbols(Expression.Provider provider)
Expression
markSymbols
in class Expression
provider
- References to the generator of number postfixes.public boolean resolveEmpty()
Expression
resolveEmpty
in class Expression
true
if expression may be empty.public java.util.Set<java.lang.String> resolveFirst()
Expression
resolveFirst
in class Expression
public java.util.Set<java.lang.String> resolveLast()
Expression
resolveLast
in class Expression
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> resolveFollow()
Expression
resolveFollow
in class Expression