abc.tm.ast
Class RegexCount_c

java.lang.Object
  extended by Node_c
      extended by abc.tm.ast.Regex_c
          extended by abc.tm.ast.RegexCount_c
All Implemented Interfaces:
Regex

public class RegexCount_c
extends Regex_c

Author:
Julian Tibble, Eric Bodden

Field Summary
protected  Regex a
           
protected  int max
           
protected  int min
           
 
Constructor Summary
RegexCount_c(Position pos, Regex a, int min, int max)
           
 
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 abc.tm.ast.Regex_c
makeSM
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

protected Regex a

min

protected int min

max

protected int max
Constructor Detail

RegexCount_c

public RegexCount_c(Position pos,
                    Regex a,
                    int min,
                    int max)
Method Detail

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 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:
Regex.makeSM()