automaton Class Reference

#include <automaton.hpp>

Public Member Functions

 automaton ()
 
 ~automaton ()
 
int parse (const char *)
 
int match (const char *, int)
 
int getCurrentPos ()
 
void setMinimal (bool)
 
bool getMinimal ()
 

Private Member Functions

int expression ()
 
int term ()
 
int factor ()
 
int set ()
 
int letter (int)
 
void setState (int, int, int, int)
 
int insertSet (char *, int)
 
int checkRange (char *, int, char)
 

Private Attributes

int * ch
 
int * next1
 
int * next2
 
int final
 
const char * regexp
 
int ** setArray
 
int setSize
 
int size
 
int freeState
 
int currentPos
 
bool minimal
 

Detailed Description

Definition at line 50 of file automaton.hpp.

Constructor & Destructor Documentation

◆ automaton()

automaton::automaton ( )

Definition at line 53 of file automaton.cpp.

References ch, next1, next2, and size.

◆ ~automaton()

automaton::~automaton ( )

Definition at line 64 of file automaton.cpp.

References ch, next1, next2, setArray, setSize, and size.

Member Function Documentation

◆ checkRange()

int automaton::checkRange ( char *  range,
int  length,
char  c 
)
private

Definition at line 737 of file automaton.cpp.

Referenced by set().

◆ expression()

int automaton::expression ( )
private

Definition at line 325 of file automaton.cpp.

References ch, currentPos, EPSILON, freeState, next2, regexp, setState(), and term().

Referenced by factor(), and parse().

◆ factor()

int automaton::factor ( )
private

◆ getCurrentPos()

int automaton::getCurrentPos ( )
inline

Definition at line 61 of file automaton.hpp.

References currentPos.

Referenced by RexxMethod2(), and RexxMethod3().

◆ getMinimal()

bool automaton::getMinimal ( )
inline

Definition at line 64 of file automaton.hpp.

References minimal.

Referenced by RexxMethod2().

◆ insertSet()

int automaton::insertSet ( char *  range,
int  rangeSize 
)
private

Definition at line 759 of file automaton.cpp.

References setArray, and setSize.

Referenced by set().

◆ letter()

int automaton::letter ( int  c)
private

Definition at line 293 of file automaton.cpp.

Referenced by factor(), and term().

◆ match()

int automaton::match ( const char *  a,
int  N 
)

◆ parse()

int automaton::parse ( const char *  regexp)

Definition at line 191 of file automaton.cpp.

References ANY, ch, currentPos, EOP, EPSILON, expression(), freeState, minimal, next1, next2, NOT, regexp, SCAN, SET, setArray, setSize, setState(), and size.

Referenced by RexxMethod2(), and RexxMethod3().

◆ set()

int automaton::set ( )
private

Definition at line 545 of file automaton.cpp.

References checkRange(), currentPos, E_ILLEGAL_SET, E_ILLEGAL_SYMBOLIC_NAME, freeState, insertSet(), NOT, regexp, SET, and setState().

Referenced by factor(), and match().

◆ setMinimal()

void automaton::setMinimal ( bool  f)

Definition at line 90 of file automaton.cpp.

References EOP, EPSILON, minimal, and setState().

Referenced by RexxMethod2(), and RexxMethod3().

◆ setState()

void automaton::setState ( int  position,
int  transition,
int  state1,
int  state2 
)
private

Definition at line 714 of file automaton.cpp.

References ch, next1, next2, and size.

Referenced by expression(), factor(), parse(), set(), and setMinimal().

◆ term()

int automaton::term ( )
private

Definition at line 355 of file automaton.cpp.

References currentPos, factor(), letter(), and regexp.

Referenced by expression().

Member Data Documentation

◆ ch

int* automaton::ch
private

Definition at line 81 of file automaton.hpp.

Referenced by automaton(), expression(), factor(), match(), parse(), setState(), and ~automaton().

◆ currentPos

int automaton::currentPos
private

Definition at line 94 of file automaton.hpp.

Referenced by expression(), factor(), getCurrentPos(), match(), parse(), set(), and term().

◆ final

int automaton::final
private

Definition at line 85 of file automaton.hpp.

◆ freeState

int automaton::freeState
private

Definition at line 93 of file automaton.hpp.

Referenced by expression(), factor(), parse(), and set().

◆ minimal

bool automaton::minimal
private

Definition at line 95 of file automaton.hpp.

Referenced by getMinimal(), match(), parse(), and setMinimal().

◆ next1

int* automaton::next1
private

Definition at line 82 of file automaton.hpp.

Referenced by automaton(), factor(), match(), parse(), setState(), and ~automaton().

◆ next2

int* automaton::next2
private

Definition at line 83 of file automaton.hpp.

Referenced by automaton(), expression(), factor(), match(), parse(), setState(), and ~automaton().

◆ regexp

const char* automaton::regexp
private

Definition at line 87 of file automaton.hpp.

Referenced by expression(), factor(), parse(), set(), and term().

◆ setArray

int** automaton::setArray
private

Definition at line 89 of file automaton.hpp.

Referenced by insertSet(), match(), parse(), and ~automaton().

◆ setSize

int automaton::setSize
private

Definition at line 90 of file automaton.hpp.

Referenced by insertSet(), parse(), and ~automaton().

◆ size

int automaton::size
private

Definition at line 92 of file automaton.hpp.

Referenced by automaton(), factor(), parse(), setState(), and ~automaton().


The documentation for this class was generated from the following files: