reCompiler

Module re_compile – compile a regular expression into an FSA

To Do

New features:
  • add -, ~
  • add remaining metachars
  • char set with ^ as first char will print wrong
  • figure out when to print spaces between operators
class reCompiler.CharacterSet(ranges)[source]

Bases: object

ANY = <CharacterSet .>
complement()[source]
convertString(_str)[source]
crep(c)[source]
intersection(other)[source]
matches(c)[source]
union(other)[source]
class reCompiler.RECompiler(str, recordSourcePositions=0)[source]

Bases: reCompiler.SymbolRECompiler

readCSetInnards()[source]
class reCompiler.SymbolRECompiler(str, recordSourcePositions=0)[source]

Bases: object

EOF = -1
compileConjunction()[source]
compileExpr()[source]
compileItem()[source]
compileSequence()[source]
peekChar()[source]
peekToken()[source]
readChar()[source]
readToken()[source]
skipTokens(bag)[source]
toFSA(minimize=1)[source]
reCompiler.compileRE(_str, minimize=1, recordSourcePositions=0)[source]
reCompiler.compileSymbolRE(str)[source]
reCompiler.dummy_func(a, b)[source]