ó §]Sc@sddlZddlmZddlmZdefd„ƒYZdefd„ƒYZd efd „ƒYZd „Z d „Z d „Z dS(iÿÿÿÿNi(tast(tto_underscorest SectionsFilecBseZd„ZRS(cCs ||_dS(N(tsections(tselfR((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyt__init__s(t__name__t __module__R(((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyRstSectioncBseZd„ZRS(cCs(d|_d|_d|_g|_dS(N(tNonetfilettitletincludest subsections(R((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyRs   (RRR(((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyRst SubsectioncBseZd„ZRS(cCs||_g|_dS(N(tnametsymbols(RR((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyR's (RRR(((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyR&scCsµg}d}d}x–|D]Ž}|jƒ}| s|jƒrDqn|dkrˆtƒ}|j|ƒtdƒ}|jj|ƒqn|dkr d}qntjd|ƒ}|rÎ|j d|_ qntjd|ƒ}|rü|j d|_ qntjd|ƒ}|r*|j d|_ qntjd|ƒ}|rst|j j ddƒƒ}|jj|ƒqn|jd ƒr—|jd ƒr—qn|jj|ƒqWt|ƒS( Ns
s
s(?P.*)tcontentss(?P<contents>.*)s#(?P.*)s.*))?>Rt(R trstriptisspaceRtappendRR tretmatcht groupdictR R R tgett startswithtendswithRR(tlinesRtcurrent_sectiontcurrent_subsectiontlineR((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pytparse_sections_file,sJ       cCs$x|jD]}|jdƒ|jdk rF|jd|jfƒn|jdk ro|jd|jfƒn|jdk r˜|jd|jfƒnt}x{|jD]p}|jdk r×|jd|jfƒn|sí|jdƒnt }x"|j D]}|j|dƒqýWq¨Wq WdS(Ns
s%s s%s s%s s s s ( RtwriteR R R R tTrueR RtFalseR(tft sections_filetsectiontis_first_subsectiont subsectiontsymbol((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pytwrite_sections_file`s" c sD|j}g‰‡fd†}d„}|ddƒ}x|jƒD]ó}t|tjƒrn|||jƒqCt|tjtjfƒrC|j}t |ƒj ddƒj ƒ}|||ƒ}|||ƒ|||j j j ddƒƒx!|jD]} ||| jƒqõWx$|jD]} ||| jƒqWqCqCWtˆƒS( NcsBtƒ}||_||_|jjtdƒƒˆj|ƒ|S(N(RR R R RRR (tfile_R R'(R(s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyt new_section|s     cSs|jdjj|ƒdS(Ni(R RR(R'tsym((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyt append_symbol„stmaintMaint_t-t.t(t namespacet itervaluest isinstanceRtFunctionR*tClasst Interfacet gtype_nameRtreplacetlowertglib_type_structt target_ginametmethodststatic_methodsR( t transformertnsR-R/tgeneral_sectiontnodeR<t file_nameR'tmeth((Rs}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pytgenerate_sections_filews&    ( RR5RtutilsRtobjectRRRR!R+RI(((s}/home/kou/work/ruby/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyts  4