
t,2Jc        l   @   s<  d  Z  d Z d Z d Z d d k Z d d k l Z d d k Z d d k	 Z	 d d k
 Z
 d d k Z d d k Z d d k Z d d d	 d
 d d d d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d: d; d< d= d> d? d@ dA dB dC dD dE dF dG dH dI dJ dK dL dM dN dO dP dQ dR dS dT dU dV dW dX dY dZ d[ d\ d] d^ d_ d` da db dc dd de df dg dh di dj gd Z e	 i dk dl j o e Z e	 i Z e Z n e Z e	 i Z e o dm   Z n e Z dn   Z do e f dp     YZ e o e i e i Z n e i  e i! Z e i" Z# e# dq Z$ e e# Z% dr Z& ds i' g  Z( e i) D]! Z* e* e i+ j o e( e* n q[(  Z, d e- f dt     YZ. d  e. f du     YZ/ d" e. f dv     YZ0 d$ e0 f dw     YZ1 d' e- f dx     YZ2 dy e f dz     YZ3 d# e f d{     YZ4 d|   Z5 d}   Z6 d~   Z7 d   Z8 d   Z9 d   Z: d   Z; d% e f d     YZ< d- e< f d     YZ= d e= f d     YZ> d e= f d     YZ? d e= f d     YZ@ e@ ZA d e= f d     YZB d	 e@ f d     YZC d eB f d     YZD d1 e= f d     YZE d( e= f d     YZF d& e= f d     YZG d
 e= f d     YZH d0 e= f d     YZI d e= f d     YZJ d eJ f d     YZK d eJ f d     YZL d eJ f d     YZM d+ eJ f d     YZN d* eJ f d     YZO d3 eJ f d     YZP d2 eJ f d     YZQ d! e< f d     YZR d eR f d     YZS d eR f d     YZT d eR f d     YZU d eR f d     YZV d e< f d     YZW d eW f d     YZX d eW f d     YZY d4 eW f d     YZZ d eW f d     YZ[ d e f d     YZ\ e\   Z] d eW f d     YZ^ d) eW f d     YZ_ d eW f d     YZ` d e` f d     YZa d. eW f d     YZb d/ eb f d     YZc d eb f d     YZd d eb f d     YZe d eb f d     YZf d, eb f d     YZg d e f d     YZh d   Zi d e d  Zj d   Zk d   Zl d   Zm d   Zn d   Zo e e d  Zp d   Zq e>   ir dE  Zs eL   ir dM  Zt eM   ir dL  Zu eN   ir de  Zv eO   ir dd  Zw eE e& d d dl ix d    Zy ds i' g  Zz e, D] Z* e* d j o ez e* n q7[z  Z{ ed eg e& d  eE e$   ix d    Z| ed eg e&  eE d d   ix d    Z} ey e| Be} BeE e{ d d BZ~ ee e~ eg d  e~  Z e@ d  e^ d  i d  ee e[ e e~ B  i d  d Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z e   e _ e   Z e   e _ e   e _ d   Z eF d  ir d  Z eF d  ir d  Z eF d  ir d  Z ed eA d  e i    Z d d e e d  Z e d  Z e d  Z e d  Z e eE e e% d   \ Z Z ed eA d  ep d  i d  d  Z e e d i   d   Z d   Z eF d  ir d  Z eF d  Z eF d  i   Z eF d  ir d  Z eF d  ir d  Z e Z eF d  ir d  Z ds i' g  Z e, D] Z* e* d j o e e* n qd[  Z ed e[ eE e  e^ eE d  e@ d  eM      i   ir d  Z ej e^ e e Bd ds  ir d<  Z e d j o.d   Z eC d  Z eC d  Z eE e e% d  Z ej e d d e ix e  Z ee ej e   Z ej e d d e ix e  Z ee ej e   Z e de Bi d e e i d Z e d e d e d e d e d e d e d	 e d
 e d e d e d n d S(  so  
pyparsing module - Classes and methods to define and execute parsing grammars

The pyparsing module is an alternative approach to creating and executing simple grammars,
vs. the traditional lex/yacc approach, or the use of regular expressions.  With pyparsing, you
don't need to learn a new syntax for defining grammars or matching expressions - the parsing module
provides a library of classes that you use to construct the grammar directly in Python.

Here is a program to parse "Hello, World!" (or any greeting of the form "<salutation>, <addressee>!")::

    from pyparsing import Word, alphas

    # define grammar of a greeting
    greet = Word( alphas ) + "," + Word( alphas ) + "!"

    hello = "Hello, World!"
    print hello, "->", greet.parseString( hello )

The program outputs the following::

    Hello, World! -> ['Hello', ',', 'World', '!']

The Python representation of the grammar is quite readable, owing to the self-explanatory
class names, and the use of '+', '|' and '^' operators.

The parsed results returned from parseString() can be accessed as a nested list, a dictionary, or an
object with named attributes.

The pyparsing module handles some of the problems that are typically vexing when writing text parsers:
 - extra or missing whitespace (the above program will also handle "Hello,World!", "Hello  ,  World  !", etc.)
 - quoted strings
 - embedded comments
s   1.5.0s   28 May 2008 10:05s*   Paul McGuire <ptmcg@users.sourceforge.net>iN(   t   reft   Andt   CaselessKeywordt   CaselessLiteralt
   CharsNotInt   Combinet   Dictt   Eacht   Emptyt
   FollowedByt   Forwardt
   GoToColumnt   Groupt   Keywordt   LineEndt	   LineStartt   Literalt
   MatchFirstt   NoMatcht   NotAnyt	   OneOrMoret   OnlyOncet   Optionalt   Ort   ParseBaseExceptiont   ParseElementEnhancet   ParseExceptiont   ParseExpressiont   ParseFatalExceptiont   ParseResultst   ParseSyntaxExceptiont   ParserElementt   QuotedStringt   RecursiveGrammarExceptiont   Regext   SkipTot	   StringEndt   StringStartt   Suppresst   Tokent   TokenConvertert   Upcaset   Whitet   Wordt   WordEndt	   WordStartt
   ZeroOrMoret	   alphanumst   alphast
   alphas8bitt   anyCloseTagt
   anyOpenTagt   cStyleCommentt   colt   commaSeparatedListt   commonHTMLEntityt   countedArrayt   cppStyleCommentt   dblQuotedStringt   dblSlashCommentt   delimitedListt   dictOft   downcaseTokenst   emptyt   getTokensEndLoct   hexnumst   htmlCommentt   javaStyleCommentt   keepOriginalTextt   linet   lineEndt	   lineStartt   linenot   makeHTMLTagst   makeXMLTagst   matchOnlyAtColt   matchPreviousExprt   matchPreviousLiteralt
   nestedExprt   nullDebugActiont   numst   oneOft   opAssoct   operatorPrecedencet
   printablest   punc8bitt   pythonStyleCommentt   quotedStringt   removeQuotest   replaceHTMLEntityt   replaceWitht
   restOfLinet   sglQuotedStringt   sranget	   stringEndt   stringStartt   traceParseActiont   unicodeStringt   upcaseTokenst   withAttributet   indentedBlocki    i   c         C   s/   y t  |   SWn t j
 o t |   SXd S(   s  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 | ... >.
        N(   t   strt   UnicodeEncodeErrort   unicode(   t   obj(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   _ustrl   s    c         C   s+   t  g  } |  D] } | | d f q ~  S(   Ni    (   t   dict(   t   strgt   _[1]t   c(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt	   _str2dict   s    t
   _Constantsc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRo      s   t   ABCDEFabcdefs   \t    c           B   sM   e  Z d  Z d Z d d d d  Z d   Z d   Z d	   Z d
 d  Z	 RS(   s7   base exception class for all parsing runtime exceptionst   loct   msgt   pstrt   parserElementi    c         C   sK   | |  _  | d  j o | |  _ d |  _ n | |  _ | |  _ | |  _ d  S(   NRs   (   Rt   t   NoneRu   Rv   Rw   (   t   selfRv   Rt   Ru   t   elem(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __init__   s    				c         C   ss   | d j o t  |  i |  i  S| d j o t |  i |  i  S| d j o t |  i |  i  St |   d S(   s   supported attributes by name are:
            - lineno - returns the line number of the exception text
            - col - returns the column number of the exception text
            - line - returns the line containing the exception text
        RH   R5   t   columnRE   N(   s   cols   column(   RH   Rt   Rv   R5   RE   t   AttributeError(   Ry   t   aname(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __getattr__   s    c         C   s    d |  i  |  i |  i |  i f S(   Ns"   %s (at char %d), (line:%d, col:%d)(   Ru   Rt   RH   R|   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __str__   s    c         C   s
   t  |   S(   N(   Ri   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __repr__   s    s   >!<c         C   sK   |  i  } |  i d } | o$ d i | |  | | | g  } n | i   S(   s   Extracts the exception line from the input string, and marks
           the location of the exception with a special symbol.
        i   Rs   (   RE   R|   t   joint   strip(   Ry   t   markerStringt   line_strt   line_column(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   markInputline   s    	(   s   locs   msgs   pstrs   parserElementN(
   Rp   Rq   t   __doc__t	   __slots__Rx   R{   R   R   R   R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      s   
			c           B   s   e  Z d  Z RS(   s)  exception thrown when parse expressions don't match class;
       supported attributes by name are:
        - lineno - returns the line number of the exception text
        - col - returns the column number of the exception text
        - line - returns the line containing the exception text
    (   Rp   Rq   R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      s   c           B   s   e  Z d  Z RS(   sn   user-throwable exception thrown when inconsistent parse content
       is found; stops all parsing immediately(   Rp   Rq   R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      s   c           B   s   e  Z d  Z d   Z RS(   s   just like ParseFatalException, but thrown internally when an
       ErrorStop indicates that parsing is to stop immediately because
       an unbacktrackable syntax error has been foundc         C   s)   t  i |  | i | i | i | i  d  S(   N(   R   R{   Rv   Rt   Ru   Rw   (   Ry   t   pe(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{      s    (   Rp   Rq   R   R{   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      s   c           B   s    e  Z d  Z d   Z d   Z RS(   sK   exception thrown by validate() if the grammar could be improperly recursivec         C   s   | |  _  d  S(   N(   t   parseElementTrace(   Ry   t   parseElementList(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{      s    c         C   s   d |  i  S(   Ns   RecursiveGrammarException: %s(   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      s    (   Rp   Rq   R   R{   R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR!      s   	t   _ParseResultsWithOffsetc           B   s#   e  Z d    Z d   Z d   Z RS(   c         C   s   | | f |  _  d  S(   N(   t   tup(   Ry   t   p1t   p2(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{      s    c         C   s   |  i  | S(   N(   R   (   Ry   t   i(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __getitem__   s    c         C   s   t  |  i  S(   N(   t   reprR   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      s    (   Rp   Rq   R{   R   R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      s   		c           B   s^  e  Z d  Z d* Z d+ e e d  Z d+ e e d	  Z d
   Z d   Z	 d   Z
 d   Z d   Z d   Z e Z d   Z d   Z d   Z d d  Z d+ d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d d  Z d    Z d!   Z d"   Z d+ e  d e d#  Z! d$   Z" d%   Z# d d& d'  Z$ d(   Z% d)   Z& RS(,   s   Structured parse results, to provide multiple means of access to the parsed data:
       - as a list (len(results))
       - by list index (results[0], results[1], etc.)
       - by attribute (results.<resultsName>)
       t	   __toklistt	   __tokdictt   __doinitt   __namet   __parentt   __accumNamest   __weakref__c         C   s1   t  | |   o | St i |   } t | _ | S(   N(   t
   isinstancet   objectt   __new__t   Truet   _ParseResults__doinit(   t   clst   toklistt   namet   asListt   modalt   retobj(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      s
    	c         C   s  |  i  o^ t |  _  d  |  _ d  |  _ h  |  _ t | t  o | |  _ n | g |  _ t	   |  _
 n | o| p d |  i | <n t | t  o t |  } n | |  _ | d  d g  f j o t | t  o | g } n | o[ t | t  o t | i   d  |  | <n t t | d  d  |  | <| |  | _ qy | d |  | <Wqt t f j
 o | |  | <qXqn d  S(   Ni    Rs   i(   R   t   FalseRx   t   _ParseResults__namet   _ParseResults__parentt   _ParseResults__accumNamesR   t   listt   _ParseResults__toklistRj   t   _ParseResults__tokdictt   intRi   t
   basestringR   R   t   copyt   KeyErrort	   TypeError(   Ry   R   R   R   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s6    
					c         C   sz   t  | t t f  o |  i | S| |  i j o |  i | d d St g  } |  i | D] } | | d q[ ~  Sd  S(   Nii    (   R   R   t   sliceR   R   R   R   (   Ry   R   Rl   t   v(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   +  s
    c         C   s   t  | t  o4 |  i i | t    | g |  i | <| d } n] t  | t  o | |  i | <| } n6 |  i i | t    t | d  g |  i | <| } t  | t  o t |   | _	 n d  S(   Ni    (
   R   R   R   t   getR   R   R   R   t   wkrefR   (   Ry   t   kR   t   sub(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __setitem__4  s    &
/c   
      C   s  t  | t t f  o t |  i  } |  i | =t  | t  o2 | d j  o | | 7} n t | | d  } n t t | i |     } | i   x} |  i	 D]d } |  i	 | } xN | D]F } x= t
 |  D]/ \ } \ } }	 t | |	 |	 | j  | | <q Wq Wq Wn |  i	 | =d  S(   Ni    i   (   R   R   R   t   lenR   R   t   ranget   indicest   reverseR   t	   enumerateR   (
   Ry   R   t   mylent   removedR   t   occurrencest   jR   t   valuet   position(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __delitem__A  s$    


   -c         C   s   | |  i  j S(   N(   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __contains__W  s    c         C   s   t  |  i  S(   N(   R   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __len__Z  s    c         C   s   t  |  i  d j S(   Ni    (   R   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __bool__[  s    c         C   s   t  |  i  S(   N(   t   iterR   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __iter__]  s    c         C   s   t  t |  i   S(   N(   R   t   reversedR   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __reversed__^  s    c         C   s   |  i  i   S(   s   Returns all named result keys.(   R   t   keys(   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   _  s    ic         C   s   |  | } |  | =| S(   s   Removes and returns item at specified index (default=last).
           Will work with either numeric indices or dict-key indicies.(    (   Ry   t   indext   ret(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   popc  s    
c         C   s   | |  j o	 |  | S| Sd S(   s   Returns named result matching the given key, or if there is no
           such name, then returns the given defaultValue or None if no
           defaultValue is specified.N(    (   Ry   t   keyt   defaultValue(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   j  s    	c         C   sx   |  i  i | |  x^ |  i D]S } |  i | } x= t |  D]/ \ } \ } } t | | | t j  | | <q= Wq Wd  S(   N(   R   t   insertR   R   R   R   (   Ry   R   t   insStrR   R   R   R   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   s  s    
  c         C   s,   g  } |  i  D] } | | |  | f q ~ S(   s=   Returns all named result keys and values as a list of tuples.(   R   (   Ry   Rl   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   items{  s    c         C   s0   g  } |  i  i   D] } | | d d q ~ S(   s    Returns all named result values.ii    (   R   t   values(   Ry   Rl   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    c         C   s   | |  i  j op | |  i j oX | |  i j o |  i | d d St g  } |  i | D] } | | d qY ~  Sq d Sn d  S(   Nii    Rs   (   R   R   R   R   Rx   (   Ry   R   Rl   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    4c         C   s   |  i    } | | 7} | S(   N(   R   (   Ry   t   otherR   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __add__  s    
c   	         s  | i  o t |  i      f d   } | i  i   } g  } | D]= \ } } | D]* } | | t | d | | d   f qR qB ~ } xM | D]A \ } } | |  | <t | d t  o t |   | d _ q q Wn |  i | i 7_ |  i	 i
 | i	  ~ |  S(   Nc            s   |  d  j  o   p |    S(   i    (    (   t   a(   t   offset(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   <lambda>  s    i    i   (   R   R   R   R   R   R   R   R   R   R   t   update(	   Ry   R   t	   addoffsett
   otheritemsRl   R   t   vlistR   t   otherdictitems(    (   R   sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __iadd__  s    
J 
c         C   s    d t  |  i  t  |  i  f S(   Ns   (%s, %s)(   R   R   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    c         C   sp   d } d } xS |  i  D]H } t | t  o | | t |  7} n | | t |  7} d } q W| d 7} | S(   Nt   [Rs   s   , t   ](   R   R   R   Ri   R   (   Ry   t   outt   sepR   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    
 

Rs   c         C   st   g  } xg |  i  D]\ } | o | o | i |  n t | t  o | | i   7} q | i t |   q W| S(   N(   R   t   appendR   R   t   _asStringListRi   (   Ry   R   R   t   item(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    
 c         C   sR   g  } xE |  i  D]: } t | t  o | i | i    q | i |  q W| S(   sX   Returns the parse results as a nested list of matching tokens, all converted to strings.(   R   R   R   R   R   (   Ry   R   t   res(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    
 c         C   s   t  |  i    S(   s.   Returns the named parse results as dictionary.(   Rj   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   asDict  s    c         C   sP   t  |  i  } |  i i   | _ |  i | _ | i i |  i  |  i | _ | S(   s,   Returns a new copy of a ParseResults object.(   R   R   R   R   R   R   R   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    c         C   s7  d } g  } t  g  } |  i i   D]* \ } }	 |	 D] }
 | |
 d | f q3 q# ~  } | d } | p d } d } d } n d	 } | d	 j	 o
 | } n |  i o |  i } n | p | o d Sd } n | | | d | d g 7} |  i } xt |  D]\ } } t | t  oq | | j o4 | | i	 | | | o
 | d	 j | |  g 7} q| | i	 d	 | o
 | d	 j | |  g 7} q d	 } | | j o | | } n | p | o q qd } n t
 i i i t |   } | | | d | d | d | d g	 7} q W| | | d | d g 7} d i |  S(
   sh   Returns the parse results as XML. Tags are created for tokens and lists that have defined results names.s   
i   s     Rs   t   ITEMt   <t   >s   </N(   Rj   R   R   Rx   R   R   R   R   R   t   asXMLt   xmlt   saxt   saxutilst   escapeRi   R   (   Ry   t   doctagt   namedItemsOnlyt   indentt	   formattedt   nlR   Rl   R   R   R   t
   namedItemst   nextLevelIndentt   selfTagt   worklistR   R   t   resTagt   xmlBodyText(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     sZ    #*




	 
c         C   sM   xF |  i  i   D]5 \ } } x& | D] \ } } | | j o | Sq# Wq Wd  S(   N(   R   R   Rx   (   Ry   R   R   R   R   Rt   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __lookup  s      c         C   s   |  i  o |  i  S|  i o) |  i   } | o | i |   Sd Snb t |   d j oJ t |  i  d j o4 |  i i   d d d d j o |  i i   d Sd Sd S(   s3   Returns the results name for this token expression.i   i    iN(   i    i(   R   R   t   _ParseResults__lookupRx   R   R   R   R   (   Ry   t   par(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   getName  s    

"i    c         C   s   g  } | i  | t |  i     |  i   } | i   x | D] \ } } | o | i  d  n | i  d | d | | f  t | t  oE | i   o! | i  | i | | d   q | i  t |   q@ | i  t |   q@ Wd i	 |  S(   s   Diagnostic method for listing out the contents of a ParseResults.
           Accepts an optional indent argument so that this string can be embedded
           in a nested display of other data.s   
s
   %s%s- %s: s     i   Rs   (
   R   Ri   R   R   t   sortR   R   R   t   dumpR   (   Ry   R   t   depthR   R   R   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  (  s    
 !c         C   sE   |  i  |  i i   |  i d  j	 o |  i   p d  |  i |  i f f S(   N(   R   R   R   R   Rx   R   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __getstate__A  s
     c         C   so   | d |  _  | d \ |  _ } } |  _ h  |  _ |  i i |  | d  j	 o t |  |  _ n
 d  |  _ d  S(   Ni    i   (   R   R   R   R   R   Rx   R   R   (   Ry   t   stateR   t   inAccumNames(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __setstate__H  s    	(   s	   __toklists	   __tokdicts   __doinits   __names   __parents   __accumNamess   __weakref__N('   Rp   Rq   R   R   Rx   R   R   R{   R   R   R   R   R   R   t   __nonzero__R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R  R  R  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      sD   	$																				
			<			c         C   sB   |  t  |  j  o | |  d j o d p |  | i d d |   S(   s  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 <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.
   s   
i   i    (   R   t   rfind(   Rt   Rk   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR5   V  s    
c         C   s   | i  d d |   d S(   s  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 <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.
   s   
i    i   (   t   count(   Rt   Rk   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRH   b  s    
c         C   sT   | i  d d |   } | i d |   } | d j o | | d | !S| | d Sd S(   sf   Returns the line of text containing loc within a string, counting newlines as line separators.
       s   
i    i   N(   R	  t   find(   Rt   Rk   t   lastCRt   nextCR(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRE   n  s
    c         C   sA   d t  |  d t  |  d t | |   t | |   f GHd  S(   Ns   Match s    at loc s   (%d,%d)(   Ri   RH   R5   (   t   instringRt   t   expr(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   _defaultStartDebugActionx  s    c         C   s'   d t  |  d t | i    GHd  S(   Ns   Matched s    -> (   Ri   Re   R   (   R  t   startloct   endlocR  t   toks(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   _defaultSuccessDebugAction{  s    c         C   s   d t  |  GHd  S(   Ns   Exception raised:(   Ri   (   R  Rt   R  t   exc(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   _defaultExceptionDebugAction~  s    c          G   s   d S(   sG   'Do-nothing' debug action, to suppress debugging output during parsing.N(    (   t   args(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRO     s    c           B   sl  e  Z d  Z d Z d   Z e e  Z e d  Z d   Z d   Z	 e d  Z
 e d  Z d   Z e e  Z d	   Z d
   Z d   Z d   Z d   Z e d  Z d   Z e e d  Z d   Z e e d  Z e Z h  Z d   Z e e  Z e Z d   Z e e  Z e d  Z e d  Z d   Z  e d  Z! d   Z" d   Z# d   Z$ d   Z% d   Z& d   Z' d   Z( d    Z) d!   Z* d"   Z+ d#   Z, d$   Z- d%   Z. d&   Z/ d'   Z0 d(   Z1 d)   Z2 d*   Z3 d+   Z4 d,   Z5 e d-  Z6 d.   Z7 d/   Z8 d0   Z9 d1   Z: g  d2  Z; d3   Z< d4   Z= d5   Z> d6   Z? d7   Z@ d8   ZA RS(9   s)   Abstract base level parser element class.s    
	c         C   s   |  t  _ d S(   s/   Overrides the default whitespace chars
        N(   R   t   DEFAULT_WHITE_CHARS(   t   chars(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setDefaultWhitespaceChars  s    c         C   s   t    |  _ d  |  _ d  |  _ d  |  _ | |  _ t |  _ t	 i
 |  _ t |  _ t |  _ t |  _ t    |  _ t |  _ t |  _ t |  _ d |  _ t |  _ d |  _ d  |  _ t |  _ t |  _ d  S(   NRs   (   NNN(   R   t   parseActionRx   t
   failActiont   strReprt   resultsNamet
   saveAsListR   t   skipWhitespaceR   R  t
   whiteCharst   copyDefaultWhiteCharsR   t   mayReturnEmptyt   keepTabst   ignoreExprst   debugt   streamlinedt   mayIndexErrort   errmsgt   modalResultst   debugActionst   ret   callPreparset   callDuringTry(   Ry   t   savelist(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s(    																c         C   sG   t  i  |   } |  i | _ |  i | _ |  i o t i | _ n | S(   s   Make a copy of this ParserElement.  Useful for defining different parse actions
           for the same parsing pattern, using copies of the original parse element.(   R   R  R%  R"  R   R  R!  (   Ry   t   cpy(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    
c         C   s@   | |  _  d |  i  |  _ t |  d  o |  i |  i _ n |  S(   s6   Define name for this expression, for use in debugging.s	   Expected t	   exception(   R   R)  t   hasattrR1  Ru   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setName  s
    	c         C   s#   |  i    } | | _ | | _ | S(   s\  Define name for referencing matching tokens as a nested attribute
           of the returned parse results.
           NOTE: this returns a *copy* of the original ParserElement object;
           this is so that the client can define a basic element, such as an
           integer, and reference it in multiple places with different names.
        (   R   R  R*  (   Ry   R   t   listAllMatchest   newself(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setResultsName  s    	
c            se   | o4 |  i    t t   f d  }   | _ | |  _  n' t |  i  d  o |  i  i |  _  n |  S(   s   Method to invoke the Python pdb debugger when this element is
           about to be parsed. Set breakFlag to True to enable, False to
           disable.
        c            s-   d d  k  } | i     |  | | |  d  S(   Ni(   t   pdbt	   set_trace(   R  Rt   t	   doActionst   callPreParseR7  (   t   _parseMethod(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   breaker  s    
t   _originalParseMethod(   t   _parseR   R=  R2  (   Ry   t	   breakFlagR<  (    (   R;  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setBreak  s    		c            s   d } y d } t   t  o   }   i   n t p   i } n
   i } | i | @o   S| i } t p" t	   d  o | d 8} q n t	   d  o | d 8} n | o
 |   n WnEt
 j
 o9y t p   i i i } n
   i } | i | @o   S| i } t p% t	   i d  o | d 8} qdn" t	   i d  o | d 8} n Wqt
 j
 o t p   i i } n   i i } | i | @o   S| i } t p% t	   i d  o | d 8} qqt	   i d  o | d 8} qqXn X| d j o   S| d j o   f d   } n | d j o   f d	   } n0 | d j o   f d
   } n   f d   } y   i | _ Wn t
 t f j
 o n Xy   i | _ Wn t
 t f j
 o n Xy | i i   i  Wn t
 t f j
 o n X| Sd S(   s   Internal method used to decorate parse actions that take fewer than 3 arguments,
           so that all parse actions can be called as f(s,l,t).i   t   im_selfi   t   __self__i    i   c            s       i  i |  | |  S(   N(   t   __call__RB  (   t   st   lt   t(   t   f(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   tmp  s    i   c            s     | |  S(   N(    (   RD  RE  RF  (   RG  (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRH    s    c            s
     |  S(   N(    (   RD  RE  RF  (   RG  (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRH    s    c            s       S(   N(    (   RD  RE  RF  (   RG  (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRH     s    N(   Rx   R   t   typeR{   t   _PY3Kt	   func_codet   codet   co_flagst   co_argcountR2  R}   RC  t   im_funct   __code__Rp   R   R   t   __dict__R   (   RG  t	   STAR_ARGSt   restoret   codeObjt   numargst   call_im_func_codet   call_func_codeRH  (    (   RG  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   _normalizeParseActionArgs  s    					c         O   s?   t  t |  i t  |    |  _ d | j o | d |  _ |  S(   sJ  Define action to perform when successfully matching parse element definition.
           Parse action fn is a callable method with 0-3 arguments, called as fn(s,loc,toks),
           fn(loc,toks), fn(toks), or just fn(), where:
            - s   = the original string being parsed (see note below)
            - loc = the location of the matching substring
            - toks = a list of the matched tokens, packaged as a ParseResults object
           If the functions in fns modify the tokens, they can return them as the return
           value from fn, and the modified list of tokens will replace the original.
           Otherwise, fn does not need to return any value.

           Note: the default parsing behavior is to expand tabs in the input string
           before starting the parsing process.  See L{I{parseString}<parseString>} for more information
           on parsing strings containing <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.
           R.  (   R   t   mapRX  R  R.  (   Ry   t   fnst   kwargs(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setParseAction4  s    !c         O   sO   |  i  t t |  i t |    7_  |  i p d | j o | d |  _ |  S(   sa   Add parse action to expression's list of parse actions. See L{I{setParseAction}<setParseAction>}.R.  (   R  R   RY  RX  R.  (   Ry   RZ  R[  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   addParseActionI  s    '$c         C   s   | |  _  |  S(   s  Define action to perform if parsing fails at this expression.
           Fail acton fn is a callable function that takes the arguments
           fn(s,loc,expr,err) where:
            - s = string being parsed
            - loc = location where expression match was attempted and failed
            - expr = the parse expression that failed
            - err = the exception thrown
           The function returns no value.  It may throw ParseFatalException
           if it is desired to stop parsing immediately.(   R  (   Ry   t   fn(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setFailActionO  s    
	c         C   sq   t  } xd | o\ t } xO |  i D]D } y( x! | i | |  \ } } t  } q, Wq  t j
 o q  Xq  Wq	 W| S(   N(   R   R   R%  R>  R   (   Ry   R  Rt   t
   exprsFoundt   et   dummy(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   _skipIgnorables\  s     
 c         C   sw   |  i  o |  i | |  } n |  i oI |  i } t |  } x1 | | j  o | | | j o | d 7} qB Wn | S(   Ni   (   R%  Rc  R   R!  R   (   Ry   R  Rt   t   wtt   instrlen(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   preParsei  s    

	 c         C   s
   | g  f S(   N(    (   Ry   R  Rt   R9  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt	   parseImplu  s    c         C   s   | S(   N(    (   Ry   R  Rt   t	   tokenlist(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt	   postParsex  s    c         C   s  |  i  } | p
 |  i o"|  i d o |  i d | | |   n | o  |  i o |  i | |  } n | } | } yW y |  i | | |  \ } } Wn1 t j
 o% t | t |  |  i	 |    n XWqt
 j
 o\ }	 |  i d o |  i d | | |  |	  n |  i o |  i | | |  |	  n   qXn | o  |  i o |  i | |  } n | } | } |  i p | t |  j oW y |  i | | |  \ } } Wqt j
 o% t | t |  |  i	 |    qXn |  i | | |  \ } } |  i | | |  } t | |  i d |  i d |  i }
 |  i oM| p
 |  i o<| o yu xn |  i D]c } | | | |
  } | d  j	 o> t | |  i d |  i o t | t t f  d |  i }
 qfqfWWqt
 j
 o8 }	 |  i d o |  i d | | |  |	  n   qXqxr |  i D]c } | | | |
  } | d  j	 o> t | |  i d |  i o t | t t f  d |  i }
 q#q#Wn | o3 |  i d o! |  i d | | | |  |
  qn | |
 f S(   Ni    i   R   R   i   (   R&  R  R+  R-  Rf  Rg  t
   IndexErrorR   R   R)  R   R(  Ri  R   R  R  R*  R  R.  Rx   R   R   (   Ry   R  Rt   R9  R:  t	   debuggingt   preloct   tokensStartt   tokenst   errt	   retTokensR^  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   _parseNoCache|  st    	'
'$
 	
 	%c         C   sP   y |  i  | | d t d SWn+ t j
 o t | | |  i |    n Xd  S(   NR9  i    (   R>  R   R   R   R)  (   Ry   R  Rt   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   tryParse  s    c         C   s   |  | | | | f } | t  i j o, t  i | } t | t  o
 |  n | SyA |  i | | | |  } | d | d i   f t  i | <| SWn% t j
 o } | t  i | <  n Xd  S(   Ni    i   (   R   t   _exprArgCacheR   t	   ExceptionRq  R   R   (   Ry   R  Rt   R9  R:  t   lookupR   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   _parseCache  s    
!c           C   s   t  i i   d  S(   N(   R   Rs  t   clear(    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt
   resetCache  s    c           C   s'   t  i p t t  _ t  i t  _ n d S(   s  Enables "packrat" parsing, which adds memoizing to the parsing logic.
           Repeated parse attempts at the same string location (which happens
           often in many complex grammars) can immediately return a cached value,
           instead of re-executing parsing/validating code.  Memoizing is done of
           both valid results and parsing exceptions.

           This speedup may break existing programs that use parse actions that
           have side-effects.  For this reason, packrat parsing is disabled when
           you first import pyparsing.  To activate the packrat feature, your
           program must call the class method ParserElement.enablePackrat().  If
           your program uses psyco to "compile as you go", you must call
           enablePackrat before calling psyco.full().  If you do not do this,
           Python will crash.  For best results, call enablePackrat() immediately
           after importing pyparsing.
        N(   R   t   _packratEnabledR   Rv  R>  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   enablePackrat  s    
	c         C   s   t  i   |  i p |  i   n x |  i D] } | i   q, W|  i p | i   } n |  i | d  \ } } | o t   i | |  n | S(   s  Execute the parse expression with the given string.
           This is the main interface to the client code, once the complete
           expression has been built.

           If you want the grammar to require that the entire input string be
           successfully parsed, then set parseAll to True (equivalent to ending
           the grammar with StringEnd()).

           Note: parseString implicitly calls expandtabs() on the input string,
           in order to report proper column numbers in parse actions.
           If the input string contains tabs and
           the grammar uses parse actions that use the loc argument to index into the
           string being parsed, you can ensure you have a consistent view of the input
           string by:
            - calling parseWithTabs on your grammar before calling parseString
              (see L{I{parseWithTabs}<parseWithTabs>})
            - define your parse action using the full (s,loc,toks) signature, and
              reference the input string using the parse action's s argument
            - explictly expand the tabs in your input string before calling
              parseString
        i    (	   R   Rx  R'  t
   streamlineR%  R$  t
   expandtabsR>  R$   (   Ry   R  t   parseAllRa  Rt   Rn  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   parseString  s    


 
c      
   c   s  |  i  p |  i   n x |  i D] } | i   q" W|  i p t |  i   } n t |  } d } |  i } |  i } t	 i
   d } x | | j o} | | j  op y. | | |  }	 | | |	 d t \ }
 } Wn t j
 o |	 d } q X| d 7} | |	 |
 f V|
 } q Wd S(   s  Scan the input string for expression matches.  Each match will return the
           matching tokens, start location, and end location.  May be called with optional
           maxMatches argument, to clip scanning after 'n' matches are found.

           Note that the start and end locations are reported relative to the string
           being parsed.  See L{I{parseString}<parseString>} for more information on parsing
           strings with embedded tabs.i    R:  i   N(   R'  R{  R%  R$  Ri   R|  R   Rf  R>  R   Rx  R   R   (   Ry   R  t
   maxMatchesRa  Re  Rt   t
   preparseFnt   parseFnt   matchesRl  t   nextLocRn  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt
   scanString  s.    

 
		
 
c         C   s   g  } d } t  |  _ x |  i |  D] \ } } } | i | | | ! | oS t | t  o | | i   7} q t | t  o | | 7} q | i |  n | } q% W| i | |  d i t	 t
 |   S(   s  Extension to scanString, to modify matching text with modified tokens that may
           be returned from a parse action.  To use transformString, define a grammar and
           attach a parse action to it that modifies the returned token list.
           Invoking transformString() on a target string will then scan for matches,
           and replace the matched text patterns according to the logic in the parse
           action.  transformString() returns the resulting transformed string.i    Rs   (   R   R$  R  R   R   R   R   R   R   RY  Ri   (   Ry   R  R   t   lastERF  RD  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   transformString=  s    	 
c         C   s:   t  g  } |  i | |  D] \ } } } | | q ~  S(   s   Another extension to scanString, simplifying the access to the tokens found
           to match the given parse expression.  May be called with optional
           maxMatches argument, to clip searching after 'n' matches are found.
        (   R   R  (   Ry   R  R  Rl   RF  RD  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   searchStringV  s    c         C   se   t  | t  o t |  } n t  | t  p% t i d t |  t d d d St	 |  | g  S(   s*   Implementation of + operator - returns Ands4   Cannot combine element of type %s with ParserElementt
   stackleveli   N(
   R   R   R   R   t   warningst   warnRI  t   SyntaxWarningRx   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   ]  s    c         C   s]   t  | t  o t |  } n t  | t  p% t i d t |  t d d d S| |  S(   sE   Implementation of + operator when left operand is not a ParserElements4   Cannot combine element of type %s with ParserElementR  i   N(	   R   R   R   R   R  R  RI  R  Rx   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __radd__g  s    c         C   sn   t  | t  o t |  } n t  | t  p% t i d t |  t d d d St	 |  t	 i
   | g  S(   s9   Implementation of - operator, returns And with error stops4   Cannot combine element of type %s with ParserElementR  i   N(   R   R   R   R   R  R  RI  R  Rx   R   t
   _ErrorStop(   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __sub__q  s    c         C   s]   t  | t  o t |  } n t  | t  p% t i d t |  t d d d S| |  S(   sE   Implementation of - operator when left operand is not a ParserElements4   Cannot combine element of type %s with ParserElementR  i   N(	   R   R   R   R   R  R  RI  R  Rx   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __rsub__{  s    c            s  t  | t  o | d } } nt  | t  oot |  d j o
 d } n( t |  d j o | d d  f } n t |  d j o| d d  j o d | d f } n t  | d t  oc | d d  j oR | d d j o t    S| d d j o t    S  | d t    Sqt  | d t  o. t  | d t  o | \ } } | | 8} qt d t | d  t | d    qt d   n t d t |    | d j  o t	 d   n | d j  o t	 d   n | | j o
 d j n o t	 d	   n | ok    f d
    | oB | d j o    |  } qt
   g |   |  } q |  } n+ | d j o
   } n t
   g |  } | S(   Ni    i   i   s7   cannot multiply 'ParserElement' and ('%s','%s') objectss>   can only multiply 'ParserElement' and int or (int,int) objectss0   cannot multiply 'ParserElement' and '%s' objectss/   cannot multiply ParserElement by negative values@   second tuple value must be greater or equal to first tuple values+   cannot multiply ParserElement by 0 or (0,0)c            s4   |  d j o t     |  d   St     Sd  S(   Ni   (   R   (   t   n(   Ry   t   makeOptionalList(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR    s    (   NN(   R   R   t   tupleR   Rx   R.   R   R   RI  t
   ValueErrorR   (   Ry   R   t   minElementst   optElementsR   (    (   Ry   R  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __mul__  sN    
%(*!
c         C   s   |  i  |  S(   N(   R  (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __rmul__  s    c         C   se   t  | t  o t |  } n t  | t  p% t i d t |  t d d d St	 |  | g  S(   s1   Implementation of | operator - returns MatchFirsts4   Cannot combine element of type %s with ParserElementR  i   N(
   R   R   R   R   R  R  RI  R  Rx   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __or__  s    c         C   s]   t  | t  o t |  } n t  | t  p% t i d t |  t d d d S| |  BS(   sE   Implementation of | operator when left operand is not a ParserElements4   Cannot combine element of type %s with ParserElementR  i   N(	   R   R   R   R   R  R  RI  R  Rx   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __ror__  s    c         C   se   t  | t  o t |  } n t  | t  p% t i d t |  t d d d St	 |  | g  S(   s)   Implementation of ^ operator - returns Ors4   Cannot combine element of type %s with ParserElementR  i   N(
   R   R   R   R   R  R  RI  R  Rx   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __xor__  s    c         C   s]   t  | t  o t |  } n t  | t  p% t i d t |  t d d d S| |  AS(   sE   Implementation of ^ operator when left operand is not a ParserElements4   Cannot combine element of type %s with ParserElementR  i   N(	   R   R   R   R   R  R  RI  R  Rx   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __rxor__  s    c         C   se   t  | t  o t |  } n t  | t  p% t i d t |  t d d d St	 |  | g  S(   s+   Implementation of & operator - returns Eachs4   Cannot combine element of type %s with ParserElementR  i   N(
   R   R   R   R   R  R  RI  R  Rx   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __and__  s    c         C   s]   t  | t  o t |  } n t  | t  p% t i d t |  t d d d S| |  @S(   sE   Implementation of & operator when left operand is not a ParserElements4   Cannot combine element of type %s with ParserElementR  i   N(	   R   R   R   R   R  R  RI  R  Rx   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __rand__  s    c         C   s
   t  |   S(   s-   Implementation of ~ operator - returns NotAny(   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt
   __invert__  s    c         C   s   |  i  |  S(   s  Shortcut for setResultsName, with listAllMatches=default::
             userdata = Word(alphas).setResultsName("name") + Word(nums+"-").setResultsName("socsecno")
           could be written as::
             userdata = Word(alphas)("name") + Word(nums+"-")("socsecno")
           (   R6  (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRC    s    c         C   s
   t  |   S(   s   Suppresses the output of this ParserElement; useful to keep punctuation from
           cluttering up returned output.
        (   R&   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   suppress  s    c         C   s   t  |  _ |  S(   s  Disables the skipping of whitespace before matching the characters in the
           ParserElement's defined pattern.  This is normally only used internally by
           the pyparsing module, but may be needed in some whitespace-sensitive grammars.
        (   R   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   leaveWhitespace  s    	c         C   s   t  |  _ | |  _ t |  _ |  S(   s/   Overrides the default whitespace chars
        (   R   R   R!  R   R"  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setWhitespaceChars  s    			c         C   s   t  |  _ |  S(   s   Overrides default behavior to expand <TAB>s to spaces before parsing the input string.
           Must be called before parseString when the input grammar contains elements that
           match <TAB> characters.(   R   R$  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   parseWithTabs  s    	c         C   sR   t  | t  o( | |  i j o |  i i |  qN n |  i i t |   |  S(   s   Define expression to be ignored (e.g., comments) while doing pattern
           matching; may be called repeatedly, to define multiple comment or other
           ignorable patterns.
        (   R   R&   R%  R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   ignore$  s
    c         C   s4   | p t  | p t | p t f |  _ t |  _ |  S(   sB   Enable display of debugging messages while doing pattern matching.(   R  R  R  R+  R   R&  (   Ry   t   startActiont   successActiont   exceptionAction(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setDebugActions0  s
    

	c         C   s+   | o |  i  t t t  n
 t |  _ |  S(   s{   Enable display of debugging messages while doing pattern matching.
           Set flag to True to enable, False to disable.(   R  R  R  R  R   R&  (   Ry   t   flag(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setDebug8  s    	c         C   s   |  i  S(   N(   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   A  s    c         C   s
   t  |   S(   N(   Ri   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   D  s    c         C   s   t  |  _ d  |  _ |  S(   N(   R   R'  Rx   R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{  G  s    		c         C   s   d  S(   N(    (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   checkRecursionL  s    c         C   s   |  i  g   d S(   sX   Check defined expressions for valid structure, check for infinite recursive definitions.N(   R  (   Ry   t   validateTrace(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   validateO  s    c         C   sX   y | i    } Wn8 t j
 o, t | d  } | i    } | i   n X|  i |  S(   s   Execute the parse expression on the given file or filename.
           If a filename is specified (instead of a file object),
           the entire file is opened, read, and closed before parsing.
        t   rb(   t   readR}   t   opent   closeR~  (   Ry   t   file_or_filenamet   file_contentsRG  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt	   parseFileS  s    c         C   s   t  d d |  i |   S(   NRs   i    (   R   R)  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   getException`  s    c         C   s9   | d j o |  i    |  _ } | St d |   d  S(   Nt   myExceptions   no such attribute (   R  R  R}   (   Ry   R~   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   c  s    c         C   sd   t  | t  o= y" |  t   i t |   t SWq` t j
 o t SXn t t	 |   | j Sd  S(   N(
   R   R   R$   R~  Ri   R   R   R   t   superR   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __eq__j  s    
c         C   s   t  t |    S(   N(   t   hasht   id(   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __hash__t  s    c         C   s
   |  | j S(   N(    (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __req__w  s    (B   Rp   Rq   R   R  R  t   staticmethodR   R{   R   R3  R6  R   R@  RX  R\  R]  R_  Rc  Rf  Rg  Ri  Rq  Rr  Rv  R>  Rs  Rx  Ry  Rz  R~  t   _MAX_INTR  R  R  R   R  R  R  R  R  R  R  R  R  R  R  R  RC  R  R  R  R  R  R  R  R   R   R{  R  R  R  R  R   R  R  R  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   		
		\						H			# 		
	
	
	
	7		
	
	
	
	
	
																	
	c           B   s    e  Z d  Z d   Z d   Z RS(   sG   Abstract ParserElement subclass, for defining atomic matching patterns.c         C   s   t  t |   i d t  d  S(   NR/  (   R  R'   R{   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   }  s    c         C   s,   t  t |   i |  } d |  i |  _ | S(   Ns	   Expected (   R  R'   R3  R   R)  (   Ry   R   RD  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR3    s    (   Rp   Rq   R   R{   R3  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR'   {  s   	c           B   s   e  Z d  Z d   Z RS(   s"   An empty token, will always match.c         C   s2   t  t |   i   d |  _ t |  _ t |  _ d  S(   NR   (   R  R   R{   R   R   R#  R   R(  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    		(   Rp   Rq   R   R{   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   c           B   s#   e  Z d  Z d   Z e d  Z RS(   s   A token that will never match.c         C   s;   t  t |   i   d |  _ t |  _ t |  _ d |  _ d  S(   NR   s   Unmatchable token(	   R  R   R{   R   R   R#  R   R(  R)  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s
    			c         C   s%   |  i  } | | _ | | _ |  d  S(   N(   R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s    			(   Rp   Rq   R   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   	c           B   s#   e  Z d  Z d   Z e d  Z RS(   s*   Token to exactly match a specified string.c         C   s   t  t |   i   | |  _ t |  |  _ y | d |  _ Wn2 t j
 o& t i	 d t
 d d t |  _ n Xd t |  i  |  _ d |  i |  _ t |  _ t |  _ d  S(   Ni    s2   null string passed to Literal; use Empty() insteadR  i   s   "%s"s	   Expected (   R  R   R{   t   matchR   t   matchLent   firstMatchCharRj  R  R  R  R   t	   __class__Ri   R   R)  R   R#  R(  (   Ry   t   matchString(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    			c         C   st   | | |  i  j o; |  i d j p | i |  i |  o | |  i |  i f S|  i } | | _ | | _ |  d  S(   Ni   (   R  R  t
   startswithR  R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s    &			(   Rp   Rq   R   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   	c           B   sQ   e  Z d  Z e d Z e e d  Z e d  Z d   Z	 d   Z
 e e
  Z
 RS(   sj  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.
    s   _$c         C   s   t  t |   i   | |  _ t |  |  _ y | d |  _ Wn) t j
 o t i	 d t
 d d n Xd |  i |  _ d |  i |  _ t |  _ t |  _ | |  _ | o | i   |  _ | i   } n t |  |  _ d  S(   Ni    s2   null string passed to Keyword; use Empty() insteadR  i   s   "%s"s	   Expected (   R  R   R{   R  R   R  R  Rj  R  R  R  R   R)  R   R#  R(  t   caselesst   uppert   caselessmatchRn   t
   identChars(   Ry   R  R  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s"    					c         C   s{  |  i  o | | | |  i !i   |  i j o{ | t |  |  i j p! | | |  i i   |  i j o@ | d j p | | d i   |  i j o | |  i |  i f Sn | | |  i j o |  i d j p | i |  i |  oo | t |  |  i j p | | |  i |  i j o: | d j p | | d |  i j o | |  i |  i f S|  i	 } | | _
 | | _ |  d  S(   Ni    i   (   R  R  R  R  R   R  R  R  R  R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s    
$;+&5%			c         C   s%   t  t |   i   } t i | _ | S(   N(   R  R   R   t   DEFAULT_KEYWORD_CHARSR  (   Ry   Rm   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    c         C   s   |  t  _ d S(   s,   Overrides the default Keyword chars
        N(   R   R  (   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   setDefaultKeywordChars  s    (   Rp   Rq   R   R/   R  R   R{   R   Rg  R   R  R  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   	
		c           B   s#   e  Z d  Z d   Z e d  Z RS(   s   Token to match a specified string, ignoring case of letters.
       Note: the matched results will always be in the case of the given
       match string, NOT the case of the input text.
    c         C   sI   t  t |   i | i    | |  _ d |  i |  _ d |  i |  _ d  S(   Ns   '%s's	   Expected (   R  R   R{   R  t   returnStringR   R)  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    	c         C   s^   | | | |  i  !i   |  i j o | |  i  |  i f S|  i } | | _ | | _ |  d  S(   N(   R  R  R  R  R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s    $			(   Rp   Rq   R   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   	c           B   s#   e  Z e i d   Z e d  Z RS(   c         C   s#   t  t |   i | | d t d  S(   NR  (   R  R   R{   R   (   Ry   R  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    c         C   s   | | | |  i  !i   |  i j oP | t |  |  i  j p! | | |  i  i   |  i j o | |  i  |  i f S|  i } | | _ | | _ |  d  S(   N(	   R  R  R  R   R  R  R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s    $;			(   Rp   Rq   R   R  R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   c           B   s;   e  Z d  Z d d d d e d  Z e d  Z d   Z RS(   s  Token for matching words composed of allowed character sets.
       Defined with string containing all allowed initial characters,
       an optional string containing allowed body characters (if omitted,
       defaults to the initial character set), and an optional minimum,
       maximum, and/or exact length.  The default value for min is 1 (a
       minimum value < 1 is not valid); the default values for max and exact
       are 0, meaning no maximum or exact length restriction.
    i   i    c         C   s:  t  t |   i   | |  _ t |  |  _ | o | |  _ t |  |  _ n | |  _ t |  |  _ | d j |  _ | d j  o t	 d   n | |  _
 | d j o | |  _ n
 t |  _ | d j o | |  _ | |  _
 n t |   |  _ d |  i |  _ t |  _ | |  _ d |  i |  i j o| d j o | d j o | d j o |  i |  i j o d t |  i  |  _ nh t |  i  d j o, d t i |  i  t |  i  f |  _ n& d t |  i  t |  i  f |  _ |  i o d	 |  i d	 |  _ n y t i |  i  |  _ Wq6d  |  _ q6Xn d  S(
   Ni    i   sZ   cannot specify a minimum length < 1; use Optional(Word()) if zero-length word is permitteds	   Expected t    s   [%s]+s   %s[%s]*s	   [%s][%s]*s   \b(   R  R+   R{   t   initCharsOrigRn   t	   initCharst   bodyCharsOrigt	   bodyCharst   maxSpecifiedR  t   minLent   maxLenR  Ri   R   R)  R   R(  t	   asKeywordt   _escapeRegexRangeCharst   reStringR   R,  R   t   compileRx   (   Ry   R  R  t   mint   maxt   exactR  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   .  sL    								>
c         C   s  |  i  o^ |  i  i | |  } | p% |  i } | | _ | | _ |  n | i   } | | i   f S| | |  i j o% |  i } | | _ | | _ |  n | } | d 7} t |  } |  i	 } | |  i
 }	 t |	 |  }	 x- | |	 j  o | | | j o | d 7} q Wt }
 | | |  i j  o
 t }
 n |  i o( | | j  o | | | j o
 t }
 n |  i oN | d j o | | d | j p | | j  o | | | j o
 t }
 qn |
 o% |  i } | | _ | | _ |  n | | | | !f S(   Ni   i    (   R,  R  R  Rt   Rv   t   endt   groupR  R   R  R  R  R   R  R   R  R  (   Ry   R  Rt   R9  t   resultR  t   startRe  t	   bodycharst   maxloct   throwException(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  a  sJ    
			
			

	 
(

@			
c         C   s   y t  t |   i   SWn n X|  i d  j o_ d   } |  i |  i j o) d | |  i  | |  i  f |  _ q d | |  i  |  _ n |  i S(   Nc         S   s(   t  |   d j o |  d  d S|  Sd  S(   Ni   s   ...(   R   (   RD  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt
   charsAsStr  s    s	   W:(%s,%s)s   W:(%s)(   R  R+   R   R  Rx   R  R  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    	)N(	   Rp   Rq   R   Rx   R   R{   R   Rg  R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR+   %  s   3-c           B   s/   e  Z d  Z d d  Z e d  Z d   Z RS(   s   Token for matching strings that match a given regular expression.
       Defined with string specifying the regular expression in a form recognized by the inbuilt Python re module.
    i    c         C   s   t  t |   i   t |  d j o t i d t d d n | |  _ | |  _ y+ t	 i
 |  i |  i  |  _	 |  i |  _ Wn3 t i j
 o$ t i d | t d d   n Xt |   |  _ d |  i |  _ t |  _ t |  _ d S(   s   The parameters pattern and flags are passed to the re.compile() function as-is. See the Python re module for an explanation of the acceptable patterns and flags.i    s0   null string passed to Regex; use Empty() insteadR  i   s$   invalid pattern (%s) passed to Regexs	   Expected N(   R  R"   R{   R   R  R  R  t   patternt   flagsR,  R  R  t   sre_constantst   errorRi   R   R)  R   R(  R   R#  (   Ry   R  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s"    				c   	      C   s   |  i  i | |  } | p% |  i } | | _ | | _ |  n | i   } | i   } t | i    } | o# x  | D] } | | | | <qy Wn | | f S(   N(	   R,  R  R  Rt   Rv   R  t	   groupdictR   R  (	   Ry   R  Rt   R9  R  R  t   dR   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s    			
 c         C   sR   y t  t |   i   SWn n X|  i d  j o d t |  i  |  _ n |  i S(   Ns   Re:(%s)(   R  R"   R   R  Rx   R   R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    (   Rp   Rq   R   R{   R   Rg  R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR"     s   c           B   s;   e  Z d  Z d d e e d d  Z e d  Z d   Z RS(   sI   Token for matching strings that are delimited by quoting characters.
    c   	      C   ss  t  t |   i   | i   } t |  d j o# t i d t d d t    n | d j o
 | } nC | i   } t |  d j o# t i d t d d t    n | |  _
 t |  |  _ | d |  _ | |  _ t |  |  _ | |  _ | |  _ | |  _ | o` t i t i B|  _ d t i |  i
  t |  i d  | d j	 o t |  p d f |  _ nS d |  _ d t i |  i
  t |  i d  | d j	 o t |  p d f |  _ t |  i  d	 j o |  i d
 d i g  } t t |  i  d	 d d  D]4 } | d t i |  i |   t |  i |  f q	~  d 7_ n | o  |  i d t i |  7_ n | o9 |  i d t i |  7_ t i |  i  d |  _ n |  i d t i |  i  7_ y+ t i |  i |  i  |  _ |  i |  _ Wn6 t i j
 o' t i d |  i t d d   n Xt  |   |  _! d |  i! |  _" t# |  _$ t% |  _& d S(   s  
           Defined with the following parameters:
            - quoteChar - string of one or more characters defining the quote delimiting string
            - escChar - character to escape quotes, typically backslash (default=None)
            - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=None)
            - multiline - boolean indicating whether quotes can span multiple lines (default=False)
            - unquoteResults - boolean indicating whether the matched text should be unquoted (default=True)
            - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=None => same as quoteChar)
        i    s$   quoteChar cannot be the empty stringR  i   s'   endQuoteChar cannot be the empty strings   %s(?:[^%s%s]Rs   s   %s(?:[^%s\n\r%s]i   s   |(?:s   )|(?:is   %s[^%s]t   )s   |(?:%s)s   |(?:%s.)s   (.)s   )*%ss$   invalid pattern (%s) passed to Regexs	   Expected N('   R  R    R{   R   R   R  R  R  t   SyntaxErrorRx   t	   quoteChart   quoteCharLent   firstQuoteChart   endQuoteChart   endQuoteCharLent   escChart   escQuotet   unquoteResultsR,  t	   MULTILINEt   DOTALLR  R   R  R  R   R   t   escCharReplacePatternR  R  R  R  Ri   R   R)  R   R(  R   R#  (	   Ry   R  R  R  t	   multilineR  R  Rl   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     sd    

					+	'x 	c         C   s   | | |  i  j o |  i i | |  p d  } | p% |  i } | | _ | | _ |  n | i   } | i   } |  i	 ox | |  i
 |  i !} t | t  oP |  i o t i |  i d |  } n |  i o | i |  i |  i  } q q n | | f S(   Ns   \g<1>(   R  R,  R  Rx   R  Rt   Rv   R  R  R  R  R  R   R   R  R   R  R  t   replaceR  (   Ry   R  Rt   R9  R  R  R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  +  s     0			



$c         C   sU   y t  t |   i   SWn n X|  i d  j o d |  i |  i f |  _ n |  i S(   Ns.   quoted string, starting with %s ending with %s(   R  R    R   R  Rx   R  R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   F  s    N(	   Rp   Rq   R   Rx   R   R   R{   Rg  R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR      s   Jc           B   s5   e  Z d  Z d d d d  Z e d  Z d   Z RS(   sw  Token for matching words composed of characters *not* in a given set.
       Defined with string containing all disallowed characters, and an optional
       minimum, maximum, and/or exact length.  The default value for min is 1 (a
       minimum value < 1 is not valid); the default values for max and exact
       are 0, meaning no maximum or exact length restriction.
    i   i    c         C   s   t  t |   i   t |  _ | |  _ | d j  o t d   n | |  _ | d j o | |  _ n
 t	 |  _ | d j o | |  _ | |  _ n t
 |   |  _ d |  i |  _ |  i d j |  _ t |  _ d  S(   Ni   sf   cannot specify a minimum length < 1; use Optional(CharsNotIn()) if zero-length char group is permittedi    s	   Expected (   R  R   R{   R   R   t   notCharsR  R  R  R  Ri   R   R)  R#  R(  (   Ry   R  R  R  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   Y  s     					c         C   s   | | |  i  j o% |  i } | | _ | | _ |  n | } | d 7} |  i  } t | |  i t |   } x- | | j  o | | | j o | d 7} qq W| | |  i j  o% |  i } | | _ | | _ |  n | | | | !f S(   Ni   (   R  R  Rt   Rv   R  R  R   R  (   Ry   R  Rt   R9  R  R  t   notcharst   maxlen(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  r  s&    			

	 			
c         C   sz   y t  t |   i   SWn n X|  i d  j oB t |  i  d j o d |  i d  |  _ qs d |  i |  _ n |  i S(   Ni   s
   !W:(%s...)s   !W:(%s)(   R  R   R   R  Rx   R   R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    (   Rp   Rq   R   R{   R   Rg  R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   R  s   c           B   sX   e  Z d  Z h d d 6d d 6d d 6d d 6d	 d
 6Z d d d d d  Z e d  Z RS(   s}  Special matching class for matching whitespace.  Normally, whitespace is ignored
       by pyparsing grammars.  This class is included when some whitespace structures
       are significant.  Define with a string containing the whitespace characters to be
       matched; default is " \t\n".  Also takes optional min, max, and exact arguments,
       as defined for the Word class.s   <SPC>R  s   <TAB>s   	s   <LF>s   
s   <CR>s   s   <FF>s   s    	
i   i    c         C   s  t  t |   i   | |  _ |  i d i g  } |  i D]! } | |  i j o | | q6 q6 ~   d i g  } |  i D] } | t i | qx ~  |  _ t	 |  _
 d |  i |  _ | |  _ | d j o | |  _ n
 t |  _ | d j o | |  _ | |  _ n d  S(   NRs   s	   Expected i    (   R  R*   R{   t
   matchWhiteR  R   R!  t	   whiteStrsR   R   R#  R)  R  R  R  (   Ry   t   wsR  R  R  Rl   Rm   t   _[2](    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    	H7				c         C   s   | | |  i  j o% |  i } | | _ | | _ |  n | } | d 7} | |  i } t | t |   } x0 | | j  o" | | |  i  j o | d 7} qn W| | |  i j  o% |  i } | | _ | | _ |  n | | | | !f S(   Ni   (   R  R  Rt   Rv   R  R  R   R  (   Ry   R  Rt   R9  R  R  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s$    			

 !			
(   Rp   Rq   R   R  R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR*     s   
t   _PositionTokenc           B   s   e  Z d    Z RS(   c         C   s8   t  t |   i   |  i i |  _ t |  _ t |  _	 d  S(   N(
   R  R  R{   R  Rp   R   R   R#  R   R(  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    	(   Rp   Rq   R{   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR    s   c           B   s,   e  Z d  Z d   Z d   Z e d  Z RS(   sX   Token to advance to a specific column of input text; useful for tabular report scraping.c         C   s    t  t |   i   | |  _ d  S(   N(   R  R   R{   R5   (   Ry   t   colno(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    c         C   s   t  | |  |  i  j oy t |  } |  i o |  i | |  } n xJ | | j  o8 | | i   o' t  | |  |  i  j o | d 7} qH Wn | S(   Ni   (   R5   R   R%  Rc  t   isspace(   Ry   R  Rt   Re  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRf    s    
 7c         C   s`   t  | |  } | |  i  j o t | | d |    n | |  i  | } | | | !} | | f S(   Ns   Text not in expected column(   R5   R   (   Ry   R  Rt   R9  t   thiscolt   newlocR   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s    (   Rp   Rq   R   R{   Rf  R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   			c           B   s,   e  Z d  Z d   Z d   Z e d  Z RS(   sQ   Matches if current position is at the beginning of a line within the parse stringc         C   s-   t  t |   i   |  i d  d |  _ d  S(   Ns    	s   Expected start of line(   R  R   R{   R  R)  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    c         C   s>   t  t |   i | |  } | | d j o | d 7} n | S(   Ns   
i   (   R  R   Rf  (   Ry   R  Rt   Rl  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRf    s    c         C   sj   | d j p+ | |  i  | d  j p | | d d j p% |  i } | | _ | | _ |  n | g  f S(   Ni    i   s   
(   Rf  R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s    			
(   Rp   Rq   R   R{   Rf  R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   		c           B   s#   e  Z d  Z d   Z e d  Z RS(   sK   Matches if current position is at the end of a line within the parse stringc         C   s-   t  t |   i   |  i d  d |  _ d  S(   Ns    	s   Expected end of line(   R  R   R{   R  R)  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    c         C   s   | t  |  j  oE | | d j o | d d f S|  i } | | _ | | _ |  nD | t  |  j o | d g  f S|  i } | | _ | | _ |  d  S(   Ns   
i   (   R   R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s    			
			(   Rp   Rq   R   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   
  s   	c           B   s#   e  Z d  Z d   Z e d  Z RS(   sC   Matches if current position is at the beginning of the parse stringc         C   s    t  t |   i   d |  _ d  S(   Ns   Expected start of text(   R  R%   R{   R)  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   &  s    c         C   sY   | d j oB | |  i  | d  j o% |  i } | | _ | | _ |  qO n | g  f S(   Ni    (   Rf  R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  +  s    			(   Rp   Rq   R   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR%   $  s   	c           B   s#   e  Z d  Z d   Z e d  Z RS(   s=   Matches if current position is at the end of the parse stringc         C   s    t  t |   i   d |  _ d  S(   Ns   Expected end of text(   R  R$   R{   R)  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   8  s    c         C   s   | t  |  j  o% |  i } | | _ | | _ |  nb | t  |  j o | d g  f S| t  |  j o | g  f S|  i } | | _ | | _ |  d  S(   Ni   (   R   R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  =  s    			
			(   Rp   Rq   R   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR$   6  s   	c           B   s&   e  Z d  Z e d  Z e d  Z RS(   sh  Matches if the current position is at the beginning of a Word, and
       is not preceded by any character in a given set of wordChars
       (default=printables). To emulate the  behavior of regular expressions,
       use WordStart(alphanums). WordStart will also match at the beginning of
       the string being parsed, or at the beginning of a line.
    c         C   s/   t  t |   i   t |  |  _ d |  _ d  S(   Ns   Not at the start of a word(   R  R-   R{   Rn   t	   wordCharsR)  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   U  s    c         C   sl   | d j oU | | d |  i  j p | | |  i  j o% |  i } | | _ | | _ |  qb n | g  f S(   Ni    i   (   R  R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  Z  s    			(   Rp   Rq   R   RT   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR-   N  s   c           B   s&   e  Z d  Z e d  Z e d  Z RS(   sR  Matches if the current position is at the end of a Word, and
       is not followed by any character in a given set of wordChars
       (default=printables). To emulate the  behavior of regular expressions,
       use WordEnd(alphanums). WordEnd will also match at the end of
       the string being parsed, or at the end of a line.
    c         C   s8   t  t |   i   t |  |  _ t |  _ d |  _ d  S(   Ns   Not at the end of a word(   R  R,   R{   Rn   R  R   R   R)  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   k  s    	c         C   s   t  |  } | d j ob | | j  oU | | |  i j p | | d |  i j o% |  i } | | _ | | _ |  q{ n | g  f S(   Ni    i   (   R   R  R  Rt   Rv   (   Ry   R  Rt   R9  Re  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  q  s    			(   Rp   Rq   R   RT   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR,   d  s   c           B   sh   e  Z d  Z e d  Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 e d  Z g  d	  Z RS(
   sT   Abstract subclass of ParserElement, for combining and post-processing parsed tokens.c         C   sr   t  t |   i |  t | t  o | |  _ n3 t | t  o t |  g |  _ n | g |  _ t |  _	 d  S(   N(
   R  R   R{   R   R   t   exprsR   R   R   R-  (   Ry   R  R/  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    c         C   s   |  i  | S(   N(   R  (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    c         C   s   |  i  i |  d  |  _ |  S(   N(   R  R   Rx   R  (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    	c         C   sX   t  |  _ g  } |  i D] } | | i   q ~ |  _ x |  i D] } | i   q@ W|  S(   sx   Extends leaveWhitespace defined in base class, and also invokes leaveWhitespace on
           all contained expressions.(   R   R   R  R   R  (   Ry   Rl   Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR    s    	-
 c         C   s   t  | t  oV | |  i j oB t t |   i |  x) |  i D] } | i |  i d  q@ Wq n? t t |   i |  x% |  i D] } | i |  i d  q W|  S(   Ni(   R   R&   R%  R  R   R  R  (   Ry   R   Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR    s    
  
 c         C   s^   y t  t |   i   SWn n X|  i d  j o& d |  i i t |  i  f |  _ n |  i S(   Ns   %s:(%s)(	   R  R   R   R  Rx   R  Rp   Ri   R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    &c         C   sp  t  t |   i   x |  i D] } | i   q Wt |  i  d j o%|  i d } t | |  i  or | i og | i d  j oW | i
 oL | i |  i d g |  _ d  |  _ |  i | i O_ |  i | i O_ n |  i d } t | |  i  oo | i od | i d  j oT | i
 oI |  i d  | i |  _ d  |  _ |  i | i O_ |  i | i O_ qln |  S(   Ni   i    i   i(   R  R   R{  R  R   R   R  R  R  Rx   R&  R  R#  R(  (   Ry   Ra  R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{    s0    
 		c         C   s   t  t |   i | |  } | S(   N(   R  R   R6  (   Ry   R   R4  R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR6    s    c         C   s@   | |  g } x |  i  D] } | i |  q W|  i g   d  S(   N(   R  R  R  (   Ry   R  RH  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR    s
    
 (   Rp   Rq   R   R   R{   R   R   R  R  R   R{  R6  R  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   ~  s   
						
	 c           B   sp   e  Z d  Z d e f d     YZ e   e _ e i i   e d  Z e d  Z	 d   Z
 d   Z d   Z RS(   s   Requires all given ParseExpressions to be found in the given order.
       Expressions may be separated by whitespace.
       May be constructed using the '+' operator.
    R  c           B   s   e  Z d    Z RS(   c         O   s
   t  i i S(   N(   R   R  t   instance(   R   R  R[  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    (   Rp   Rq   R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR    s   c         C   s   t  t |   i | |  t |  _ x) |  i D] } | i p t |  _ Pq, q, W|  i | d i  | d i	 |  _	 t |  _
 d  S(   Ni    (   R  R   R{   R   R#  R  R   R  R!  R   R-  (   Ry   R  R/  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    	
 
		c   
   	   C   s3  |  i  d i | | | d t \ } } t } x |  i  d D] } | t i i j o t } q< n | o y | i | | |  \ } } Wqt j
 o } t |   qt	 j
 o- }	 t t
 | t |  |  i |     qXn | i | | |  \ } } | p | i   o | | 7} q< q< W| | f S(   Ni    R:  i   (   R  R>  R   R   R  R  R   R   R   Rj  R   R   R)  R   (
   Ry   R  Rt   R9  t
   resultlistt	   errorStopRa  t
   exprtokensR   t   ie(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg    s$    ( -c         C   s-   t  | t  o t |  } n |  i |  S(   N(   R   R   R   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   	  s    c         C   sB   | |  g } x- |  i  D]" } | i |  | i p Pq q Wd  S(   N(   R  R  R#  (   Ry   R   t   subRecCheckListRa  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  	  s    
 
c         C   sq   t  |  d  o |  i S|  i d  j oB d d i g  } |  i D] } | t |  q? ~  d |  _ n |  i S(   NR   t   {R  t   }(   R2  R   R  Rx   R   R  Ri   (   Ry   Rl   Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   	  s
    B(   Rp   Rq   R   R   R  R  R  R   R{   Rg  R   R  R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   		c           B   sA   e  Z d  Z e d  Z e d  Z d   Z d   Z d   Z	 RS(   s   Requires that at least one ParseExpression is found.
       If two expressions match, the expression that matches the longest string will be used.
       May be constructed using the '^' operator.
    c         C   sR   t  t |   i | |  t |  _ x) |  i D] } | i o t |  _ Pq, q, Wd  S(   N(   R  R   R{   R   R#  R  R   (   Ry   R  R/  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   #	  s    	
 
	c         C   s7  d } d } d  } x |  i D] } y | i | |  } Wn t j
 o, }	 |	 i | j o |	 } |	 i } q q t j
 oH t |  | j o. t | t |  | i |   } t |  } q q X| | j o | } | }
 q q W| d j  o0 | d  j	 o
 |  q$t | | d |    n |
 i | | |  S(   Nii    s    no defined alternatives to match(	   Rx   R  Rr  R   Rt   Rj  R   R)  R>  (   Ry   R  Rt   R9  t	   maxExcLoct   maxMatchLoct   maxExceptionRa  t   loc2Ro  t   maxMatchExp(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  +	  s.    
 
c         C   s-   t  | t  o t |  } n |  i |  S(   N(   R   R   R   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __ixor__G	  s    c         C   sq   t  |  d  o |  i S|  i d  j oB d d i g  } |  i D] } | t |  q? ~  d |  _ n |  i S(   NR   R  s    ^ R  (   R2  R   R  Rx   R   R  Ri   (   Ry   Rl   Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   L	  s
    Bc         C   s3   | |  g } x |  i  D] } | i |  q Wd  S(   N(   R  R  (   Ry   R   R
  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  U	  s    
 (
   Rp   Rq   R   R   R{   R   Rg  R  R   R  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   	  s   			c           B   sA   e  Z d  Z e d  Z e d  Z d   Z d   Z d   Z	 RS(   s   Requires that at least one ParseExpression is found.
       If two expressions match, the first one listed is the one that will match.
       May be constructed using the '|' operator.
    c         C   sf   t  t |   i | |  | o9 t |  _ x6 |  i D] } | i o t |  _ Pq3 q3 Wn
 t |  _ d  S(   N(   R  R   R{   R   R#  R  R   (   Ry   R  R/  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   `	  s    	
 
	c   	      C   s   d } d  } x |  i D] } y | i | | |  } | SWq t j
 o, } | i | j o | } | i } q q t j
 oH t |  | j o. t | t |  | i |   } t |  } q q Xq W| d  j	 o
 |  n t | | d |    d  S(   Nis    no defined alternatives to match(   Rx   R  R>  R   Rt   Rj  R   R)  (	   Ry   R  Rt   R9  R  R  Ra  R   Ro  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  k	  s$    
 
c         C   s-   t  | t  o t |  } n |  i |  S(   N(   R   R   R   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   __ior__	  s    c         C   sq   t  |  d  o |  i S|  i d  j oB d d i g  } |  i D] } | t |  q? ~  d |  _ n |  i S(   NR   R  s    | R  (   R2  R   R  Rx   R   R  Ri   (   Ry   Rl   Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   	  s
    Bc         C   s3   | |  g } x |  i  D] } | i |  q Wd  S(   N(   R  R  (   Ry   R   R
  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  	  s    
 (
   Rp   Rq   R   R   R{   R   Rg  R  R   R  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   [	  s   			c           B   s8   e  Z d  Z e d  Z e d  Z d   Z d   Z RS(   s   Requires all given ParseExpressions to be found, but in any order.
       Expressions may be separated by whitespace.
       May be constructed using the '&' operator.
    c         C   sd   t  t |   i | |  t |  _ x) |  i D] } | i p t |  _ Pq, q, Wt |  _ t |  _ d  S(   N(	   R  R   R{   R   R#  R  R   R   t   initExprGroups(   Ry   R  R/  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   	  s    	
 
			c            s  |  i  og  } |  i D]$ } t | t  o | | i q q ~ |  _ g  } |  i D]$ } t | t  o | | i qV qV ~ |  _ g  } |  i D]$ } t | t  o | | i q q ~ |  _	 g  } |  i D]* } t | t t t f  p | | q q ~ |  _
 |  i
 |  i	 7_
 t |  _  n | }	 |  i
 }
 |  i   g  } t } x | o |
   |  i |  i	 } g  } x | D] } y | i | |	  }	 Wn  t j
 o | i |  q|X| i |  | |
 j o |
 i |  q||   j o   i |  q|q|Wt |  t |  j o
 t } qPqPW|
 oJ d i g  } |
 D] } | t |  qH~  } t | | d |   n | t   f d   |  i D  7} g  } x6 | D]. } | i | | |  \ } } | i |  qWt g   } x | D] } h  } xY | i   D]K } | | i   j o2 t | |  } | t | |  7} | | | <qqW| t |  7} x$ | i   D] \ } } | | | <q{WqW| | f S(   Ns   , s*   Missing one or more required elements (%s)c         3   s=   x6 |  ]/ } t  | t  o | i   j o	 | Vq q Wd  S(   N(   R   R   R  (   t   .0Ra  (   t   tmpOpt(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pys	   <genexpr>	  s   	 (   R  R  R   R   R  t	   optionalsR.   t   multioptionalsR   t   multirequiredt   requiredR   R   Rr  R   R   t   removeR   R   Ri   R   R>  R   R   R   (   Ry   R  Rt   R9  Rl   Ra  R  t   _[3]t   _[4]t   tmpLoct   tmpReqdt
   matchOrdert   keepMatchingt   tmpExprst   failedt   _[5]t   missingR  t   resultst   finalResultst   rt   dupsR   RH  R   (    (   R  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  	  sj    
>>>D

  0#    c         C   sq   t  |  d  o |  i S|  i d  j oB d d i g  } |  i D] } | t |  q? ~  d |  _ n |  i S(   NR   R  s    & R  (   R2  R   R  Rx   R   R  Ri   (   Ry   Rl   Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   	  s
    Bc         C   s3   | |  g } x |  i  D] } | i |  q Wd  S(   N(   R  R  (   Ry   R   R
  Ra  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  	  s    
 (   Rp   Rq   R   R   R{   Rg  R   R  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   	  s
   
8		c           B   s_   e  Z d  Z e d  Z e d  Z d   Z d   Z d   Z	 d   Z
 g  d  Z d   Z RS(	   sT   Abstract subclass of ParserElement, for combining and post-processing parsed tokens.c         C   s   t  t |   i |  t | t  o t |  } n | |  _ d  |  _ | d  j	 oc | i	 |  _	 | i
 |  _
 |  i | i  | i |  _ | i |  _ | i |  _ |  i i | i  n d  S(   N(   R  R   R{   R   R   R   R  Rx   R  R(  R#  R  R!  R   R  R-  R%  t   extend(   Ry   R  R/  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   	  s    		c         C   sI   |  i  d  j	 o |  i  i | | | d t St d | |  i |    d  S(   NR:  Rs   (   R  Rx   R>  R   R   R)  (   Ry   R  Rt   R9  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  	  s    c         C   s@   t  |  _ |  i i   |  _ |  i d  j	 o |  i i   n |  S(   N(   R   R   R  R   Rx   R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  
  s
    	c         C   s   t  | t  oY | |  i j oE t t |   i |  |  i d  j	 o |  i i |  i d  qe q nB t t |   i |  |  i d  j	 o |  i i |  i d  n |  S(   Ni(   R   R&   R%  R  R   R  R  Rx   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  

  s    #c         C   s8   t  t |   i   |  i d  j	 o |  i i   n |  S(   N(   R  R   R{  R  Rx   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{  
  s    c         C   sZ   |  | j o t  | |  g   n | |  g } |  i d  j	 o |  i i |  n d  S(   N(   R!   R  Rx   R  (   Ry   R   R
  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  
  s
    c         C   sC   | |  g } |  i  d  j	 o |  i  i |  n |  i g   d  S(   N(   R  Rx   R  R  (   Ry   R  RH  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  #
  s    c         C   sn   y t  t |   i   SWn n X|  i d  j o6 |  i d  j	 o& d |  i i t |  i  f |  _ n |  i S(   Ns   %s:(%s)(	   R  R   R   R  Rx   R  R  Rp   Ri   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   )
  s     &(   Rp   Rq   R   R   R{   R   Rg  R  R  R{  R  R  R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   	  s   				c           B   s#   e  Z d  Z d   Z e d  Z RS(   s  Lookahead matching of the given parse expression.  FollowedBy
    does *not* advance the parsing position within the input string, it only
    verifies that the specified parse expression matches at the current
    position.  FollowedBy always returns a null token list.c         C   s#   t  t |   i |  t |  _ d  S(   N(   R  R	   R{   R   R#  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   9
  s    c         C   s   |  i  i | |  | g  f S(   N(   R  Rr  (   Ry   R  Rt   R9  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  =
  s    (   Rp   Rq   R   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR	   4
  s   	c           B   s,   e  Z d  Z d   Z e d  Z d   Z RS(   s  Lookahead to disallow matching with the given parse expression.  NotAny
    does *not* advance the parsing position within the input string, it only
    verifies that the specified parse expression does *not* match at the current
    position.  Also, NotAny does *not* skip over leading whitespace. NotAny
    always returns a null token list.  May be constructed using the '~' operator.c         C   sB   t  t |   i |  t |  _ t |  _ d t |  i  |  _	 d  S(   Ns   Found unwanted token, (
   R  R   R{   R   R   R   R#  Ri   R  R)  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   H
  s    		c         C   s^   y |  i  i | |  Wn t t f j
 o n# X|  i } | | _ | | _ |  | g  f S(   N(   R  Rr  R   Rj  R  Rt   Rv   (   Ry   R  Rt   R9  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  P
  s    			c         C   sM   t  |  d  o |  i S|  i d  j o d t |  i  d |  _ n |  i S(   NR   s   ~{R  (   R2  R   R  Rx   Ri   R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   ]
  s
    (   Rp   Rq   R   R{   R   Rg  R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   B
  s   	c           B   s8   e  Z d  Z d   Z e d  Z d   Z e d  Z RS(   s<   Optional repetition of zero or more of the given expression.c         C   s#   t  t |   i |  t |  _ d  S(   N(   R  R.   R{   R   R#  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   i
  s    c      	   C   s   g  } y |  i  i | | | d t \ } } t |  i  d j } xf | o |  i | |  } n | } |  i  i | | |  \ } } | p | i   o | | 7} qE qE Wn t t f j
 o n X| | f S(   NR:  i    (	   R  R>  R   R   R%  Rc  R   R   Rj  (   Ry   R  Rt   R9  Rn  t   hasIgnoreExprsRl  t	   tmptokens(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  m
  s    $c         C   sM   t  |  d  o |  i S|  i d  j o d t |  i  d |  _ n |  i S(   NR   R   s   ]...(   R2  R   R  Rx   Ri   R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   
  s
    c         C   s(   t  t |   i | |  } t | _ | S(   N(   R  R.   R6  R   R  (   Ry   R   R4  R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR6  
  s    	(	   Rp   Rq   R   R{   R   Rg  R   R   R6  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR.   g
  s
   			c           B   s/   e  Z d  Z e d  Z d   Z e d  Z RS(   s2   Repetition of one or more of the given expression.c         C   s   |  i  i | | | d t \ } } y t |  i  d j } xf | o |  i | |  } n | } |  i  i | | |  \ } } | p | i   o | | 7} q? q? Wn t t f j
 o n X| | f S(   NR:  i    (	   R  R>  R   R   R%  Rc  R   R   Rj  (   Ry   R  Rt   R9  Rn  R+  Rl  R,  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  
  s    $c         C   sM   t  |  d  o |  i S|  i d  j o d t |  i  d |  _ n |  i S(   NR   R  s   }...(   R2  R   R  Rx   Ri   R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   
  s
    c         C   s(   t  t |   i | |  } t | _ | S(   N(   R  R   R6  R   R  (   Ry   R   R4  R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR6  
  s    	(   Rp   Rq   R   R   Rg  R   R   R6  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   
  s   		t
   _NullTokenc           B   s    e  Z d    Z e Z d   Z RS(   c         C   s   t  S(   N(   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   
  s    c         C   s   d S(   NRs   (    (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   
  s    (   Rp   Rq   R   R  R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR-  
  s   	c           B   s/   e  Z d  Z e d  Z e d  Z d   Z RS(   s   Optional matching of the given expression.
       A default return string can also be specified, if the optional expression
       is not found.
    c         C   s2   t  t |   i | d t | |  _ t |  _ d  S(   NR/  (   R  R   R{   R   R   R   R#  (   Ry   R  t   default(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   
  s    	c      	   C   s   y( |  i  i | | | d t \ } } Wnu t t f j
 oc |  i t j	 oF |  i  i o) t |  i g  } |  i | |  i  i <q |  i g } q g  } n X| | f S(   NR:  (	   R  R>  R   R   Rj  R   t   _optionalNotMatchedR  R   (   Ry   R  Rt   R9  Rn  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  
  s    (c         C   sM   t  |  d  o |  i S|  i d  j o d t |  i  d |  _ n |  i S(   NR   R   R   (   R2  R   R  Rx   Ri   R  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   
  s
    (   Rp   Rq   R   R/  R{   R   Rg  R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   
  s   c           B   s)   e  Z d  Z e d d  Z e d  Z RS(   s)  Token for skipping over all undefined text until the matched expression is found.
       If include is set to true, the matched expression is also consumed.  The ignore
       argument is used to define grammars (typically quoted strings and comments) that
       might contain false matches.
    c         C   s   t  t |   i |  | d  j	 o& |  i i   |  _ |  i i |  n t |  _ t	 |  _
 | |  _ t	 |  _ d t |  i  |  _ d  S(   Ns   No match found for (   R  R#   R{   Rx   R  R   R  R   R#  R   R(  t   includeMatchR   Ri   R)  (   Ry   R   t   includeR  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   
  s    				c      
   C   s5  | } t  |  } |  i } x | | j o y | i | |  } | i | | d t d t |  i oj | | | !} | i | | | d t \ } } | o$ t |  }	 |	 | 7}	 | |	 g f S| | g f Sn | | | | !g f SWq t t f j
 o | d 7} q Xq W|  i	 }
 | |
 _
 | |
 _ |
  d  S(   NR9  R:  i   (   R   R  Rc  R>  R   R0  R   R   Rj  R  Rt   Rv   (   Ry   R  Rt   R9  t   startLocRe  R  t   skipTextt   matt   skipResR  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRg  
  s.    	 
!
			N(   Rp   Rq   R   R   Rx   R{   R   Rg  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR#   
  s   c           B   sS   e  Z d  Z d d  Z d   Z d   Z d   Z g  d  Z d   Z	 d   Z
 RS(	   s  Forward declaration of an expression to be defined later -
       used for recursive grammars, such as algebraic infix notation.
       When the expression is known, it is assigned to the Forward variable using the '<<' operator.

       Note: take care when assigning to Forward not to overlook precedence of operators.
       Specifically, '|' has a lower precedence than '<<', so that::
          fwdExpr << a | b | c
       will actually be evaluated as::
          (fwdExpr << a) | b | c
       thereby leaving b and c out as parseable alternatives.  It is recommended that you
       explicitly group the values inserted into the Forward::
          fwdExpr << (a | b | c)
    c         C   s    t  t |   i | d t d  S(   NR/  (   R  R
   R{   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    c         C   s   t  | t  o t |  } n | |  _ | i |  _ d  |  _ |  i i |  _ |  i i |  _ |  i |  i i	  |  i i
 |  _
 |  i i |  _ |  i i |  i i  d  S(   N(   R   R   R   R  R#  Rx   R  R(  R  R!  R   R  R%  R*  (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt
   __lshift__  s    		c         C   s   t  |  _ |  S(   N(   R   R   (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  %  s    	c         C   s<   |  i  p. t |  _  |  i d  j	 o |  i i   q8 n |  S(   N(   R'  R   R  Rx   R{  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{  )  s
    
	c         C   sT   |  | j o6 | |  g } |  i  d  j	 o |  i  i |  qC n |  i g   d  S(   N(   R  Rx   R  R  (   Ry   R  RH  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  0  s
    c         C   sc   t  |  d  o |  i St |  _ z- |  i d  j	 o t |  i  } n d } Wd  t |  _ Xd | S(   NR   Rx   s	   Forward: (   R2  R   t   _ForwardNoRecurseR  R  Rx   Ri   R
   (   Ry   t	   retString(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   7  s    	

c         C   s=   |  i  d  j	 o t t |   i   St   } | |  >| Sd  S(   N(   R  Rx   R  R
   R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   E  s
    	N(   Rp   Rq   R   Rx   R{   R6  R  R{  R  R   R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR
     s   				R7  c           B   s   e  Z d    Z RS(   c         C   s   d S(   Ns   ...(    (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   N  s    (   Rp   Rq   R   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR7  M  s   c           B   s   e  Z d  Z e d  Z RS(   sD   Abstract subclass of ParseExpression, for converting parsed results.c         C   s#   t  t |   i |  t |  _ d  S(   N(   R  R(   R{   R   R  (   Ry   R  R/  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   S  s    (   Rp   Rq   R   R   R{   (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR(   Q  s   c           B   s    e  Z d  Z d   Z d   Z RS(   s,   Converter to upper case all matching tokens.c         G   s0   t  t |   i |   t i d t d d d  S(   NsA   Upcase class is deprecated, use upcaseTokens parse action insteadR  i   (   R  R)   R{   R  R  t   DeprecationWarning(   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   Y  s    	c         C   s   t  t t i |   S(   N(   R   RY  t   stringR  (   Ry   R  Rt   Rh  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRi  ^  s    (   Rp   Rq   R   R{   Ri  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR)   W  s   	c           B   s/   e  Z d  Z d e d  Z d   Z d   Z RS(   s   Converter to concatenate all matching tokens to a single string.
       By default, the matching patterns must also be contiguous in the input string;
       this can be disabled by specifying 'adjacent=False' in the constructor.
    Rs   c         C   sJ   t  t |   i |  | o |  i   n | |  _ t |  _ | |  _ d  S(   N(   R  R   R{   R  t   adjacentR   R   t
   joinString(   Ry   R  R<  R;  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{   g  s    		c         C   s8   |  i  o t i |  |  n t t |   i |  |  S(   N(   R;  R   R  R  R   (   Ry   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  p  s    
c         C   st   | i    } | 2| t d i | i |  i   g d |  i 7} |  i o! t | i    d j o | g S| Sd  S(   NRs   R   i    (	   R   R   R   R   R<  R*  R  R   R   (   Ry   R  Rt   Rh  t   retToks(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRi  w  s    1#(   Rp   Rq   R   R   R{   R  Ri  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   b  s   		c           B   s    e  Z d  Z d   Z d   Z RS(   sw   Converter to return the matched tokens as a list - useful for returning tokens of ZeroOrMore and OneOrMore expressions.c         C   s#   t  t |   i |  t |  _ d  S(   N(   R  R   R{   R   R  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    c         C   s   | g S(   N(    (   Ry   R  Rt   Rh  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRi    s    (   Rp   Rq   R   R{   Ri  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   	c           B   s    e  Z d  Z d   Z d   Z RS(   s  Converter to return a repetitive expression as a list, but also as a dictionary.
       Each element can also be referenced using the first token in the expression as its key.
       Useful for tabular report scraping when the first column can be used as a item key.
    c         C   s#   t  t |   i |  t |  _ d  S(   N(   R  R   R{   R   R  (   Ry   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    c         C   sc  xFt  |  D]8\ } } t |  d j o q n | d } t | t  o t | d  i   } n t |  d j o t d |  | | <q t |  d j o0 t | d t  o t | d |  | | <q | i   } | d =t |  d j p t | t  o$ | i	   o t | |  | | <q t | d |  | | <q W|  i
 o | g S| Sd  S(   Ni    i   Rs   i   (   R   R   R   R   Ri   R   R   R   R   R   R  (   Ry   R  Rt   Rh  R   t   tokt   ikeyt	   dictvalue(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRi    s&     
(0
(   Rp   Rq   R   R{   Ri  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   	c           B   s    e  Z d  Z d   Z d   Z RS(   s:   Converter for ignoring the results of a parsed expression.c         C   s   g  S(   N(    (   Ry   R  Rt   Rh  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRi    s    c         C   s   |  S(   N(    (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR    s    (   Rp   Rq   R   Ri  R  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR&     s   	c           B   s)   e  Z d  Z d   Z d   Z d   Z RS(   s?   Wrapper for parse actions, to ensure they are only called once.c         C   s   t  i |  |  _ t |  _ d  S(   N(   R   RX  t   callableR   t   called(   Ry   t
   methodCall(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR{     s    c         C   sC   |  i  p# |  i | | |  } t |  _  | St | | d   d  S(   NRs   (   RB  RA  R   R   (   Ry   RD  RE  RF  R&  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRC    s
    
	c         C   s   t  |  _ d  S(   N(   R   RB  (   Ry   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   reset  s    (   Rp   Rq   R   R{   RC  RD  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s   		c            sH   t  i        f d   } y   i | _ Wn t j
 o n X| S(   s&   Decorator for debugging parse actions.c             s     i  } |  d \ } } } t |   d j o |  d i i d | } n t i i d | t | |  | | f  y   |    } Wn2 t j
 o& } t i i d | | f    n Xt i i d | | f  | S(   Nii   i    t   .s"   >>entering %s(line: '%s', %d, %s)
s   <<leaving %s (exception: %s)
s   <<leaving %s (ret: %s)
(	   t	   func_nameR   R  Rp   t   syst   stderrt   writeRE   Rt  (   t   paArgst   thisFuncRD  RE  RF  R   R  (   RG  (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   z  s    	)(   R   RX  Rp   R}   (   RG  RL  (    (   RG  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR`     s    t   ,c         C   sz   t  |   d t  |  d t  |   d } | o" t |  t | |    i |  S|  t t |  |   i |  Sd S(   s  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 'combine=True' in the constructor.
       If combine is set to 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.
    s    [R  s   ]...N(   Ri   R   R.   R3  R&   (   R  t   delimt   combinet   dlName(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR<     s    ,"c            sA   t        f d   } t t  i d  i | d t  S(   sC  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.
    c            sC   t  | d  }  | o t t   g |   p
 t t  >g  S(   Ni    (   R   R   R   R?   (   RD  RE  RF  R  (   R  t	   arrayExpr(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   countFieldParseAction  s    /t   arrayLenR.  (   R
   R+   RP   R3  R\  R   (   R  RR  (    (   R  RQ  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR8     s    	c         C   sI   t  |   t j	 o |  g S|  g  j o |  St |  d  t |  d  S(   Ni    i   (   RI  R   t   _flatten(   t   L(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRT    s
      c            s/   t        f d   } |  i | d t   S(   s0  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 "1:1", but not "1:2".  Because this matches a
       previous literal, will also match the leading "1:1" in "1:10".
       If this is not desired, use matchPreviousExpr.
       Do *not* use with packrat parsing enabled.
    c            s~   | oh t  |  d j o   | d >qz t | i    }   t g  } | D] } | t |  qM ~  >n   t   >d  S(   Ni   i    (   R   RT  R   R   R   R   (   RD  RE  RF  t   tflatRl   t   tt(   t   rep(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   copyTokenToRepeater
  s    3R.  (   R
   R]  R   (   R  RY  (    (   RX  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRM     s    	
c            sC   t      |  i   }   | >  f d   } |  i | d t   S(   sX  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 "1:1", but not "1:2".  Because this matches by
       expressions, will *not* match the leading "1:1" in "1:10";
       the expressions are evaluated first, and then compared, so
       "1" is compared with "10".
       Do *not* use with packrat parsing enabled.
    c            s8   t  | i        f d   }  i | d t d  S(   Nc            s9   t  | i    } |   j o t d d d   n d  S(   NRs   i    (   RT  R   R   (   RD  RE  RF  t   theseTokens(   t   matchTokens(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   mustMatchTheseTokens)  s    R.  (   RT  R   R\  R   (   RD  RE  RF  R\  (   RX  (   R[  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRY  '  s    R.  (   R
   R   R]  R   (   R  t   e2RY  (    (   RX  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRL     s    	c         C   sU   x$ d D] } |  i  | d |  }  q W|  i  d d  }  |  i  d d  }  t |   S(   Ns   \^-]s   \s   
s   \ns   	s   \t(   R  Ri   (   RD  Rm   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR  1  s     c         C   sB  | o d   } d   } t  } n d   } d   } t } t |  t t f  o |  } n7 t |  t  o |  i   } n t i d t	 d d d } x | t
 |  d	 j  o | | } x t | | d	  D]j \ }	 }
 | |
 |  o | | |	 d	 =Pq | | |
  o* | | |	 d	 =| i | |
  |
 } Pq q W| d	 7} q W| o | o y t
 |  t
 d
 i |   j o9 t d d
 i g  } | D] } | t |  q~   St d i g  } | D] } | t i |  q~   SWqt i d t	 d d qXn t g  } | D] } | | |  q%~  S(   sc  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 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 MatchFirst object (if caseless=True, or
          if creating a Regex raises an exception)
    c         S   s   |  i    | i    j S(    (   R  (   R   t   b(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   F  s    c         S   s   | i    i |  i     S(    (   R  R  (   R   R^  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   G  s    c         S   s
   |  | j S(    (    (   R   R^  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   J  s    c         S   s   | i  |   S(    (   R  (   R   R^  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR   K  s    s2   Invalid argument to oneOf, expected string or listR  i   i    i   Rs   s   [%s]t   |s7   Exception creating Regex for oneOf, building MatchFirst(   R   R   R   R   R  R   t   splitR  R  R  R   R   R   R   R"   R  R,  R   R   (   t   strsR  t   useRegext   isequalt   maskst   parseElementClasst   symbolsR   t   curR   R   Rl   t   symR  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRQ   9  sJ    		
			 
 	"9;	c         C   s   t  t t |  |    S(   s  Helper to easily and clearly define a dictionary by specifying the respective patterns
       for the key and value.  Takes care of defining the Dict, ZeroOrMore, and 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 Dict results can include named token
       fields.
    (   R   R.   R   (   R   R   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR=   t  s    s   \[]-*.$+^?()~ R  c         C   s   | d  d S(   i    i   (    (   RD  RE  RF  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    s   \]t   0xc         C   s   t  t | d  d   S(   i    i   (   t   unichrR   (   RD  RE  RF  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    t   0t   01234567c         C   s   t  t | d  d   S(   i    i   (   Rj  R   (   RD  RE  RF  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    i   t   -R   t   ^t   negatet   bodyR   c         C   sf   t  |  t  oR d  i g  } t t |  d  t |  d  d  D] } | t |  qB ~  p |  S(   Rs   i    i   (   R   R   R   R   t   ordRj  (   t   pRl   Rm   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    c      	   C   sM   y> d i  g  } t i |   i D] } | t |  q  ~  SWn d SXd S(   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 '\0x' (\0x21, which is a '!' character)
          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.)
    Rs   N(   R   t   _reBracketExprR~  Rp  t	   _expanded(   RD  Rl   t   part(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR]     s    >c            s     f d   } | S(   sr   Helper method for defining parse actions that require matching at a specific
       column in the input text.
    c            s4   t  | |     j o t |  | d     n d  S(   Ns   matched token not at column %d(   R5   R   (   Rk   t   locnR  (   R  (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt	   verifyCol  s    (    (   R  Rw  (    (   R  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRK     s    c            s     f d   } | S(   s   Helper method for common parse actions that simply return a literal value.  Especially
       useful when used with transformString().
    c             s     g S(   N(    (   R  (   t   replStr(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt	   _replFunc  s    (    (   Rx  Ry  (    (   Rx  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRZ     s    c         C   s   | d d d !S(   s   Helper parse action for removing quotation marks from parsed quoted strings.
       To use, add this parse action to quoted string using::
         quotedString.setParseAction( removeQuotes )
    i    i   i(    (   RD  RE  RF  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRX     s    c         C   s.   g  } t  t |  D] } | | i   q ~ S(   s4   Helper parse action to convert tokens to upper case.(   RY  Ri   R  (   RD  RE  RF  Rl   RW  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRb     s    c         C   s.   g  } t  t |  D] } | | i   q ~ S(   s4   Helper parse action to convert tokens to lower case.(   RY  Ri   t   lower(   RD  RE  RF  Rl   RW  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR>     s    c         C   sN   y t    } Wn t j
 o t d   n X| 2| t |  | | ! 7} | S(   sa   Helper parse action to preserve original parsed text,
       overriding any nested parse actions.sJ   incorrect usage of keepOriginalText - may only be called as a parse action(   R@   R   R   R   (   RD  R2  RF  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRD     s    c       	   C   so   d d k  }  |  i   } zL xE | d D]- } | d d j o | d i d } | Sq& Wt d   Wd ~ Xd S(	   si   Method to be called from within a parse action to determine the end
       location of the parsed tokens.iNi   i   Rq  i    Rt   sR   incorrect usage of getTokensEndLoc - may only be called from within a parse action(   t   inspectt   stackt   f_localsR   (   R{  t   fstackRG  R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR@     s     	c   
   
   C   sD  t  |  t  o |  } t |  d | }  n
 |  i } t t t d  } | o t i   i	 t
  } t d  |  t t t | t d  |    t d d t g i d  i	 d    t d	  } n d
 i g  } t D] } | d	 j o | | q q ~  } t i   i	 t
  t |  B} t d  |  t t t | i	 t  t t d  |     t d d t g i d  i	 d    t d	  } t t d  |  d	  }	 | i d d
 i | i d d  i   i     i d |   } |	 i d d
 i | i d d  i   i     i d |   }	 | |	 f S(   sR   Internal helper to construct opening and closing tag expressions, given a tag nameR  s   _-:R   t   =t   /R.  R?   c         S   s   | d  d j S(   i    R  (    (   RD  RE  RF  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    R   Rs   c         S   s   | d  d j S(   i    R  (    (   RD  RE  RF  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    s   </R  t   :R  s   <%s>R  s   </%s>(   R   R   R   R   R+   R0   R/   R:   R   R\  RX   R&   R   R.   R   R   R   R6  R   RT   RW   R>   R   t   _LR  t   titleR`  R3  (
   t   tagStrR   t   resnamet   tagAttrNamet   tagAttrValuet   openTagRl   Rm   t   printablesLessRAbrackt   closeTag(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt	   _makeTags  s    	j;uAAc         C   s   t  |  t  S(   sR   Helper to construct opening and closing tag expressions for HTML, given a tag name(   R  R   (   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRI     s    c         C   s   t  |  t  S(   sQ   Helper to construct opening and closing tag expressions for XML, given a tag name(   R  R   (   R  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRJ     s    c             s^   |  o |    n | i      g  }   D] \ } } | | | f q) ~     f d   } | S(   s`  Helper to create a validating parse action to be used with start tags created
       with makeXMLTags or makeHTMLTags. Use withAttribute to qualify a starting tag
       with a required attribute value, to avoid false matches on common tags such as
       <TD> or <DIV>.

       Call withAttribute with a series of attribute names and values. Specify the list
       of filter attributes names and values as:
        - keyword arguments, as in (class="Customer",align="right"), or
        - 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.

       To verify that the attribute exists, but without specifying a value, pass
       withAttribute.ANY_VALUE as the value.
       c            s   x   D]{ \ } } | | j o t  |  | d |   n | t i j o8 | | | j o' t  |  | d | | | | f   q q Wd  S(   Ns   no matching attribute s+   attribute '%s' has value '%s', must be '%s'(   R   Rc   t	   ANY_VALUE(   RD  RE  Rn  t   attrNamet	   attrValue(   t   attrs(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   pa  s     !(   R   (   R  t   attrDictRl   R   R   R  (    (   R  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRc     s    -c         C   s/  t    } |  t d  | t d  B} xt |  D]\ } } | d d  \ } } } }	 | d j o@ | d
 j p t |  d j o t d   n | \ }
 } n t    } | t i j o | d j o( t | |  t	 | t
 |   } q| d j oe | d
 j	 o0 t | | |  t	 | t
 | |   } qt | |  t	 | t
 |   } q| d j o: t | |
 | | |  t	 | |
 | | |  } qt d   n8| t i j o| d j oE t | t  p t |  } n t | i |  t	 | |  } q| d j oe | d
 j	 o0 t | | |  t	 | t
 | |   } qt | |  t	 | t
 |   } q| d j o: t | |
 | | |  t	 | |
 | | |  } qt d   n t d	   |	 o | i |	  n | | | B>| } q4 W| | >| S(   s#  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 opAssoc.RIGHT and opAssoc.LEFT.
           - parseAction is the parse action to be associated with
              expressions matching this operator expression (the
              parse action tuple member may be omitted)
    t   (R  i   i   i   s@   if numterms=3, opExpr must be a tuple or list of two expressionsi   s6   operator must be unary (1), binary (2), or ternary (3)s2   operator must indicate right or left associativityN(   N(   R
   R&   R   Rx   R   R  RR   t   LEFTR	   R   R   t   RIGHTR   R   R  R\  (   t   baseExprt   opListR   t   lastExprR   t   operDeft   opExprt   arityt   rightLeftAssocR  t   opExpr1t   opExpr2t   thisExprt	   matchExpr(    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRS   &  sR    	  	(0(!%0(!
s4   "(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*"s    string enclosed in double quotess4   '(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*'s    string enclosed in single quotessq   (?:"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]+)|(?:\\.))*")|(?:'(?:[^'\n\r\\]|(?:'')|(?:\\x[0-9a-fA-F]+)|(?:\\.))*')s*   quotedString using single or double quotest   uR  R  c         C   sJ  |  | j o t  d   n | d j o t |  t  o t | t  ov | d j	 o> t t | t |  | t i d d   i	 d    } q t
 t |  | t i  i	 d    } q t  d   n t   } | d j	 o4 | t t |   t | | B| B t |   >n- | t t |   t | | B t |   >| S(   s  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 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 Or or MatchFirst.
       The default is quotedString, but if no expressions are to be ignored,
       then pass None for this argument.
    s.   opening and closing strings cannot be the sameR  i   c         S   s   |  d  i    S(   i    (   R   (   RF  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    c         S   s   |  d  i    S(   i    (   R   (   RF  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    sO   opening and closing arguments must be strings if no content expression is givenN(   R  Rx   R   R   R   R   R   R   R  R\  R?   R
   R   R&   R.   (   t   openert   closert   contentt
   ignoreExprR   (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRN   r  s     
$+	4,c      	      s    f d   }   f d   }   f d   } t  t   i d  i    } t   t   i |  } t   i |  } t   i |  }	 | oF t t |  t |   | t  | t |   t |   |	  }
 n1 t t |  t  | t |   t |    }
 |  i	 d t    |
 S(   s  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 blockStatement.
    c            sy   | t  |   j o d  St | |   } |   d j o= |   d j o t |  | d   n t |  | d   n d  S(   Nis   illegal nestings   not a peer entry(   R   R5   R   R   (   RD  RE  RF  t   curCol(   t   indentStack(    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   checkPeerIndent  s     c            sG   t  | |   } |   d j o   i |  n t |  | d   d  S(   Nis   not a subentry(   R5   R   R   (   RD  RE  RF  R  (   R  (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   checkSubIndent  s    c            st   | t  |   j o d  St | |   }   o |   d j  o |   d j p t |  | d   n   i   d  S(   Niis   not an unindent(   R   R5   R   R   (   RD  RE  RF  R  (   R  (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   checkUnindent  s     )s   	 s   \(
   R   R   R  R  R   R\  R   R   R	   R  (   t   blockStatementExprR  R   R  R  R  t   NLt   INDENTt   PEERt   UNDENTt   smExpr(    (   R  sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyRd     s    C$s#   [\0xc0-\0xd6\0xd8-\0xf6\0xf8-\0xff]s   [\0xa1-\0xbf\0xd7\0xf7]s   _:t   &s   gt lt amp nbsp quott   entityt   ;s   ><& 'c         C   s"   |  i  t j o t |  i  p d  S(   N(   R  t   _htmlEntityMapRx   (   RF  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyR     s    s   /\*(?:[^*]*\*+)+?/s   C style comments   <!--[\s\S]*?-->s   .*s   \/\/(\\\n|.)*s
   // comments:   /(?:\*(?:[^*]*\*+)+?/|/[^\n]*(?:\n[^\n]*)*?(?:(?<!\\)|\Z))s   C++ style comments   #.*s   Python style comments    	t	   commaItemR.  t   __main__c         C   s   yv t  i |   } | i   } |  d t |  GHd t |  GHd t | i  GHd t | i  GH| i d t  GHWn? t j
 o3 } |  d GH| i	 GHd | i
 d d GH| GHn Xd	 GHd  S(
   Ns   ->s	   tokens = s   tokens.columns = s   tokens.tables = t   SQLR  i   Rn  (    (   t	   simpleSQLR~  R   Re   t   columnst   tablesR   R   R   RE   R|   (   t
   teststringRn  Rh  Ro  (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   test  s    	
t   selectt   froms   _$RE  RO  t   *R  R  s   SELECT * from XYZZY, ABCs   select * from SYS.XYZZYs   Select A from Sys.duals   Select AA,BB,CC from Sys.duals   Select A, B, C from Sys.duals   Xelect A, B, C from Sys.duals   Select A, B, C frox Sys.dualt   Selects   Select ^^^ frox Sys.duals'   Select A, B, C from Sys.dual, Table2   (   R   t   __version__t   __versionTime__t
   __author__R:  t   weakrefR    R   R   RG  R  R,  R  t   xml.sax.saxutilsR   t   __all__t   version_infoR   RJ  t   maxsizeR  Re   R   R   t   maxintRi   Rn   R   Ro   t	   lowercaset	   uppercaseR0   t   ascii_lowercaset   ascii_uppercaset   digitsRP   RA   R/   t   _bslashR   Rl   t	   printableRm   t
   whitespaceRT   Rt  R   R   R   R   R!   R   R   R5   RH   RE   R  R  R  RO   R   R'   R   R   R   R  R   R   R   R+   R"   R    R   R*   R  R   R   R   R%   R$   R-   R,   R   R   R   R   R   R   R	   R   R.   R   R-  R/  R   R#   R
   R7  R(   R)   R   R   R   R&   R   R`   R<   R8   RT  RM   RL   R  RQ   R=   R3  R?   RG   RF   R_   R^   R\  t   _escapedPuncR  t   _printables_less_backslasht   _escapedHexChart   _escapedOctChart   _singleChart
   _charRangeR6  Rs  Rt  R]   RK   RZ   RX   Rb   R>   RD   R@   R  RI   RJ   Rc   R  RR   R  R  RS   R:   R\   RW   Ra   Rx   RN   Rd   R1   RU   R3   R2   R7   Rj   t   zipR`  R  RY   R4   RB   R  R[   R;   R9   RC   RV   R  t	   _noncommaR{  t   _commasepitemR6   Rp   R  t   selectTokent	   fromTokent   identt
   columnNamet   columnNameListt	   tableNamet   tableNameListR  (    (    (    sD   C:\graphics\Tools\Python26\Lib\site-packages\matplotlib\pyparsing.pyt   <module>;   s  		
			

A.	 `			
				  	>9tG:]C=;VH%'"	",G	"							;	!;,+@																G(4)	;8%	









