Package gavo :: Package grammars :: Module directgrammar :: Class DirectGrammar
[frames] | no frames]

Class DirectGrammar

source code

                   object --+            
                            |            
 base.structure.StructureBase --+        
                                |        
                   object --+   |        
                            |   |        
           base.common.Parser --+        
                                |        
base.structure.ParseableStructure --+    
                                    |    
             base.structure.Structure --+
                                        |
                           object --+   |
                                    |   |
      base.structure.RestrictionMixin --+
                                        |
                                       DirectGrammar

A user-defined external grammar.

See the `separate document`_ on user-defined code on more on direct grammars.

You will almost always use these in connection with C code generated by ``dachs mkboost``.

.. _separate document: :dachsdoc:booster.html

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
validate(self) source code
 
onElementComplete(self) source code
 
getBooster(self) source code
 
parse(self, sourceToken, targetData=None) source code
 
getFullId(self) source code

Inherited from base.structure.Structure: __provides__, callCompletedCallbacks, completeElement, finishElement

Inherited from base.structure.ParseableStructure: __init__, end_, feed, feedFrom, feedObject, getAttribute, iterEvents, start_, value_

Inherited from base.structure.StructureBase: __providedBy__, adopt, breakCircles, change, copy, getAttributes, getCopyableAttributes, getSourcePosition, iterChildren, setPosition

Inherited from base.common.Parser: feedEvent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'directGrammar'
a sentinel for all kinds of undefined values.
  isDispatching = False
  attrSeq = [<gavo.base.attrdef.UnicodeAttribute object>, <gavo....
  managedAttrs = {'autoNull': <gavo.base.attrdef.UnicodeAttribut...

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties
  cBooster
  rd

Inherited from object: __class__

Method Details

validate(self)

source code 
Overrides: base.structure.Structure.validate

onElementComplete(self)

source code 
Overrides: base.structure.Structure.onElementComplete

Class Variable Details

attrSeq

Value:
[<gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.rscdef.common.ResdirRelativeAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.IntAttribute object>,
 <gavo.base.attrdef.BooleanAttribute object>,
 <gavo.base.parsecontext.IdAttribute object>,
 <gavo.base.attrdef.BooleanAttribute object>,
 <gavo.base.complexattrs.StructAttribute object>,
...

managedAttrs

Value:
{'autoNull': <gavo.base.attrdef.UnicodeAttribute object>,
 'cBooster': <gavo.rscdef.common.ResdirRelativeAttribute object>,
 'customFlags': <gavo.base.attrdef.UnicodeAttribute object>,
 'extension': <gavo.base.attrdef.IntAttribute object>,
 'gzippedInput': <gavo.base.attrdef.BooleanAttribute object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'ignoreBadRecords': <gavo.base.attrdef.BooleanAttribute object>,
 'mapKeys': <gavo.base.complexattrs.StructAttribute object>,
...

Property Details

cBooster

Get Method:
unreachable.computePath(instance)
Set Method:
unreachable.setRelative(instance, value)

rd

Get Method:
unreachable._getRD(self)