irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

irods.pyparsing Namespace Reference

Classes

class  _Constants
 
class  _ForwardNoRecurse
 
class  _NullToken
 
class  _ParseResultsWithOffset
 
class  _PositionToken
 
class  And
 
class  CaselessKeyword
 
class  CaselessLiteral
 
class  CharsNotIn
 
class  Combine
 
class  Dict
 
class  Each
 
class  Empty
 
class  FollowedBy
 
class  Forward
 
class  GoToColumn
 
class  Group
 
class  Keyword
 
class  LineEnd
 
class  LineStart
 
class  Literal
 
class  MatchFirst
 
class  NoMatch
 
class  NotAny
 
class  OneOrMore
 
class  OnlyOnce
 
class  Optional
 
class  Or
 
class  ParseBaseException
 
class  ParseElementEnhance
 
class  ParseException
 
class  ParseExpression
 
class  ParseFatalException
 
class  ParserElement
 
class  ParseResults
 
class  ParseSyntaxException
 
class  QuotedString
 
class  RecursiveGrammarException
 
class  Regex
 
class  SkipTo
 
class  StringEnd
 
class  StringStart
 
class  Suppress
 
class  Token
 
class  TokenConverter
 
class  White
 
class  Word
 
class  WordEnd
 
class  WordStart
 
class  ZeroOrMore
 

Functions

def _ustr (obj)
 
def _xml_escape (data)
 
def col (loc, strg)
 
def lineno (loc, strg)
 
def line (loc, strg)
 
def _defaultStartDebugAction (instring, loc, expr)
 
def _defaultSuccessDebugAction (instring, startloc, endloc, expr, toks)
 
def _defaultExceptionDebugAction (instring, loc, expr, exc)
 
def nullDebugAction (*args)
 
def _trim_arity (func, maxargs=2)
 
def traceParseAction (f)
 
def delimitedList (expr, delim=",", combine=False)
 
def countedArray (expr, intExpr=None)
 
def _flatten (L)
 
def matchPreviousLiteral (expr)
 
def matchPreviousExpr (expr)
 
def _escapeRegexRangeChars (s)
 
def oneOf (strs, caseless=False, useRegex=True)
 
def dictOf (key, value)
 
def originalTextFor (expr, asString=True)
 
def ungroup (expr)
 
def locatedExpr (expr)
 
def srange (s)
 
def matchOnlyAtCol (n)
 
def replaceWith (replStr)
 
def removeQuotes (s, l, t)
 
def upcaseTokens (s, l, t)
 
def downcaseTokens (s, l, t)
 
def getTokensEndLoc ()
 
def _makeTags (tagStr, xml)
 
def makeHTMLTags (tagStr)
 
def makeXMLTags (tagStr)
 
def withAttribute (*args, **attrDict)
 
def withClass (classname, namespace='')
 
def infixNotation (baseExpr, opList, lpar=Suppress('('), rpar=Suppress(')'))
 
def nestedExpr (opener="(", closer=")", content=None, ignoreExpr=quotedString.copy())
 
def indentedBlock (blockStatementExpr, indentStack, indent=True)
 
def replaceHTMLEntity (t)
 

Variables

 __doc__ = \
 
string __version__ = "2.1.0"
 
string __versionTime__ = "7 Feb 2016 14:09"
 
string __author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
 
list __all__
 
 PY_3 = sys.version.startswith('3')
 
 _MAX_INT = sys.maxsize
 
 basestring = str
 
 unichr = chr
 
 _ustr = str
 
list singleArgBuiltins = [sum, len, sorted, reversed, list, tuple, set, any, all, min, max]
 
 range = xrange
 
 _generatorType = type((y for y in range(1)))
 
 alphas = string.ascii_uppercase + string.ascii_lowercase
 
string nums = "0123456789"
 
string hexnums = nums + "ABCDEFabcdef"
 
string alphanums = alphas + nums
 
 _bslash = chr(92)
 
string printables = "".join(c for c in string.printable if c not in string.whitespace)
 
 _L = Literal
 
 literalStringClass
 
 _optionalNotMatched = _NullToken()
 
 empty = Empty().setName("empty")
 
 lineStart = LineStart().setName("lineStart")
 
 lineEnd = LineEnd().setName("lineEnd")
 
 stringStart = StringStart().setName("stringStart")
 
 stringEnd = StringEnd().setName("stringEnd")
 
 _escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
 
 _escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").setParseAction(lambda s,l,t:unichr(int(t[0].lstrip(r'\0x'),16)))
 
 _escapedOctChar = Regex(r"\\0[0-7]+").setParseAction(lambda s,l,t:unichr(int(t[0][1:],8)))
 
 _singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(printables, excludeChars=r'\]', exact=1) | Regex(r"\w", re.UNICODE)
 
 _charRange = Group(_singleChar + Suppress("-") + _singleChar)
 
string _reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]"
 
 opAssoc = _Constants()
 
 LEFT
 
 RIGHT
 
def operatorPrecedence = infixNotation
 
 dblQuotedString = Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*"').setName("string enclosed in double quotes")
 
 sglQuotedString = Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*'").setName("string enclosed in single quotes")
 
 quotedString = Regex().setName("quotedString using single or double quotes")
 
 unicodeString = Combine(_L('u') + quotedString.copy()).setName("unicode string literal")
 
def alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]")
 
def punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]")
 
 anyOpenTag
 
 anyCloseTag
 
 _htmlEntityMap = dict(zip("gt lt amp nbsp quot apos".split(),'><& "\''))
 
 commonHTMLEntity = Regex('&(?P<entity>' + '|'.join(_htmlEntityMap.keys()) +");").setName("common HTML entity")
 
 cStyleComment = Regex(r"/\*(?:[^*]*\*+)+?/").setName("C style comment")
 
 htmlComment = Regex(r"<!--[\s\S]*?-->").setName("HTML comment")
 
 restOfLine = Regex(r".*").leaveWhitespace().setName("rest of line")
 
 dblSlashComment = Regex(r"\/\/(\\\n|.)*").setName("// comment")
 
 cppStyleComment = Regex(r"/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?<!\\‍)|\Z))").setName("C++ style comment")
 
 javaStyleComment = cppStyleComment
 
 pythonStyleComment = Regex(r"#.*").setName("Python style comment")
 
 _commasepitem
 
def commaSeparatedList = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("commaSeparatedList")
 
 selectToken = CaselessLiteral( "select" )
 
 fromToken = CaselessLiteral( "from" )
 
 ident = Word( alphas, alphanums + "_$" )
 
def columnName = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens )
 
 columnNameList = Group( delimitedList( columnName ) ).setName("columns")
 
def tableName = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens )
 
 tableNameList = Group( delimitedList( tableName ) ).setName("tables")
 
tuple simpleSQL
 

Function Documentation

◆ _defaultExceptionDebugAction()

def irods.pyparsing._defaultExceptionDebugAction (   instring,
  loc,
  expr,
  exc 
)
private

Definition at line 744 of file pyparsing.py.

References irods.pyparsing._ustr.

◆ _defaultStartDebugAction()

def irods.pyparsing._defaultStartDebugAction (   instring,
  loc,
  expr 
)
private

Definition at line 738 of file pyparsing.py.

References irods.pyparsing._ustr, irods.pyparsing.col(), and irods.pyparsing.lineno().

Here is the call graph for this function:

◆ _defaultSuccessDebugAction()

def irods.pyparsing._defaultSuccessDebugAction (   instring,
  startloc,
  endloc,
  expr,
  toks 
)
private

Definition at line 741 of file pyparsing.py.

References irods.pyparsing._ustr.

◆ _escapeRegexRangeChars()

def irods.pyparsing._escapeRegexRangeChars (   s)
private

Definition at line 3301 of file pyparsing.py.

References irods.pyparsing._ustr.

Referenced by irods.pyparsing.oneOf().

◆ _flatten()

def irods.pyparsing._flatten (   L)
private

◆ _makeTags()

def irods.pyparsing._makeTags (   tagStr,
  xml 
)
private
Internal helper to construct opening and closing tag expressions, given a tag name

Definition at line 3515 of file pyparsing.py.

References irods.pyparsing._L, and irods.join().

Referenced by irods.pyparsing.makeHTMLTags(), and irods.pyparsing.makeXMLTags().

Here is the call graph for this function:

◆ _trim_arity()

def irods.pyparsing._trim_arity (   func,
  maxargs = 2 
)
private

◆ _ustr()

def irods.pyparsing._ustr (   obj)
private
Drop-in replacement for str(obj) that tries to be Unicode friendly. It first tries
   str(obj). If that fails with a UnicodeEncodeError, then it tries unicode(obj). It
   then < returns the unicode object | encodes it with the default encoding | ... >.

Definition at line 113 of file pyparsing.py.

References irods.pyparsing._ustr, irods.password_obfuscation.encode(), int(), and irods.pypyodbc.unicode.

Here is the call graph for this function:

◆ _xml_escape()

def irods.pyparsing._xml_escape (   data)
private
Escape &, <, >, ", ', etc. in a string of data.

Definition at line 144 of file pyparsing.py.

Referenced by irods.pyparsing.ParseResults.asXML().

◆ col()

def irods.pyparsing.col (   loc,
  strg 
)
Returns current column within a string, counting newlines as line separators.
   The first column is number 1.

   Note: the default parsing behavior is to expand tabs in the input string
   before starting the parsing process.  See L{I{ParserElement.parseString}<ParserElement.parseString>} for more information
   on parsing strings containing C{<TAB>}s, and suggested methods to maintain a
   consistent view of the parsed string, the parse location, and line and column
   positions within the parsed string.

Definition at line 703 of file pyparsing.py.

Referenced by irods.pyparsing.ParseBaseException.__getattr__(), irods.pyparsing._defaultStartDebugAction(), irods.pyparsing.indentedBlock(), irods.pyparsing.matchOnlyAtCol(), and irods.pyparsing.ParserElement.runTests().

◆ countedArray()

def irods.pyparsing.countedArray (   expr,
  intExpr = None 
)
Helper to define a counted list of expressions.
   This helper defines a pattern of the form::
       integer expr expr expr...
   where the leading integer tells how many expr expressions follow.
   The matched tokens returns the array of expr tokens as a list - the leading count token is suppressed.

Definition at line 3218 of file pyparsing.py.

References irods.pyparsing._ustr, and int().

Here is the call graph for this function:

◆ delimitedList()

def irods.pyparsing.delimitedList (   expr,
  delim = ",",
  combine = False 
)
Helper to define a delimited list of expressions - the delimiter defaults to ','.
   By default, the list elements and delimiters can have intervening whitespace, and
   comments, but this can be overridden by passing C{combine=True} in the constructor.
   If C{combine} is set to C{True}, the matching tokens are returned as a single token
   string, with the delimiters included; otherwise, the matching tokens are returned
   as a list of tokens, with the delimiters suppressed.

Definition at line 3204 of file pyparsing.py.

References irods.pyparsing._ustr.

◆ dictOf()

def irods.pyparsing.dictOf (   key,
  value 
)
Helper to easily and clearly define a dictionary by specifying the respective patterns
   for the key and value.  Takes care of defining the C{L{Dict}}, C{L{ZeroOrMore}}, and C{L{Group}} tokens
   in the proper order.  The key pattern can include delimiting markers or punctuation,
   as long as they are suppressed, thereby leaving the significant key text.  The value
   pattern can include named results, so that the C{Dict} results can include named token
   fields.

Definition at line 3373 of file pyparsing.py.

◆ downcaseTokens()

def irods.pyparsing.downcaseTokens (   s,
  l,
  t 
)
Helper parse action to convert tokens to lower case.

Definition at line 3495 of file pyparsing.py.

◆ getTokensEndLoc()

def irods.pyparsing.getTokensEndLoc ( )
Method to be called from within a parse action to determine the end
   location of the parsed tokens.

Definition at line 3499 of file pyparsing.py.

◆ indentedBlock()

def irods.pyparsing.indentedBlock (   blockStatementExpr,
  indentStack,
  indent = True 
)
Helper method for defining space-delimited indentation blocks, such as
   those used to define block statements in Python source code.

   Parameters:
    - blockStatementExpr - expression defining syntax of statement that
        is repeated within the indented block
    - indentStack - list created by caller to manage indentation stack
        (multiple statementWithIndentedBlock expressions within a single grammar
        should share a common indentStack)
    - indent - boolean indicating whether block must be indented beyond the
        the current level; set to False for block of left-most statements
        (default=True)

   A valid block must contain at least one C{blockStatement}.

Definition at line 3731 of file pyparsing.py.

References irods.pyparsing.col().

Here is the call graph for this function:

◆ infixNotation()

def irods.pyparsing.infixNotation (   baseExpr,
  opList,
  lpar = Suppress('('),
  rpar = Suppress(')') 
)
Helper method for constructing grammars of expressions made up of
   operators working in a precedence hierarchy.  Operators may be unary or
   binary, left- or right-associative.  Parse actions can also be attached
   to operator expressions.

   Parameters:
    - baseExpr - expression representing the most basic element for the nested
    - opList - list of tuples, one for each operator precedence level in the
      expression grammar; each tuple is of the form
      (opExpr, numTerms, rightLeftAssoc, parseAction), where:
       - opExpr is the pyparsing expression for the operator;
          may also be a string, which will be converted to a Literal;
          if numTerms is 3, opExpr is a tuple of two expressions, for the
          two operators separating the 3 terms
       - numTerms is the number of terms for this operator (must
          be 1, 2, or 3)
       - rightLeftAssoc is the indicator whether the operator is
          right or left associative, using the pyparsing-defined
          constants C{opAssoc.RIGHT} and C{opAssoc.LEFT}.
       - parseAction is the parse action to be associated with
          expressions matching this operator expression (the
          parse action tuple member may be omitted)
    - lpar - expression for matching left-parentheses (default=Suppress('('))
    - rpar - expression for matching right-parentheses (default=Suppress(')'))

Definition at line 3598 of file pyparsing.py.

◆ line()

def irods.pyparsing.line (   loc,
  strg 
)
Returns the line of text containing loc within a string, counting newlines as line separators.

Definition at line 728 of file pyparsing.py.

Referenced by irods.pyparsing.ParseBaseException.__getattr__(), boost.assertion_failed(), getLineRange(), getword(), makeword(), msiServerMonPerf(), processXMsg(), irods.pyparsing.ParserElement.runTests(), and irods.pyparsing.traceParseAction().

◆ lineno()

def irods.pyparsing.lineno (   loc,
  strg 
)
Returns current line number within a string, counting newlines as line separators.
   The first line is number 1.

   Note: the default parsing behavior is to expand tabs in the input string
   before starting the parsing process.  See L{I{ParserElement.parseString}<ParserElement.parseString>} for more information
   on parsing strings containing C{<TAB>}s, and suggested methods to maintain a
   consistent view of the parsed string, the parse location, and line and column
   positions within the parsed string.

Definition at line 716 of file pyparsing.py.

Referenced by irods.pyparsing.ParseBaseException.__getattr__(), and irods.pyparsing._defaultStartDebugAction().

◆ locatedExpr()

def irods.pyparsing.locatedExpr (   expr)
Helper to decorate a returned token with its starting and ending locations in the input string.
   This helper adds the following results names:
    - locn_start = location where matched expression begins
    - locn_end = location where matched expression ends
    - value = the actual parsed results

   Be careful if the input text contains C{<TAB>} characters, you may want to call
   C{L{ParserElement.parseWithTabs}}

Definition at line 3415 of file pyparsing.py.

◆ makeHTMLTags()

def irods.pyparsing.makeHTMLTags (   tagStr)
Helper to construct opening and closing tag expressions for HTML, given a tag name

Definition at line 3544 of file pyparsing.py.

References irods.pyparsing._makeTags().

Here is the call graph for this function:

◆ makeXMLTags()

def irods.pyparsing.makeXMLTags (   tagStr)
Helper to construct opening and closing tag expressions for XML, given a tag name

Definition at line 3548 of file pyparsing.py.

References irods.pyparsing._makeTags().

Here is the call graph for this function:

◆ matchOnlyAtCol()

def irods.pyparsing.matchOnlyAtCol (   n)
Helper method for defining parse actions that require matching at a specific
   column in the input text.

Definition at line 3466 of file pyparsing.py.

References irods.pyparsing.col().

Here is the call graph for this function:

◆ matchPreviousExpr()

def irods.pyparsing.matchPreviousExpr (   expr)
Helper to define an expression that is indirectly defined from
   the tokens matched in a previous expression, that is, it looks
   for a 'repeat' of a previous expression.  For example::
       first = Word(nums)
       second = matchPreviousExpr(first)
       matchExpr = first + ":" + second
   will match C{"1:1"}, but not C{"1:2"}.  Because this matches by
   expressions, will *not* match the leading C{"1:1"} in C{"1:10"};
   the expressions are evaluated first, and then compared, so
   C{"1"} is compared with C{"10"}.
   Do *not* use with packrat parsing enabled.

Definition at line 3274 of file pyparsing.py.

References irods.pyparsing._flatten(), and irods.pyparsing._ustr.

Here is the call graph for this function:

◆ matchPreviousLiteral()

def irods.pyparsing.matchPreviousLiteral (   expr)
Helper to define an expression that is indirectly defined from
   the tokens matched in a previous expression, that is, it looks
   for a 'repeat' of a previous expression.  For example::
       first = Word(nums)
       second = matchPreviousLiteral(first)
       matchExpr = first + ":" + second
   will match C{"1:1"}, but not C{"1:2"}.  Because this matches a
   previous literal, will also match the leading C{"1:1"} in C{"1:10"}.
   If this is not desired, use C{matchPreviousExpr}.
   Do *not* use with packrat parsing enabled.

Definition at line 3247 of file pyparsing.py.

References irods.pyparsing._flatten(), and irods.pyparsing._ustr.

Here is the call graph for this function:

◆ nestedExpr()

def irods.pyparsing.nestedExpr (   opener = "(",
  closer = ")",
  content = None,
  ignoreExpr = quotedString.copy() 
)
Helper method for defining nested lists enclosed in opening and closing
   delimiters ("(" and ")" are the default).

   Parameters:
    - opener - opening character for a nested list (default="("); can also be a pyparsing expression
    - closer - closing character for a nested list (default=")"); can also be a pyparsing expression
    - content - expression for items within the nested lists (default=None)
    - ignoreExpr - expression for ignoring opening and closing delimiters (default=quotedString)

   If an expression is not provided for the content argument, the nested
   expression will capture all whitespace-delimited content between delimiters
   as a list of separate values.

   Use the C{ignoreExpr} argument to define expressions that may contain
   opening or closing characters that should not be treated as opening
   or closing characters for nesting, such as quotedString or a comment
   expression.  Specify multiple expressions using an C{L{Or}} or C{L{MatchFirst}}.
   The default is L{quotedString}, but if no expressions are to be ignored,
   then pass C{None} for this argument.

Definition at line 3678 of file pyparsing.py.

◆ nullDebugAction()

def irods.pyparsing.nullDebugAction ( args)
'Do-nothing' debug action, to suppress debugging output during parsing.

Definition at line 747 of file pyparsing.py.

◆ oneOf()

def irods.pyparsing.oneOf (   strs,
  caseless = False,
  useRegex = True 
)
Helper to quickly define a set of alternative Literals, and makes sure to do
   longest-first testing when there is a conflict, regardless of the input order,
   but returns a C{L{MatchFirst}} for best performance.

   Parameters:
    - strs - a string of space-delimited literals, or a list of string literals
    - caseless - (default=False) - treat all literals as caseless
    - useRegex - (default=True) - as an optimization, will generate a Regex
      object; otherwise, will generate a C{MatchFirst} object (if C{caseless=True}, or
      if creating a C{Regex} raises an exception)

Definition at line 3309 of file pyparsing.py.

References irods.pyparsing._escapeRegexRangeChars(), and irods.join().

Here is the call graph for this function:

◆ originalTextFor()

def irods.pyparsing.originalTextFor (   expr,
  asString = True 
)
Helper to return the original, untokenized text for a given expression.  Useful to
   restore the parsed fields of an HTML start tag into the raw tag text itself, or to
   revert separate tokens with intervening whitespace back to the original matching
   input text. By default, returns astring containing the original parsed text.  
   
   If the optional C{asString} argument is passed as C{False}, then the return value is a 
   C{L{ParseResults}} containing any results names that were originally matched, and a 
   single token containing the original matched text from the input string.  So if 
   the expression passed to C{L{originalTextFor}} contains expressions with defined
   results names, you must set C{asString} to C{False} if you want to preserve those
   results name values.

Definition at line 3383 of file pyparsing.py.

◆ removeQuotes()

def irods.pyparsing.removeQuotes (   s,
  l,
  t 
)
Helper parse action for removing quotation marks from parsed quoted strings.
   To use, add this parse action to quoted string using::
     quotedString.setParseAction( removeQuotes )

Definition at line 3484 of file pyparsing.py.

◆ replaceHTMLEntity()

def irods.pyparsing.replaceHTMLEntity (   t)
Helper parser action to replace common HTML entities with their special characters

Definition at line 3789 of file pyparsing.py.

◆ replaceWith()

def irods.pyparsing.replaceWith (   replStr)
Helper method for common parse actions that simply return a literal value.  Especially
   useful when used with C{L{transformString<ParserElement.transformString>}()}.

Definition at line 3475 of file pyparsing.py.

◆ srange()

def irods.pyparsing.srange (   s)
Helper to easily define string ranges for use in Word construction.  Borrows
   syntax from regexp '[]' string range definitions::
      srange("[0-9]")   -> "0123456789"
      srange("[a-z]")   -> "abcdefghijklmnopqrstuvwxyz"
      srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"
   The input string must be enclosed in []'s, and the returned string is the expanded
   character set joined into a single string.
   The values enclosed in the []'s may be::
      a single character
      an escaped character with a leading backslash (such as \- or \])
      an escaped hex character with a leading '\x' (\x21, which is a '!' character) 
        (\0x## is also supported for backwards compatibility) 
      an escaped octal character with a leading '\0' (\041, which is a '!' character)
      a range of any of the above, separated by a dash ('a-z', etc.)
      any combination of the above ('aeiouy', 'a-zA-Z0-9_$', etc.)

Definition at line 3443 of file pyparsing.py.

References irods.join(), irods.pyparsing.range, and irods.pyparsing.unichr.

Here is the call graph for this function:

◆ traceParseAction()

def irods.pyparsing.traceParseAction (   f)
Decorator for debugging parse actions.

Definition at line 3179 of file pyparsing.py.

References irods.pyparsing._trim_arity(), and irods.pyparsing.line().

Here is the call graph for this function:

◆ ungroup()

def irods.pyparsing.ungroup (   expr)
Helper to undo pyparsing's default grouping of And expressions, even
   if all but one are non-empty.

Definition at line 3410 of file pyparsing.py.

◆ upcaseTokens()

def irods.pyparsing.upcaseTokens (   s,
  l,
  t 
)
Helper parse action to convert tokens to upper case.

Definition at line 3491 of file pyparsing.py.

◆ withAttribute()

def irods.pyparsing.withAttribute ( args,
**  attrDict 
)
Helper to create a validating parse action to be used with start tags created
   with C{L{makeXMLTags}} or C{L{makeHTMLTags}}. Use C{withAttribute} to qualify a starting tag
   with a required attribute value, to avoid false matches on common tags such as
   C{<TD>} or C{<DIV>}.

   Call C{withAttribute} with a series of attribute names and values. Specify the list
   of filter attributes names and values as:
    - keyword arguments, as in C{(align="right")}, or
    - as an explicit dict with C{**} operator, when an attribute name is also a Python
      reserved word, as in C{**{"class":"Customer", "align":"right"}}
    - a list of name-value tuples, as in ( ("ns1:class", "Customer"), ("ns2:align","right") )
   For attribute names with a namespace prefix, you must use the second form.  Attribute
   names are matched insensitive to upper/lower case.
   
   If just testing for C{class} (with or without a namespace), use C{L{withClass}}.

   To verify that the attribute exists, but without specifying a value, pass
   C{withAttribute.ANY_VALUE} as the value.

Definition at line 3552 of file pyparsing.py.

Referenced by irods.pyparsing.withClass().

◆ withClass()

def irods.pyparsing.withClass (   classname,
  namespace = '' 
)
Simplified version of C{L{withAttribute}} when matching on a div class - made
   difficult because C{class} is a reserved word in Python.

Definition at line 3587 of file pyparsing.py.

References irods.pyparsing.withAttribute().

Here is the call graph for this function:

Variable Documentation

◆ __all__

list irods.pyparsing.__all__
private
Initial value:
1 = [
2 'And', 'CaselessKeyword', 'CaselessLiteral', 'CharsNotIn', 'Combine', 'Dict', 'Each', 'Empty',
3 'FollowedBy', 'Forward', 'GoToColumn', 'Group', 'Keyword', 'LineEnd', 'LineStart', 'Literal',
4 'MatchFirst', 'NoMatch', 'NotAny', 'OneOrMore', 'OnlyOnce', 'Optional', 'Or',
5 'ParseBaseException', 'ParseElementEnhance', 'ParseException', 'ParseExpression', 'ParseFatalException',
6 'ParseResults', 'ParseSyntaxException', 'ParserElement', 'QuotedString', 'RecursiveGrammarException',
7 'Regex', 'SkipTo', 'StringEnd', 'StringStart', 'Suppress', 'Token', 'TokenConverter',
8 'White', 'Word', 'WordEnd', 'WordStart', 'ZeroOrMore',
9 'alphanums', 'alphas', 'alphas8bit', 'anyCloseTag', 'anyOpenTag', 'cStyleComment', 'col',
10 'commaSeparatedList', 'commonHTMLEntity', 'countedArray', 'cppStyleComment', 'dblQuotedString',
11 'dblSlashComment', 'delimitedList', 'dictOf', 'downcaseTokens', 'empty', 'hexnums',
12 'htmlComment', 'javaStyleComment', 'line', 'lineEnd', 'lineStart', 'lineno',
13 'makeHTMLTags', 'makeXMLTags', 'matchOnlyAtCol', 'matchPreviousExpr', 'matchPreviousLiteral',
14 'nestedExpr', 'nullDebugAction', 'nums', 'oneOf', 'opAssoc', 'operatorPrecedence', 'printables',
15 'punc8bit', 'pythonStyleComment', 'quotedString', 'removeQuotes', 'replaceHTMLEntity',
16 'replaceWith', 'restOfLine', 'sglQuotedString', 'srange', 'stringEnd',
17 'stringStart', 'traceParseAction', 'unicodeString', 'upcaseTokens', 'withAttribute',
18 'indentedBlock', 'originalTextFor', 'ungroup', 'infixNotation','locatedExpr', 'withClass',
19 ]

Definition at line 79 of file pyparsing.py.

◆ __author__

string irods.pyparsing.__author__ = "Paul McGuire <ptmcg@users.sourceforge.net>"
private

Definition at line 62 of file pyparsing.py.

◆ __doc__

irods.pyparsing.__doc__ = \
private

Definition at line 25 of file pyparsing.py.

◆ __version__

string irods.pyparsing.__version__ = "2.1.0"
private

Definition at line 60 of file pyparsing.py.

◆ __versionTime__

string irods.pyparsing.__versionTime__ = "7 Feb 2016 14:09"
private

Definition at line 61 of file pyparsing.py.

◆ _bslash

irods.pyparsing._bslash = chr(92)
private

Definition at line 161 of file pyparsing.py.

◆ _charRange

irods.pyparsing._charRange = Group(_singleChar + Suppress("-") + _singleChar)
private

Definition at line 3440 of file pyparsing.py.

◆ _commasepitem

irods.pyparsing._commasepitem
private
Initial value:
1 = Combine(OneOrMore(Word(printables, excludeChars=',') +
2  Optional( Word(" \t") +
3  ~Literal(",") + ~LineEnd() ) ) ).streamline().setName("commaItem")

Definition at line 3803 of file pyparsing.py.

◆ _escapedHexChar

irods.pyparsing._escapedHexChar = Regex(r"\\0?[xX][0-9a-fA-F]+").setParseAction(lambda s,l,t:unichr(int(t[0].lstrip(r'\0x'),16)))
private

Definition at line 3437 of file pyparsing.py.

◆ _escapedOctChar

irods.pyparsing._escapedOctChar = Regex(r"\\0[0-7]+").setParseAction(lambda s,l,t:unichr(int(t[0][1:],8)))
private

Definition at line 3438 of file pyparsing.py.

◆ _escapedPunc

irods.pyparsing._escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
private

Definition at line 3436 of file pyparsing.py.

◆ _generatorType

irods.pyparsing._generatorType = type((y for y in range(1)))
private

Definition at line 142 of file pyparsing.py.

◆ _htmlEntityMap

irods.pyparsing._htmlEntityMap = dict(zip("gt lt amp nbsp quot apos".split(),'><& "\''))
private

Definition at line 3787 of file pyparsing.py.

◆ _L

irods.pyparsing._L = Literal
private

Definition at line 1657 of file pyparsing.py.

Referenced by irods.pyparsing._makeTags().

◆ _MAX_INT

irods.pyparsing._MAX_INT = sys.maxsize
private

Definition at line 101 of file pyparsing.py.

◆ _optionalNotMatched

irods.pyparsing._optionalNotMatched = _NullToken()
private

Definition at line 2884 of file pyparsing.py.

◆ _reBracketExpr

string irods.pyparsing._reBracketExpr = Literal("[") + Optional("^").setResultsName("negate") + Group( OneOrMore( _charRange | _singleChar ) ).setResultsName("body") + "]"
private

Definition at line 3441 of file pyparsing.py.

◆ _singleChar

irods.pyparsing._singleChar = _escapedPunc | _escapedHexChar | _escapedOctChar | Word(printables, excludeChars=r'\]', exact=1) | Regex(r"\w", re.UNICODE)
private

Definition at line 3439 of file pyparsing.py.

◆ _ustr

◆ alphanums

string irods.pyparsing.alphanums = alphas + nums

Definition at line 160 of file pyparsing.py.

◆ alphas

irods.pyparsing.alphas = string.ascii_uppercase + string.ascii_lowercase

Definition at line 157 of file pyparsing.py.

◆ alphas8bit

def irods.pyparsing.alphas8bit = srange(r"[\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]")

Definition at line 3783 of file pyparsing.py.

◆ anyCloseTag

irods.pyparsing.anyCloseTag

Definition at line 3786 of file pyparsing.py.

◆ anyOpenTag

irods.pyparsing.anyOpenTag

Definition at line 3786 of file pyparsing.py.

◆ basestring

irods.pyparsing.basestring = str

Definition at line 102 of file pyparsing.py.

◆ columnName

def irods.pyparsing.columnName = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens )

◆ columnNameList

irods.pyparsing.columnNameList = Group( delimitedList( columnName ) ).setName("columns")

Definition at line 3816 of file pyparsing.py.

◆ commaSeparatedList

def irods.pyparsing.commaSeparatedList = delimitedList( Optional( quotedString.copy() | _commasepitem, default="") ).setName("commaSeparatedList")

Definition at line 3806 of file pyparsing.py.

◆ commonHTMLEntity

irods.pyparsing.commonHTMLEntity = Regex('&(?P<entity>' + '|'.join(_htmlEntityMap.keys()) +");").setName("common HTML entity")

Definition at line 3788 of file pyparsing.py.

◆ cppStyleComment

irods.pyparsing.cppStyleComment = Regex(r"/(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?<!\\‍)|\Z))").setName("C++ style comment")

Definition at line 3799 of file pyparsing.py.

◆ cStyleComment

irods.pyparsing.cStyleComment = Regex(r"/\*(?:[^*]*\*+)+?/").setName("C style comment")

Definition at line 3794 of file pyparsing.py.

◆ dblQuotedString

irods.pyparsing.dblQuotedString = Regex(r'"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*"').setName("string enclosed in double quotes")

Definition at line 3673 of file pyparsing.py.

◆ dblSlashComment

irods.pyparsing.dblSlashComment = Regex(r"\/\/(\\\n|.)*").setName("// comment")

Definition at line 3798 of file pyparsing.py.

◆ empty

◆ fromToken

irods.pyparsing.fromToken = CaselessLiteral( "from" )

Definition at line 3812 of file pyparsing.py.

◆ hexnums

string irods.pyparsing.hexnums = nums + "ABCDEFabcdef"

Definition at line 159 of file pyparsing.py.

◆ htmlComment

irods.pyparsing.htmlComment = Regex(r"<!--[\s\S]*?-->").setName("HTML comment")

Definition at line 3796 of file pyparsing.py.

◆ ident

irods.pyparsing.ident = Word( alphas, alphanums + "_$" )

Definition at line 3814 of file pyparsing.py.

◆ javaStyleComment

irods.pyparsing.javaStyleComment = cppStyleComment

Definition at line 3801 of file pyparsing.py.

◆ LEFT

irods.pyparsing.LEFT

Definition at line 3595 of file pyparsing.py.

◆ lineEnd

irods.pyparsing.lineEnd = LineEnd().setName("lineEnd")

Definition at line 3432 of file pyparsing.py.

◆ lineStart

irods.pyparsing.lineStart = LineStart().setName("lineStart")

Definition at line 3431 of file pyparsing.py.

◆ literalStringClass

irods.pyparsing.literalStringClass

Definition at line 1658 of file pyparsing.py.

◆ nums

string irods.pyparsing.nums = "0123456789"

Definition at line 158 of file pyparsing.py.

◆ opAssoc

irods.pyparsing.opAssoc = _Constants()

Definition at line 3594 of file pyparsing.py.

◆ operatorPrecedence

def irods.pyparsing.operatorPrecedence = infixNotation

Definition at line 3671 of file pyparsing.py.

◆ printables

string irods.pyparsing.printables = "".join(c for c in string.printable if c not in string.whitespace)

Definition at line 162 of file pyparsing.py.

◆ punc8bit

def irods.pyparsing.punc8bit = srange(r"[\0xa1-\0xbf\0xd7\0xf7]")

Definition at line 3784 of file pyparsing.py.

◆ PY_3

irods.pyparsing.PY_3 = sys.version.startswith('3')

Definition at line 99 of file pyparsing.py.

◆ pythonStyleComment

irods.pyparsing.pythonStyleComment = Regex(r"#.*").setName("Python style comment")

Definition at line 3802 of file pyparsing.py.

◆ quotedString

irods.pyparsing.quotedString = Regex().setName("quotedString using single or double quotes")

Definition at line 3675 of file pyparsing.py.

◆ range

◆ restOfLine

irods.pyparsing.restOfLine = Regex(r".*").leaveWhitespace().setName("rest of line")

Definition at line 3797 of file pyparsing.py.

◆ RIGHT

irods.pyparsing.RIGHT

Definition at line 3596 of file pyparsing.py.

◆ selectToken

irods.pyparsing.selectToken = CaselessLiteral( "select" )

Definition at line 3811 of file pyparsing.py.

◆ sglQuotedString

irods.pyparsing.sglQuotedString = Regex(r"'(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*'").setName("string enclosed in single quotes")

Definition at line 3674 of file pyparsing.py.

◆ simpleSQL

tuple irods.pyparsing.simpleSQL
Initial value:
1 = ( selectToken + \
2  ( '*' | columnNameList ).setResultsName( "columns" ) + \
3  fromToken + \
4  tableNameList.setResultsName( "tables" ) )

Definition at line 3819 of file pyparsing.py.

◆ singleArgBuiltins

list irods.pyparsing.singleArgBuiltins = [sum, len, sorted, reversed, list, tuple, set, any, all, min, max]

Definition at line 107 of file pyparsing.py.

◆ stringEnd

irods.pyparsing.stringEnd = StringEnd().setName("stringEnd")

Definition at line 3434 of file pyparsing.py.

◆ stringStart

irods.pyparsing.stringStart = StringStart().setName("stringStart")

Definition at line 3433 of file pyparsing.py.

◆ tableName

def irods.pyparsing.tableName = delimitedList( ident, ".", combine=True ).setParseAction( upcaseTokens )

◆ tableNameList

irods.pyparsing.tableNameList = Group( delimitedList( tableName ) ).setName("tables")

Definition at line 3818 of file pyparsing.py.

◆ unichr

irods.pyparsing.unichr = chr

Definition at line 103 of file pyparsing.py.

Referenced by irods.pyparsing.srange().

◆ unicodeString

irods.pyparsing.unicodeString = Combine(_L('u') + quotedString.copy()).setName("unicode string literal")

Definition at line 3676 of file pyparsing.py.