Module pyparsing :: Class Keyword
[frames | no frames]

Type Keyword

   object --+        
            |        
ParserElement --+    
                |    
            Token --+
                    |
                   Keyword


Token to exactly match a specified string as a keyword, that is, it must be immediately followed by a non-keyword character. Compare with Literal:
 Literal("if") will match the leading 'if' in 'ifAndOnlyIf'.
 Keyword("if") will not; it will only match the leading 'if in 'if x=1', or 'if(y==2)'
Accepts two optional constructor arguments in addition to the keyword string: identChars is a string of characters that would be valid identifier characters, defaulting to all alphanumerics + "_" and "$"; caseless allows case-insensitive matching, default is False.
Method Summary
  __init__(self, matchString, identChars, caseless)
  parseImpl(self, instring, loc, doActions)
Inherited from Token: setName
Inherited from ParserElement: __add__, __invert__, __or__, __radd__, __repr__, __ror__, __rxor__, __str__, __xor__, checkRecursion, copy, ignore, leaveWhitespace, parse, parseFile, parseString, parseWithTabs, postParse, preParse, scanString, setDebug, setDebugActions, setDefaultWhitespaceChars, setParseAction, setResultsName, setWhitespaceChars, skipIgnorables, streamline, suppress, transformString, tryParse, validate
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Variable Summary
Inherited from ParserElement: DEFAULT_WHITE_CHARS

Generated by Epydoc 2.1 on Wed Mar 23 23:59:25 2005 http://epydoc.sf.net