Package gavo :: Package grammars :: Module common
[frames] | no frames]

Module common

source code

Base classes and common code for grammars.

NOTE: If you add grammars, you have to enter manually them in rscdef.builtingrammars.GRAMMAR_REGISTRY (we don't want to import all the mess in this package just to make that).

Classes
  ParseError
is an error raised by grammars if their input is somehow wrong.
  REAttribute
is an attribute containing (compiled) RE
  FilteredInputFile
a pseudo-file that allows piping data thorugh a shell command.
  Rowfilter
A generator for rows coming from a grammar.
  SourceFieldApp
A procedure application that returns a dictionary added to all incoming rows.
  MapKeys
Mapping of names, specified in long or short forms.
  RowIterator
An object that encapsulates the a source being parsed by a grammar.
  FileRowIterator
is a RowIterator base for RowIterators reading files.
  FileRowAttributes
A mixin for grammars with FileRowIterators.
  GrammarMacroMixin
A collection of macros available to rowfilters.
  Grammar
An abstract grammar.
  NullGrammar
A grammar that never returns any rows.
  TransparentGrammar
A grammar that returns its sourceToken as the row iterator.
Functions
 
compileRowfilter(filters)
returns an iterator that "pipes" the rowfilters in filters.
source code
Variables
  __package__ = 'gavo.grammars'
Function Details

compileRowfilter(filters)

source code 

returns an iterator that "pipes" the rowfilters in filters.

This means that the output of filters[0] is used as arguments to filters[1] and so on.

If filters is empty, None is returned.