mpl.mathtext.Group

class mpl.mathtext.Group(expr)[source]

Converter to return the matched tokens as a list - useful for returning tokens of C{L{ZeroOrMore}} and C{L{OneOrMore}} expressions.

__init__(expr)[source]

Methods

__init__(expr)
addCondition(*fns, **kwargs) Add a boolean predicate function to expression’s list of parse actions.
addParseAction(*fns, **kwargs) Add parse action to expression’s list of parse actions.
canParseNext(instring, loc)
checkRecursion(parseElementList)
copy() Make a copy of this C{ParserElement}.
enablePackrat() Enables “packrat” parsing, which adds memoizing to the parsing logic.
ignore(other)
inlineLiteralsUsing() Set class to be used for inclusion of string literals into a parser.
leaveWhitespace()
matches(testString[, parseAll]) Method for quick testing of a parser against a test string.
parseFile(file_or_filename[, parseAll]) Execute the parse expression on the given file or filename.
parseImpl(instring, loc[, doActions])
parseString(instring[, parseAll]) Execute the parse expression with the given string.
parseWithTabs() Overrides default behavior to expand C{<TAB>}s to spaces before parsing the input string.
postParse(instring, loc, tokenlist)
preParse(instring, loc)
resetCache()
runTests(tests[, parseAll, comment, ...]) Execute the parse expression on a series of test strings, showing each test, the parsed results or where the parse failed.
scanString(instring[, maxMatches, overlap]) Scan the input string for expression matches.
searchString(instring[, maxMatches]) Another extension to C{L{scanString}}, simplifying the access to the tokens found to match the given parse expression.
setBreak([breakFlag]) Method to invoke the Python pdb debugger when this element is about to be parsed.
setDebug([flag]) Enable display of debugging messages while doing pattern matching.
setDebugActions(startAction, successAction, ...) Enable display of debugging messages while doing pattern matching.
setDefaultWhitespaceChars(chars) Overrides the default whitespace chars
setFailAction(fn) Define action to perform if parsing fails at this expression.
setName(name) Define name for this expression, for use in debugging.
setParseAction(*fns, **kwargs) Define action to perform when successfully matching parse element definition.
setResultsName(name[, listAllMatches]) Define name for referencing matching tokens as a nested attribute of the returned parse results.
setWhitespaceChars(chars) Overrides the default whitespace chars
split(instring[, maxsplit, includeSeparators]) Generator method to split a string using the given expression as a separator.
streamline()
suppress() Suppresses the output of this C{ParserElement}; useful to keep punctuation from cluttering up returned output.
transformString(instring) Extension to C{L{scanString}}, to modify matching text with modified tokens that may be returned from a parse action.
tryParse(instring, loc)
validate([validateTrace])