Table of Contents

Class: CGrammar Zope-2.2.1-src/lib/python/Products/ZGadflyDA/gadfly/kjParseBuild.py

a derived grammar class (object oriented programming is cool!) this is a compilable grammar for automatic parser generation.

Base Classes   
kjParser.Grammar
Methods   
Compile
Declarerules
Keywords
MarshalDump
Nonterms
Reconstruct
comments
punct
  Compile 
Compile ( self,  MetaGrammar=RULEGRAM )

The compilation function assumes NonTermDict RuleString LexD TermDict have all been set up properly (at least if the default MetaGrammar is used). On successful completion it will set up DFA RuleL RuleNameToIndex

  Declarerules 
Declarerules ( self,  StringWithRules )

initialize or add more rules to the RuleString

  Keywords 
Keywords ( self,  Stringofkeys )

insert a white separated list of keywords into the LexD THIS SHOULD CHECK FOR KEYWORD/NONTERMINAL/PUNCT NAME COLLISIONS (BUT DOESN'T YET).

  MarshalDump 
MarshalDump ( self,  Tofile )

marshalling of a grammar to a file

  Nonterms 
Nonterms ( self,  StringofNonterms )

register a white separated list of nonterminal strings

  Reconstruct 
Reconstruct (
        self,
        VarName,
        Tofile,
        FName=None,
        indent='',
        )

utility classes

Grammar reconstruction objects encapsulate the process of grammar archiving.

  comments 
comments ( self,  listOfCommentStrings )

register a list of regular expression strings to represent comments in LexD

  punct 
punct ( self,  Stringofpuncts )

insert a string of punctuations into the LexD


Table of Contents

This document was automatically generated on Mon Sep 4 07:33:06 2000 by HappyDoc version r0_6