abc.tm.ast
Class RegexAlternation_c
java.lang.Object
Node_c
abc.tm.ast.Regex_c
abc.tm.ast.RegexAlternation_c
- All Implemented Interfaces:
- Regex
public class RegexAlternation_c
- extends Regex_c
- Author:
- Julian Tibble, Eric Bodden
|
Method Summary |
java.util.Collection |
finalSymbols()
Return the set containing each symbol which occurs
as the final symbol of a string which matches this
regular expresion. |
void |
makeSM(StateMachine sm,
State start,
State finish,
boolean own_start)
Create a finite state machine for this regular
expression, given a start and finish node. |
boolean |
matchesEmptyString()
Returns true or false if the regular expression
matches the empty string, or not, respectively. |
java.util.Collection |
mustBind(java.util.Map sym_to_vars)
Return the set of pointcut variables which must be
bound by any string which matches this regular
expression. |
java.util.Collection |
nonFinalSymbols()
Return the set containing each symbol which occurs
as a non-final symbol in a string which matches this
regular expression. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
a
protected Regex a
b
protected Regex b
RegexAlternation_c
public RegexAlternation_c(Position pos,
Regex a,
Regex b)
mustBind
public java.util.Collection mustBind(java.util.Map sym_to_vars)
throws SemanticException
- Description copied from interface:
Regex
- Return the set of pointcut variables which must be
bound by any string which matches this regular
expression.
- Throws:
SemanticException
finalSymbols
public java.util.Collection finalSymbols()
- Description copied from interface:
Regex
- Return the set containing each symbol which occurs
as the final symbol of a string which matches this
regular expresion.
nonFinalSymbols
public java.util.Collection nonFinalSymbols()
- Description copied from interface:
Regex
- Return the set containing each symbol which occurs
as a non-final symbol in a string which matches this
regular expression.
n.b. this set will not, in general, be disjoint from
the set returned by finalSymbols()
matchesEmptyString
public boolean matchesEmptyString()
- Description copied from interface:
Regex
- Returns true or false if the regular expression
matches the empty string, or not, respectively.
makeSM
public void makeSM(StateMachine sm,
State start,
State finish,
boolean own_start)
- Create a finite state machine for this regular
expression, given a start and finish node.
start - the start nodefinish - the finish nodeown_start - true if, and only if, the current
regular expression is the only one
to create outgoing transitions from
the start node- See Also:
Regex.makeSM()