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]
Define the default operators.
Allow an operator to be redefined within a with context.
Support class for Separator and similar classes.
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)
Skip spaces (by default, zero or more Space()).
Similar to Separator, but tried to be clever about whether the separator is needed.
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.
Flag (splice increment) for efficient, quasi-greedy, matching (default).
Flag (splice increment) for efficient, quasi-non-greedy, matching.