|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/lib/python2.4/site-packages/_xmlplus/xpath/ |
Upload File : |
mò
/¦3>c @ sq d k Z d e f d „ ƒ YZ d e f d „ ƒ YZ d f d „ ƒ YZ d f d „ ƒ YZ d „ Z d
„ Z d S( Nt SyntaxErrorc B s, t Z d Z d d d „ Z d „ Z e Z RS( sB When we run into an unexpected token, this is the exception to useiÿÿÿÿs Bad Tokenc C s# t i | ƒ | | _ | | _ d S( N( t Exceptiont __init__t selft post msg( R R R ( ( t: /usr/lib/python2.4/site-packages/_xmlplus/xpath/yappsrt.pyR s
c C s7 | i d j o d Sn d | i
d | i d Sd S( Ni s #<syntax-error>s SyntaxError[@ char s : t ]( R R R ( R ( ( R t __repr__ s ( t __name__t
__module__t __doc__R R t __str__( ( ( R R s t NoMoreTokensc B s t Z d Z RS( s7 Another exception object, for when we run out of tokens( R R
R ( ( ( R R
s t Scannerc B s/ t Z d „ Z d d „ Z d „ Z d „ Z RS( Nc C s g | _ g | _ | | _ d | _ | | _ | d j oC g | _ x7 | D]+ \ } } | i i
| t i | ƒ f ƒ qJ Wn d S( s] Patterns is [(terminal,regex)...]
Ignore is [terminal,...];
Input is a stringi N(
R t tokenst restrictionst inputR t ignoret patternst Nonet kt rt appendt ret compile( R R R R R R ( ( R R s
i c C s¡ | t | i ƒ j o | i | ƒ n | t | i ƒ j oW | oA | i | o3 x0 | D]$ } | | i | j o
d ‚ qY qY Wn | i | Sn t ƒ ‚ d S( s¡ Get the i'th token, and if i is one past the end, then scan
for another token; restrict is a list of tokens that
are allowed, or 0 for any token.s&