Home | Trees | Index | Help |
|
---|
Package Cheetah :: Module Parser :: Class _HighLevelParser |
|
SourceReader
--+ |_LowLevelParser
--+ | _HighLevelParser
Method Summary | |
---|---|
__init__(self,
src,
filename,
breakPoint,
compiler)
| |
Pipes cheetah expressions through a set of optional filter hooks. | |
_eatDefOrBlock(self,
directiveName)
| |
_eatMultiLineDef(self,
directiveName,
methodName,
argsList,
startPos,
isLineClearToStartToken)
| |
_eatRestOfDirectiveTag(self,
isLineClearToStartToken,
endOfFirstLinePos)
| |
_eatSingleLineDef(self,
directiveName,
methodName,
argsList,
startPos,
endPos)
| |
_eatToThisEndDirective(self,
directiveName)
| |
_filterDisabledDirectives(self,
directiveName)
| |
_initDirectives(self)
| |
assertEmptyOpenDirectivesStack(self)
| |
Cleanup to remove any possible reference cycles | |
Is called by the Compiler instance after the parser has had a settingsManager assigned with self.setSettingsManager() | |
eatAttr(self)
| |
eatBlock(self)
| |
Tells the parser to stop parsing at this point and completely ignore everything else. | |
eatCache(self)
| |
eatCall(self)
| |
eatCallArg(self)
| |
eatCapture(self)
| |
eatClosure(self)
| |
eatComment(self)
| |
eatCompiler(self)
| |
eatCompilerSettings(self)
| |
eatDecorator(self)
| |
eatDef(self)
| |
eatDefMacro(self)
| |
eatDirective(self)
| |
eatEncoding(self)
| |
eatEndDirective(self)
| |
eatEOLSlurpToken(self)
| |
eatErrorCatcher(self)
| |
eatExtends(self)
| |
eatFilter(self)
| |
eatIf(self)
| |
eatImplements(self)
| |
eatInclude(self)
| |
eatMacroCall(self)
| |
eatMultiLineComment(self)
| |
eatPlaceholder(self)
| |
eatPlainText(self)
| |
eatPSP(self)
| |
eatRaw(self)
| |
eatSet(self)
| |
eatShbang(self)
| |
eatSimpleExprDirective(self,
directiveName,
includeDirectiveNameInExpr)
| |
eatSimpleIndentingDirective(self,
directiveName,
callback,
includeDirectiveNameInExpr)
| |
eatSlurp(self)
| |
handleEndDef(self)
| |
parse(self,
breakPoint,
assertEmptyStack)
| |
popFromOpenDirectivesStack(self,
directiveName)
| |
pushToOpenDirectivesStack(self,
directiveName)
| |
setupState(self)
| |
Inherited from _LowLevelParser | |
| |
Setup the regexs for Cheetah $var parsing. | |
Construct the regex bits that are used in comment parsing. | |
Construct the regexs that are used in directive parsing. | |
Setup the regexs for PSP parsing. | |
| |
| |
Get a method/function call argument string. | |
This is called when parsing inside expressions. | |
| |
[ (namemapperPart,autoCall,restOfName), ] | |
just the start token, not the enclosure or cache token | |
| |
Get an argument list. | |
| |
| |
| |
| |
Returns the output of self.getExpressionParts() as a concatenated string rather than as a list. | |
Get a Cheetah expression that includes $CheetahVars and break at directive end tokens, the end of an enclosure, or at a specified pyToken. | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
includes the enclosure and cache token | |
includes the enclosure and cache token | |
| |
| |
Returns False or the name of the directive matched. | |
| |
| |
| |
| |
includes the enclosure and cache token | |
| |
| |
| |
| |
| |
| |
| |
self.matchCommentStartToken self.matchMultiLineCommentStartToken self.matchVariablePlaceholderStart self.matchExpressionPlaceholderStart self.matchDirective self.matchPSPStartToken self.matchEOLSlurpToken | |
includes the enclosure and cache token | |
| |
| |
| |
| |
Takes a token from the expression being parsed and performs and special transformations required by Cheetah. | |
| |
Inherited from SourceReader | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
Class Variable Summary | |
---|---|
dict |
_directiveHandlerNames = {'import': 'addImportStatement'...
|
list |
_simpleExprDirectives = ['pass', 'continue', 'stop', 're...
|
list |
_simpleIndentingDirectives = ['else', 'elif', 'for', 'wh...
|
Inherited from _LowLevelParser | |
NoneType |
_settingsManager = None |
Method Details |
---|
_applyExpressionFilters(self, expr, exprType, rawExpr=None, startPos=None)Pipes cheetah expressions through a set of optional filter hooks. The filters are functions which may modify the expressions or raise a ForbiddenExpression exception if the expression is not allowed. They are defined in the compiler setting 'expressionFilterHooks'. Some intended use cases:
|
cleanup(self)Cleanup to remove any possible reference cycles |
configureParser(self)Is called by the Compiler instance after the parser has had a settingsManager assigned with self.setSettingsManager()
|
eatBreakPoint(self)Tells the parser to stop parsing at this point and completely ignore everything else. This is a debugging tool. |
Class Variable Details |
---|
_directiveHandlerNames
|
_simpleExprDirectives
|
_simpleIndentingDirectives
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:23 2006 | http://epydoc.sf.net |