Package lepl :: Package matchers :: Module operators
[hide private]
[frames] | no frames]

Module operators

source code

Support for operator syntactic sugar (and operator redefinition).
Classes [hide private]
  OperatorNamespace
Define the default operators.
  Override
Allow an operator to be redefined within a with context.
  _BaseSeparator
Support class for Separator and similar classes.
  Separator
Redefine [] and & to include the given matcher as a separator (so it will be used between list items and between matchers separated by the & operator)
  DroppedSpace
Skip spaces (by default, zero or more Space()).
  SmartSeparator1
Similar to Separator, but tried to be clever about whether the separator is needed.
  OperatorMixin
Define the operators used to combine elements in a grammar specification.
Functions [hide private]
 
RepeatWrapper(matcher, start, stop, step, separator, add, reduce)
Parse step if it is a string.
source code
Variables [hide private]
  DIGITS = compile_('^(-?\d+)(.*)')
  OPERATORS = 'operators'
The name used to retrieve operators definitions.
  SPACE_OPT = '/'
Name for / operator.
  SPACE_REQ = '//'
Name for // operator.
  ADD = '+'
Name for + operator.
  AND = '&'
Name for & operator.
  OR = '|'
Name for | operator.
  APPLY = '>'
Name for > operator.
  APPLY_RAW = '>='
Name for >= operator.
  NOT = '~'
Name for ~ operator.
  KARGS = '**'
Name for ** operator.
  RAISE = '^'
Name for ^ operator.
  REPEAT = '[]'
Name for [] operator.
  FIRST = '%'
Name for % operator.
  MAP = '>>'
Name for >> operator.
  REDUCE = '<reduce>'
Name for accumulator of data during repetition.
  GREEDY = 'g'
Flag (splice increment) for inefficient, guaranteed greedy matching.
  NON_GREEDY = 'n'
Flag (splice increment) for inefficient, guaranteed non-greedy matching.
  DEPTH_FIRST = 'd'
Flag (splice increment) for efficient, quasi-greedy, matching (default).
  BREADTH_FIRST = 'b'
Flag (splice increment) for efficient, quasi-non-greedy, matching.