edu.buffalo.nsf.xmlcqa.data.dtd
Class Concat

java.lang.Object
  extended byedu.buffalo.nsf.xmlcqa.data.dtd.NDFA
      extended byedu.buffalo.nsf.xmlcqa.data.dtd.RegExpr
          extended byedu.buffalo.nsf.xmlcqa.data.dtd.Concat
All Implemented Interfaces:
Constants

public class Concat
extends RegExpr

A class representing concatenation of two regular expressions. The first and second subexpressions are accesible by getExpr1() and getExpr2() respectively. A concatenation of two regular expressions is satisfied by a word which is a concatenation of two words satisfying respective regular expressions.

Author:
staworko

Field Summary
protected  RegExpr expr1
           
protected  RegExpr expr2
           
 
Fields inherited from class edu.buffalo.nsf.xmlcqa.data.dtd.NDFA
EPSILON
 
Fields inherited from interface edu.buffalo.nsf.xmlcqa.Constants
INF
 
Constructor Summary
Concat(RegExpr expr1, RegExpr expr2)
          Standard constructor.
 
Method Summary
protected  void _fillDelta(boolean[][][] delta, int offset)
          Used to fill tag driven part of the transition table of a regular expression whose position if relative to offset.
protected  void _fillEpsilonDelta(boolean[][] delta, int offset)
          Used to fill epsilon part of the transition talbe of a regular expressio whose possition is relative to offset.
protected  void _fillFinalStates(boolean[] f, int offset)
          Used to indicate final states of a regular expression whose position is relative to offset.
protected  int _getStateCount()
          Should return the number of states the implementation is using.
 NDFA getExpr1()
          Returns the first subexpression.
 NDFA getExpr2()
          Return the second subexpression.
 java.lang.String toString()
          Returns a string representation of this regular expression.
 
Methods inherited from class edu.buffalo.nsf.xmlcqa.data.dtd.RegExpr
getDelta, getEpsilonDelta, getFinalStates, getFstIndTrDelta, getFstTagTrDelta, getMinCostDelta, getStateCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

expr1

protected RegExpr expr1

expr2

protected RegExpr expr2
Constructor Detail

Concat

public Concat(RegExpr expr1,
              RegExpr expr2)
Standard constructor. Does nothing fancy, just initializes the fileds

Method Detail

_fillDelta

protected void _fillDelta(boolean[][][] delta,
                          int offset)
Description copied from class: RegExpr
Used to fill tag driven part of the transition table of a regular expression whose position if relative to offset. The implementing class doesn't have indicate transitions obtained in a consequence of clousure under epsilon transition. This clousure will be computed automatically by this class.

Specified by:
_fillDelta in class RegExpr

_fillEpsilonDelta

protected void _fillEpsilonDelta(boolean[][] delta,
                                 int offset)
Description copied from class: RegExpr
Used to fill epsilon part of the transition talbe of a regular expressio whose possition is relative to offset. The implementing class doesn't have indicate transitions obtained in the consequence of the clousure. This clousure will be computed by this class.

Specified by:
_fillEpsilonDelta in class RegExpr

_fillFinalStates

protected void _fillFinalStates(boolean[] f,
                                int offset)
Description copied from class: RegExpr
Used to indicate final states of a regular expression whose position is relative to offset.

Specified by:
_fillFinalStates in class RegExpr

_getStateCount

protected int _getStateCount()
Description copied from class: RegExpr
Should return the number of states the implementation is using. This method will be executed only once and its result stored and returned with each call of RegExpr.getStateCount() method (memoization).

Specified by:
_getStateCount in class RegExpr

getExpr1

public NDFA getExpr1()
Returns the first subexpression.


getExpr2

public NDFA getExpr2()
Return the second subexpression.


toString

public java.lang.String toString()
Returns a string representation of this regular expression.