parserFwk.pyparsing.Forward

Package parserFwk :: Module pyparsing :: Class Forward |
[frames | no frames]

## Type Forward

         object --+
                  |
      ParserElement --+
                      |
    ParseElementEnhance --+
                          |
                         Forward

Forward declaration of an expression to be defined later - used for recursive grammars, such as algebraic infix notation. When the expression is known, it is assigned to the Forward variable using the '<<' operator.

Note: take care when assigning to Forward not to overlook precedence of operators. Specifically, '|' has a lower precedence than '<<', so that:

      fwdExpr << a | b | c

will actually be evaluated as:

      (fwdExpr << a) | b | c

thereby leaving b and c out as parseable alternatives. It is recommended that you explicitly group the values inserted into the Forward:

      fwdExpr << (a | b | c)

Method Summary
| `__init__(self, other)`
| `__lshift__(self, other)`
| `__str__(self)`
| ``copy`(self)` Make a copy of this ParserElement.
| ``leaveWhitespace`(self)` Disables the skipping of whitespace before matching the characters in the ParserElement's defined pattern.
| `streamline(self)`
| ``validate`(self, validateTrace)` Check defined expressions for valid structure, check for infinite recursive definitions.
Inherited from `ParseElementEnhance`: `checkRecursion`, `ignore`, `parseImpl` Inherited from `ParserElement`: `__add__`, `__and__`, `__call__`, `__getattr__`, `__invert__`, `__or__`, `__radd__`, `__rand__`, `__repr__`, `__ror__`, `__rxor__`, `__xor__`, `addParseAction`, `enablePackrat`, `getException`, `normalizeParseActionArgs`, `parseFile`, `parseString`, `parseWithTabs`, `postParse`, `preParse`, `resetCache`, `scanString`, `searchString`, `setBreak`, `setDebug`, `setDebugActions`, `setDefaultWhitespaceChars`, `setFailAction`, `setName`, `setParseAction`, `setResultsName`, `setWhitespaceChars`, `skipIgnorables`, `suppress`, `transformString`, `tryParse` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`

Class Variable Summary
Inherited from `ParserElement`: `DEFAULT_WHITE_CHARS`

Instance Method Details

### copy(self) Make a copy of this ParserElement. Useful for defining different parse actions for the same parsing pattern, using copies of the original parse element. Overrides: `parserFwk.pyparsing.ParserElement.copy` (inherited documentation)

### leaveWhitespace(self) Disables the skipping of whitespace before matching the characters in the ParserElement's defined pattern. This is normally only used internally by the pyparsing module, but may be needed in some whitespace-sensitive grammars. Overrides: `parserFwk.pyparsing.ParseElementEnhance.leaveWhitespace` (inherited documentation)

### validate(self, validateTrace=[]) Check defined expressions for valid structure, check for infinite recursive definitions. Overrides: `parserFwk.pyparsing.ParseElementEnhance.validate` (inherited documentation)

Generated by Epydoc 2.1 on Sun Oct 07 01:31:52 2007 | http://epydoc.sf.net