Package lemon :: Package external :: Package Cheetah :: Module Parser
[show private | hide private]
[frames | no frames]

Module lemon.external.Cheetah.Parser

Parser classes for Cheetah's Compiler

Classes:
  ParseError( Exception )
  _LowLevelSemanticsParser( Lexer )
  _HighLevelSemanticsParser( _LowLevelSemanticsParser )
  Parser === _HighLevelSemanticsParser (an alias)

where:
  Lexer ===  Cheetah.Lexer.Lexer(
                                 Cheetah.SettingsManager.SettingsManager,
                                 Cheetah.SourceReader.SourceReader
                                )

Meta-Data
================================================================================
Author: Tavis Rudd <tavis@damnsimple.com>
Version: $Revision: 1.1 $
Start Date: 2001/08/01
Last Revision Date: $Date: 2003/08/12 09:17:11 $

Classes
ArgList Used by _LowLevelSemanticsParser.getArgList()...

Exceptions
ParseError  

Function Summary
  any(*choices)
  escapeRegexChars(txt, escapeRE)
Return a txt with all special regular expressions chars escaped.
  group(*choices)
  makeTripleQuoteRe(start, end)
  maybe(*choices)
  namedGroup(name, *choices)
  nongroup(*choices)

Variable Summary
str __author__ = 'Tavis Rudd <tavis@damnsimple.com>'
str __revision__ = '1.1'
tuple assignmentOps = ('=', '+=', '-=', '/=', '*=', '**=', '^=...
str assignOp = '='
tuple augAssignOps = ('+=', '-=', '/=', '*=', '**=', '^=', '%=...
tuple binaryArithOps = ('+', '-', '/', '//', '%')
tuple bitwiseOps = ('&', '|', '^')
tuple booleanOps = ('and', 'or', 'not')
dict closurePairs = {')': '(', '}': '{', ']': '['}
dict closurePairsRev = {'(': ')', '[': ']', '{': '}'}
tuple compOps = ('<', '>', '==', '!=', '<=', '>=', '<>', 'is',...
tuple delimeters = ('(', ')', '{', '}', '[', ']', ',', '.', ':...
str double3 = '"""'
str EOL = '\\r\\n|\\n|\\r'
SRE_Pattern EOLre = (?:\r\n|\r|\n)
str EOLZ = '\\r\\n|\\n|\\r|\\Z'
str escCharLookBehind = '(?:(?<=\\A)|(?<!\\\\))'
str identchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP...
tuple keywords = ('and', 'del', 'for', 'is', 'raise', 'assert'...
str nameCharLookAhead = '(?=[A-Za-z_])'
str namechars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQ...
int NO_CACHE = 0                                                                     
tuple operators = ('**', '+', '-', '~', '+', '-', '/', '//', '...
str powerOp = '**'
int REFRESH_CACHE = 2                                                                     
tuple shiftOps = ('>>', '<<')
str single3 = "'''"
int STATIC_CACHE = 1                                                                     
dict tripleQuotedStringPairs = {'ur"""': '"""', 'uR"""': '"""...
dict tripleQuotedStringREs = {'ur"""': <_sre.SRE_Pattern obje...
tuple tripleQuotedStringStarts = ("'''", '"""', "r'''", 'r"""'...
tuple unaryArithOps = ('+', '-', '~')
str WS = '[ \\f\\t]*'

Function Details

escapeRegexChars(txt, escapeRE=<_sre.SRE_Pattern object at 0x00EC3500>)

Return a txt with all special regular expressions chars escaped.

Variable Details

__author__

Type:
str
Value:
'Tavis Rudd <tavis@damnsimple.com>'                                    

__revision__

Type:
str
Value:
'1.1'                                                                  

assignmentOps

Type:
tuple
Value:
('=', '+=', '-=', '/=', '*=', '**=', '^=', '%=', '>>=')                

assignOp

Type:
str
Value:
'='                                                                    

augAssignOps

Type:
tuple
Value:
('+=', '-=', '/=', '*=', '**=', '^=', '%=', '>>=', '<<=', '&=', '|=')  

binaryArithOps

Type:
tuple
Value:
('+', '-', '/', '//', '%')                                             

bitwiseOps

Type:
tuple
Value:
('&', '|', '^')                                                        

booleanOps

Type:
tuple
Value:
('and', 'or', 'not')                                                   

closurePairs

Type:
dict
Value:
{')': '(', '}': '{', ']': '['}                                         

closurePairsRev

Type:
dict
Value:
{'(': ')', '[': ']', '{': '}'}                                         

compOps

Type:
tuple
Value:
('<', '>', '==', '!=', '<=', '>=', '<>', 'is', 'in')                   

delimeters

Type:
tuple
Value:
('(', ')', '{', '}', '[', ']', ',', '.', ':')                          

double3

Type:
str
Value:
'"""'                                                                  

EOL

Type:
str
Value:
'''\\r\
|\
|\\r'''                                                                

EOLre

Type:
SRE_Pattern
Value:
(?:\r\n|\r|\n)                                                         

EOLZ

Type:
str
Value:
'''\\r\
|\
|\\r|\\Z'''                                                            

escCharLookBehind

Type:
str
Value:
'(?:(?<=\\A)|(?<!\\\\))'                                               

identchars

Type:
str
Value:
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_'                

keywords

Type:
tuple
Value:
('and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda\
')                                                                     

nameCharLookAhead

Type:
str
Value:
'(?=[A-Za-z_])'                                                        

namechars

Type:
str
Value:
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789'      

NO_CACHE

Type:
int
Value:
0                                                                     

operators

Type:
tuple
Value:
('**', '+', '-', '~', '+', '-', '/', '//', '%')                        

powerOp

Type:
str
Value:
'**'                                                                   

REFRESH_CACHE

Type:
int
Value:
2                                                                     

shiftOps

Type:
tuple
Value:
('>>', '<<')                                                           

single3

Type:
str
Value:
"'''"                                                                  

STATIC_CACHE

Type:
int
Value:
1                                                                     

tripleQuotedStringPairs

Type:
dict
Value:
{'"""': '"""',
 "'''": "'''",
 'R"""': '"""',
 "R'''": "'''",
 'U"""': '"""',
 "U'''": "'''",
 'UR"""': '"""',
 "UR'''": "'''",
...                                                                    

tripleQuotedStringREs

Type:
dict
Value:
{'"""': <_sre.SRE_Pattern object at 0x00E15C80>,
 "'''": <_sre.SRE_Pattern object at 0x00E15D40>,
 'R"""': <_sre.SRE_Pattern object at 0x00EC36A0>,
 "R'''": <_sre.SRE_Pattern object at 0x00EC3AB0>,
 'U"""': <_sre.SRE_Pattern object at 0x00EC3708>,
 "U'''": <_sre.SRE_Pattern object at 0x00EC3910>,
 'UR"""': <_sre.SRE_Pattern object at 0x00EC38A8>,
 "UR'''": <_sre.SRE_Pattern object at 0x00EC39E0>,
...                                                                    

tripleQuotedStringStarts

Type:
tuple
Value:
("'''", '"""', "r'''", 'r"""', "R'''", 'R"""', "u'''", 'u"""', "U'''") 

unaryArithOps

Type:
tuple
Value:
('+', '-', '~')                                                        

WS

Type:
str
Value:
'[ \\f\\t]*'                                                           

Generated by Epydoc 2.0 on Mon Nov 10 15:07:40 2003 http://epydoc.sf.net