Home | Trees | Indices | Help |
|
---|
|
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.
Instance Methods | |||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Static Methods | |||
|
|||
Inherited from |
Class Variables | |
DEFAULT_KEYWORD_CHARS =
|
|
Inherited from |
Properties | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
|
Make a copy of this ParserElement. Useful for defining different parse actions for the same parsing pattern, using copies of the original parse element.
|
Class Variable Details |
DEFAULT_KEYWORD_CHARS
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat May 31 22:26:41 2008 | http://epydoc.sourceforge.net |