BlockIt
blockit::external::pyparsing::Keyword Class Reference
Inheritance diagram for blockit::external::pyparsing::Keyword:
Collaboration diagram for blockit::external::pyparsing::Keyword:

List of all members.

Public Member Functions

def __init__
def parseImpl
def copy
def setDefaultKeywordChars

Public Attributes

 match
 matchLen
 firstMatchChar
 name
 errmsg
 mayReturnEmpty
 mayIndexError
 caseless
 caselessmatch
 identChars

Static Public Attributes

string DEFAULT_KEYWORD_CHARS = "_$"
tuple setDefaultKeywordChars = staticmethod(setDefaultKeywordChars)

Detailed Description

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.

Definition at line 1517 of file pyparsing.py.


Constructor & Destructor Documentation

def blockit::external::pyparsing::Keyword::__init__ (   self,
  matchString,
  identChars = DEFAULT_KEYWORD_CHARS,
  caseless = False 
)

Definition at line 1529 of file pyparsing.py.


Member Function Documentation

def blockit::external::pyparsing::Keyword::copy (   self)
Make a copy of this ParserElement.  Useful for defining different parse actions
   for the same parsing pattern, using copies of the original parse element.

Reimplemented from blockit::external::pyparsing::ParserElement.

Definition at line 1567 of file pyparsing.py.

def blockit::external::pyparsing::Keyword::parseImpl (   self,
  instring,
  loc,
  doActions = True 
)

Reimplemented from blockit::external::pyparsing::ParserElement.

Reimplemented in blockit::external::pyparsing::CaselessKeyword.

Definition at line 1549 of file pyparsing.py.

Overrides the default Keyword chars

Definition at line 1572 of file pyparsing.py.


Member Data Documentation

Definition at line 1527 of file pyparsing.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties