Package gavo :: Package rscdef :: Module builtingrammars
[frames] | no frames]

Module builtingrammars

source code

The built-in grammars of DaCHS.

Amend this GRAMMAR_REGISTRY if you write a new grammar distributed with DaCHS.

We had self-registration of grammars at one point, but having to import all grammars seemed quite a bit of waste, so how there's this manual registry.

Functions
 
getGrammar(*args) source code
Variables
  GRAMMAR_REGISTRY = {'binaryGrammar': ('grammars.binarygrammar'...
  __package__ = 'gavo.rscdef'
Function Details

getGrammar(*args)

source code 
Decorators:
  • @utils.memoized

Variables Details

GRAMMAR_REGISTRY

Value:
{'binaryGrammar': ('grammars.binarygrammar', 'BinaryGrammar'),
 'cdfHeaderGrammar': ('grammars.cdfgrammar', 'CDFHeaderGrammar'),
 'columnGrammar': ('grammars.columngrammar', 'ColumnGrammar'),
 'contextGrammar': ('svcs.inputdef', 'ContextGrammar'),
 'csvGrammar': ('grammars.csvgrammar', 'CSVGrammar'),
 'customGrammar': ('grammars.customgrammar', 'CustomGrammar'),
 'dictlistGrammar': ('grammars.dictlistgrammar', 'DictlistGrammar'),
 'directGrammar': ('grammars.directgrammar', 'DirectGrammar'),
...