abc.tm.ast
Interface Regex

All Known Implementing Classes:
Regex_c, RegexAlternation_c, RegexConjunction_c, RegexCount_c, RegexPlus_c, RegexSkipSeq_c, RegexStar_c, RegexSymbol_c

public interface Regex

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.
 StateMachine makeSM()
          Creates a finite state machine, equivalent to the regular expression, which is used by the weaver.
 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.
 

Method Detail

mustBind

java.util.Collection mustBind(java.util.Map sym_to_vars)
                              throws SemanticException
Return the set of pointcut variables which must be bound by any string which matches this regular expression.

Throws:
SemanticException

finalSymbols

java.util.Collection finalSymbols()
Return the set containing each symbol which occurs as the final symbol of a string which matches this regular expresion.


nonFinalSymbols

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. n.b. this set will not, in general, be disjoint from the set returned by finalSymbols()


matchesEmptyString

boolean matchesEmptyString()
Returns true or false if the regular expression matches the empty string, or not, respectively.


makeSM

StateMachine makeSM()
Creates a finite state machine, equivalent to the regular expression, which is used by the weaver.


makeSM

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.

Parameters:
start - the start node
finish - the finish node
own_start - true if, and only if, the current regular expression is the only one to create outgoing transitions from the start node
See Also:
makeSM()