ó kŒZc@`sdZddlmZddlmZddlmZddlmZddlZddlZddlZddl m Z ddlm Z m Z m Z d d l mZmZd d lmZmZmZdZd Zd Zd ZdZdZdZdZeeeegZdZdZeegZdZ dZ!e e!gZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,e#e$e%e&e'e(e)e*e+e,g Z-eee"e-Z.d Z/d!Z0d"Z1d#Z2dZ3d$Z4d%Z5d&Z6d'Z7d(Z8d)Z9d*Z:d+Z;d,Z<d-Z=d.Z>d/Z?d0Z@d1ZAd2ZBd3ZCd4ZDd5ZEdZFdZGd6ZHdZIdZJe1e=e>e?e2e3e4e5e6e7e8e9e:e;e<e@eAeBeCeDeEeFeGeHeIeJgZKd7ZLd8ZMeLeMgZNeKeNZOe2e3gZPgeOD]ZQeQePkrõeQ^qÝZRd9ZSd:ZTd;ZUeSeTeUgZVd<ZWd=ZXeWeXgZYd-ZZeZgZ[d>Z\d?Z]d@Z^e\e]e^gZ_dAZ`dBZadCZbdDZce`eaebecgZdejedEejfƒZgejedFejfejhBƒZiejedGejfejhBƒZjejedHejfejhBƒZkejedIejfejhBƒZlejedJejfejhBƒZmejedKejfejhBƒZnejedLejfejhBƒZoejedMejfejhBƒZpejedNejfejhBƒZqejedOejfejhBƒZrdPjse.ƒjtdQdRƒZuejedSeudTejfejhBejvBƒZwejedUejfejhBƒZxejedVejfejhBejvBƒZydWefdX„ƒYZzdYe{fdZ„ƒYZ|d[e|fd\„ƒYZ}d]e|fd^„ƒYZ~d_e|fd`„ƒYZe dadbdcdddedfgƒZ€e dadbdcdddgƒZdge{fdh„ƒYZ‚die{fdj„ƒYZƒdS(ku GTK-Doc comment block format ---------------------------- A GTK-Doc comment block is built out of multiple parts. Each part can be further divided into fields which are separated by a colon ("``:``") delimiter. Known parts and the fields they are constructed from look like the following (optional fields are enclosed in square brackets):: ┌───────────────────────────────────────────────────────────┠│ /** │ ─▷ start token ├────────────────────┬──────────────────────────────────────┤ │ * identifier_name │ [: annotations] │ ─▷ identifier part ├────────────────────┼─────────────────┬────────────────────┤ │ * @parameter_name │ [: annotations] │ : description │ ─▷ parameter part ├────────────────────┴─────────────────┴────────────────────┤ │ * │ ─▷ comment block description │ * comment_block_description │ ├─────────────┬─────────────────┬───────────┬───────────────┤ │ * tag_name │ [: annotations] │ [: value] │ : description │ ─▷ tag part ├─────────────┴─────────────────┴───────────┴───────────────┤ │ */ │ ─▷ end token └───────────────────────────────────────────────────────────┘ There are two conditions that must be met before a comment block is recognized as a GTK-Doc comment block: #. The comment block is opened with a GTK-Doc start token ("``/**``") #. The first line following the start token contains a valid identifier part Once a GTK-Doc comment block has been identified as such and has been stripped from its start and end tokens the remaining parts have to be written in a specific order: #. There must be exactly 1 `identifier` part on the first line of the comment block which consists of: * a required `identifier_name` field * an optional `annotations` field, optionally spanning multiple lines #. Zero or more `parameter` parts, each consisting of: * a required `parameter_name` field * an optional `annotations` field, optionally spanning multiple lines * a required `description` field (can be the empty string) #. One optional `comment block description` part which must begin with at least 1 empty line signaling the start of this part. #. Zero or more `tag` parts, each consisting of: * a required `tag_name` field * an optional `annotations` field, optionally spanning multiple lines * an optional `value` field * a required `description` field (can be the empty string) Additionally, the following restrictions are in effect: #. Separating parts with an empty line: * `identifier` and `parameter` parts cannot be separated from each other by an empty line as this would signal the start of the `comment block description` part (see above). * it is required to separate the `comment block description` part from the `identifier` or `parameter` parts with an empty line (see above) * `comment block description` and `tag` parts can optionally be separated by an empty line #. Parts and fields cannot span multiple lines, except for: * the `comment_block_description` part * `parameter description` and `tag description` fields * `identifier`, `parameter` and `tag` part `annotations` fields #. Taking the above restrictions into account, spanning multiple paragraphs is limited to the `comment block description` part and `tag description` fields. Refer to the `GTK-Doc manual`_ for more detailed usage information. .. _GTK-Doc manual: http://developer.gnome.org/gtk-doc-manual/1.18/documenting.html.en i(tabsolute_import(tdivision(tprint_function(tunicode_literalsN(t namedtuple(tnetgttlti(tCountert OrderedDict(tPositiontwarnterroriiu deprecatedureturnsusinceu stabilityu descriptionu return valueureturnu returns valueu attributesuget value funcuref funcu rename touset value funcutransferutypeu unref funcuvalueuvirtualu(u)u allow-noneuarrayuclosureu constructorudestroyu element-typeuforeignuget-value-funcuinuinoutumethodunullableuoptionalunotuouturef-funcu rename-touscopeuset-value-funcuskipu unref-funcu attributeuin-outu fixed-sizeulengthuzero-terminateducallee-allocatesucaller-allocatesuasyncucallunotifiedu containerufloatingufullunoneu \r\n|\r|\nuV ^ # start (?P.*?) # whitespace, code, ... \s* # 0 or more whitespace characters (?P/\*{2}(?![\*/])) # 1 forward slash character followed # by exactly 2 asterisk characters # and not followed by a slash character \s* # 0 or more whitespace characters (?P.*?) # GTK-Doc comment text \s* # 0 or more whitespace characters $ # end uû ^ # start \s* # 0 or more whitespace characters (?P.*?) # GTK-Doc comment text \s* # 0 or more whitespace characters (?P\*+/) # 1 or more asterisk characters followed # by exactly 1 forward slash character (?P.*?) # whitespace, code, ... \s* # 0 or more whitespace characters $ # end u  ^ # start \s* # 0 or more whitespace characters (?P.*?) # invalid comment text \s* # 0 or more whitespace characters \* # 1 asterisk character \s? # 0 or 1 whitespace characters # WARNING: removing more than 1 # whitespace character breaks # embedded example program indentation us ^ (?P\s*) # 0 or more whitespace characters .* $ uà ^ # start \s* # 0 or more whitespace characters $ # end u0 ^ # start \s* # 0 or more whitespace characters SECTION # SECTION \s* # 0 or more whitespace characters (?P:?) # delimiter \s* # 0 or more whitespace characters (?P\w\S+?) # section name \s* # 0 or more whitespace characters :? # invalid delimiter \s* # 0 or more whitespace characters $ uz ^ # start \s* # 0 or more whitespace characters (?P[\w-]*\w) # symbol name \s* # 0 or more whitespace characters (?P:?) # delimiter \s* # 0 or more whitespace characters (?P.*?) # annotations + description \s* # 0 or more whitespace characters :? # invalid delimiter \s* # 0 or more whitespace characters $ # end uÄ ^ # start \s* # 0 or more whitespace characters (?P[\w]+) # class name \s* # 0 or more whitespace characters :{1} # 1 required colon \s* # 0 or more whitespace characters (?P[\w-]*\w) # property name \s* # 0 or more whitespace characters (?P:?) # delimiter \s* # 0 or more whitespace characters (?P.*?) # annotations + description \s* # 0 or more whitespace characters :? # invalid delimiter \s* # 0 or more whitespace characters $ # end uà ^ # start \s* # 0 or more whitespace characters (?P[\w]+) # class name \s* # 0 or more whitespace characters :{2} # 2 required colons \s* # 0 or more whitespace characters (?P[\w-]*\w) # signal name \s* # 0 or more whitespace characters (?P:?) # delimiter \s* # 0 or more whitespace characters (?P.*?) # annotations + description \s* # 0 or more whitespace characters :? # invalid delimiter \s* # 0 or more whitespace characters $ # end u' ^ # start \s* # 0 or more whitespace characters @ # @ character (?P[\w-]*\w|.*?\.\.\.) # parameter name \s* # 0 or more whitespace characters :{1} # 1 required delimiter \s* # 0 or more whitespace characters (?P.*?) # annotations + description \s* # 0 or more whitespace characters $ # end u|u u\su® ^ # start \s* # 0 or more whitespace characters (?Pu) # tag name \s* # 0 or more whitespace characters :{1} # 1 required delimiter \s* # 0 or more whitespace characters (?P.*?) # annotations + value + description \s* # 0 or more whitespace characters $ # end u¾ ^ # start \s* # 0 or more whitespace characters (?P([0-9\.])*) # value \s* # 0 or more whitespace characters (?P:?) # delimiter \s* # 0 or more whitespace characters (?P.*?) # description \s* # 0 or more whitespace characters $ # end u¾ ^ # start \s* # 0 or more whitespace characters (?P(stable|unstable|private|internal)?) # value \s* # 0 or more whitespace characters (?P:?) # delimiter \s* # 0 or more whitespace characters (?P.*?) # description \s* # 0 or more whitespace characters $ # end tGtkDocAnnotationscB`s,eZdZdZddd„Zd„ZRS(uó An ordered dictionary mapping annotation names to annotation options (if any). Annotation options can be either a :class:`list`, a :class:`giscanner.collections.OrderedDict` (depending on the annotation name)or :const:`None`. upositioncC`stj||ƒ||_dS(N(R t__init__tposition(tselfRtsequence((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR scC`st|j|ƒS(N(R R(R((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__copy__sN(t__name__t __module__t__doc__t __slots__tNoneRR(((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR stGtkDocAnnotatablecB`s@eZdZd"Zd#Zd$d„Zd„Zd„Zd„Z d$d$d$d$d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d „Z#d!„Z$RS(%uK Base class for GTK-Doc comment block parts that can be annotated. upositionu annotationscC`s||_tƒ|_dS(N(RR t annotations(RR((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR!s cC`sd|jfS(Nu(R(R((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__repr__*scC`s1|jr-|jj}x|jjƒD]\}}||jkrrt|d|jddƒƒ}||||ƒn7|tkr•td|f|ƒntd|f|ƒ|tkr%t |kr%t |jkròtdtdt t f|ƒnt |jkr&tdtdt t f|ƒq&q%q%WndS( ua Validate annotations stored by the :class:`GtkDocAnnotatable` instance, if any. u _do_validate_u-u_uunexpected annotation: %suunknown annotation: %su&cannot have both "%s" and "%s" presentu N( RRtitemstvalid_annotationstgetattrtreplacetALL_ANNOTATIONSR tANN_NOTtOPT_NOT_NULLABLEt ANN_NULLABLEtANN_ALLOW_NONE(RRtann_nametoptionstvalidate((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR&-s$    c C`sŒ|dkrd}n d|f}|dkr7d}n"|dkrLd}n d|f}|||ƒrˆtd||||f|ƒnd S( u, Validate the number of options held by an annotation according to the test ``operator(n_options, expected_n_options)``. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param n_options: number of options held by the annotation :param expected_n_options: number of expected options :param operator: an operator function from python's :mod:`operator` module, for example :func:`operator.ne` or :func:`operator.lt` :param message: warning message used when the test ``operator(n_options, expected_n_options)`` fails. iunoneu%du no optionsiu one optionu %d optionsu"%s" annotation %s %s, %s givenN(R ( RRR$t n_optionstexpected_n_optionstoperatortmessagettts((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_validate_optionsNs        c C`sÖt|ƒ}|dk r7|j||||tdƒn|dk rb|j||||tdƒn|dk r|j||||tdƒn|rÒ|dk rÒ|d} | |krÒtd|| f|ƒqÒndS(uß Validate an annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to be validated :param choices: an iterable of allowed option names or :const:`None` to skip this test :param exact_n_options: exact number of expected options or :const:`None` to skip this test :param min_n_options: minimum number of expected options or :const:`None` to skip this test :param max_n_options: maximum number of expected options or :const:`None` to skip this test uneedsutakes at leastu takes at mostiu$invalid "%s" annotation option: "%s"N(tlenRR-RRRR ( RRR$R%tchoicestexact_n_optionst min_n_optionst max_n_optionsR'toption((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_validate_annotationns         cC`s|j|||ddƒdS(um Validate the ``(allow-none)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options held by the annotation R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_allow_nones cC`s;t|ƒdkrdSx|jƒD]\}}|tkr¦yt|ƒWq3ttfk r¢|dkr…td||f|ƒq£td|||f|ƒq3Xq#|tkrê|dk r3|d kr3td|||f|ƒq3q#|t kr|dkr3td|f|ƒq3q#td ||f|ƒq#WdS( uh Validate the ``(array)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options held by the annotation iNu)"%s" annotation option "%s" needs a valueuBinvalid "%s" annotation option "%s" value "%s", must be an integeru0u1u>invalid "%s" annotation option "%s" value "%s", must be 0 or 1u-"%s" annotation option "length" needs a valueu$invalid "%s" annotation option: "%s"(u0u1( R.RtOPT_ARRAY_FIXED_SIZEtintt TypeErrort ValueErrorRR tOPT_ARRAY_ZERO_TERMINATEDtOPT_ARRAY_LENGTH(RRR$R%R3tvalue((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_arrayœs0            cC`sdS(ub Validate the ``(attributes)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate N((RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_attributesÂs cC`s|j|||ddƒdS(u_ Validate the ``(closure)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R2iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_closureÏs cC`s|j|||ddƒdS(uc Validate the ``(constructor)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_constructorÛs cC`s|j|||ddƒdS(u_ Validate the ``(destroy)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_destroyçs cC`s#|j|||ddddƒdS(u_ Validate the ``(element)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R1iR2iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_element_typeós cC`s|j|||ddƒdS(u_ Validate the ``(foreign)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_foreignÿs cC`s|j|||ddƒdS(ub Validate the ``(value-func)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_get_value_func s cC`s|j|||ddƒdS(uZ Validate the ``(in)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_ins cC`s|j|||ddƒdS(u^ Validate the ``(in-out)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_inout#s cC`s|j|||ddƒdS(u^ Validate the ``(method)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_method/s cC`s|j|||ddƒdS(uk Validate the ``(nullable)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options held by the annotation R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_nullable;s cC`s|j|||ddƒdS(uk Validate the ``(optional)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options held by the annotation R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_optionalGs cC`s#|j|||dddtƒdS(uf Validate the ``(not)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options held by the annotation R0iR/N(R4t NOT_OPTIONS(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_notSs cC`s#|j|||dddtƒdS(u[ Validate the ``(out)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R2iR/N(R4t OUT_OPTIONS(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_out`s cC`s|j|||ddƒdS(u` Validate the ``(ref-func)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_ref_funcms cC`s|j|||ddƒdS(ua Validate the ``(rename-to)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_rename_toys cC`s#|j|||dddtƒdS(u] Validate the ``(scope)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iR/N(R4t SCOPE_OPTIONS(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_scope…s cC`s|j|||ddƒdS(ub Validate the ``(value-func)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_set_value_func’s cC`s|j|||ddƒdS(u\ Validate the ``(skip)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_skipžs cC`s#|j|||dddtƒdS(u` Validate the ``(transfer)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iR/N(R4tTRANSFER_OPTIONS(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_transferªs cC`s|j|||ddƒdS(u\ Validate the ``(type)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_type·s cC`s|j|||ddƒdS(ub Validate the ``(unref-func)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_unref_funcÃs cC`s|j|||ddƒdS(u] Validate the ``(value)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_valueÏs cC`s|j|||ddƒdS(u_ Validate the ``(virtual)`` annotation. :param position: :class:`giscanner.message.Position` of the line in the source file containing the annotation to be validated :param ann_name: name of the annotation holding the options to validate :param options: annotation options to validate R0iN(R4(RRR$R%((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_virtualÛs (upositionu annotations(N(%RRRRRRRRR&R-R4R5R=R>R?R@RARBRCRDRERFRGRHRIRKRMRNRORQRRRSRURVRWRXRY(((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRsF  ! ! & tGtkDocParametercB`s_eZdZdZeeeeee e e e e eeeeeefZdd„Zd„ZRS(u. Represents a GTK-Doc parameter part. unameu descriptioncC`s&tj||ƒ||_d|_dS(N(RRtnameRt description(RR[R((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRós cC`sd|j|jfS(Nu(R[R(R((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRüs(unameu descriptionN(RRRRR#t ANN_ARRAYtANN_ATTRIBUTESt ANN_CLOSUREt ANN_DESTROYtANN_ELEMENT_TYPEtANN_INt ANN_INOUTtANN_OUTt ANN_SCOPEtANN_SKIPt ANN_TRANSFERtANN_TYPEt ANN_OPTIONALR"R RRRR(((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRZès t GtkDocTagc B`sMeZdZdZeeeeee e e e e f Zdd„Zd„ZRS(u( Represents a GTK-Doc tag part. unameuvalueu descriptioncC`s/tj||ƒ||_d|_d|_dS(N(RRR[RR<R\(RR[R((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR s  cC`sd|j|jfS(Nu(R[R(R((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRs(unameuvalueu descriptionN(RRRRR#R]R^RaRfRgRhR"RiR RRRR(((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRjs  tGtkDocCommentBlockcB`sªeZdZdZeeeeee e e e e eeeefZdd„Zd „Zd „Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„ZRS(u- Represents a GTK-Doc comment block. u code_beforeu code_afteru indentationunameuparamsu descriptionutagscC`sYtj||ƒd|_d|_g|_||_tƒ|_d|_ tƒ|_ dS(N( RRRt code_beforet code_aftert indentationR[R tparamsR\ttags(RR[R((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR's      cC`s||j|jƒS(N(R[(Rtothertop((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_compareBscC`s|j|tjƒS(N(RsR)R(RRq((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__lt__HscC`s|j|tjƒS(N(RsR)R(RRq((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__gt__KscC`s|j|tjƒS(N(RsR)tge(RRq((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__ge__NscC`s|j|tjƒS(N(RsR)tle(RRq((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__le__QscC`s|j|tjƒS(N(RsR)teq(RRq((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__eq__TscC`s|j|tjƒS(N(RsR)R(RRq((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__ne__WscC`s t|jƒS(N(thashR[(R((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__hash__ZscC`sd|j|jfS(Nu(R[R(R((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR]scC`sYtj|ƒx!|jjƒD]}|jƒqWx!|jjƒD]}|jƒqAWdS(uz Validate annotations applied to the :class:`GtkDocCommentBlock` identifier, parameters and tags. N(RR&RotvaluesRp(Rtparamttag((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR&`s  (u code_beforeu code_afteru indentationunameuparamsu descriptionutagsN(RRRRR^tANN_CONSTRUCTORt ANN_FOREIGNtANN_GET_VALUE_FUNCt ANN_METHODt ANN_REF_FUNCt ANN_RENAME_TOtANN_SET_VALUE_FUNCRfRgRhtANN_UNREF_FUNCt ANN_VALUEt ANN_VFUNCRRRRsRtRuRwRyR{R|R~RR&(((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRks"            uResultusuccessu annotationsuannotations_changedu start_posuend_postGtkDocCommentBlockParsercB`sneZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z e e d„Z e e e d „Z RS( uþ Parse GTK-Doc comment blocks into a parse tree built out of :class:`GtkDocCommentBlock`, :class:`GtkDocParameter`, :class:`GtkDocTag` and :class:`GtkDocAnnotations` objects. This parser tries to accept malformed input whenever possible and does not cause the process to exit on syntax errors. It does however emit: * warning messages at the slightest indication of recoverable malformed input and * error messages for unrecoverable malformed input whenever possible. Recoverable, in this context, means that we can serialize the :class:`GtkDocCommentBlock` instance using a :class:`GtkDocCommentBlockWriter` without information being lost. It is usually a good idea to heed these warning and error messages as malformed input can result in both: * invalid GTK-Doc output (HTML, pdf, ...) when the comment blocks are parsed with GTK-Doc's gtkdoc-mkdb * unexpected introspection behavior, for example missing parameters in the generated .gir and .typelib files .. NOTE:: :class:`GtkDocCommentBlockParser` functionality is based on gtkdoc-mkdb's `ScanSourceFile()`_ function. .. _ScanSourceFile(): http://git.gnome.org/browse/gtk-doc/tree/gtkdoc-mkdb.in#n3722 c C`sòi}xå|D]Ý\}}}y|j|||ƒ}Wn6tk rm}tdt|ƒt||ƒƒq nX|dk r |j|krÚ||j}tjj |j j ƒ} t d|j|j j | ƒf|j ƒn|||jt||ƒ} t d | d7| j dƒ|dƒ||dj| j)ƒ} | j d5ƒ| _?| j d6ƒ| _)qi |#t@kri tAj| j)ƒ} | j d5ƒjBƒ| _?| j d6ƒ| _)qi ql n| | j*|#<| }qXnt/j|ƒd7kr© |jCƒ}n|tt0gkrL| j)s|tkr|j| |||| j ƒ}.|.jr|.jDr|.j | _ qXqqn| j)d7kr3|| _)qX| j)d|7_)qXqX|t$t8gkrX|j)s¸|j(| ||||j ƒ}.|.jr¸|.jDr¸|.j |_ |.j)|_)qXq¸n|j)d7krÓ||_)qX|j)d|7_)qXqXqXW| ry| j)r| j)jƒ| _)nx$| j*jEƒD]} |jF| ƒq$Wx$| j,jEƒD]}/|jF|/ƒqKW| | _G| jHƒ| Sd7Sd7S(8u¼ Parse a single GTK-Doc comment block. :param comment: string representing the GTK-Doc comment block including it's start ("``/**``") and end ("``*/``") tokens. :param filename: source file name where the comment block originated from :param lineno: line number in the source file where the comment block starts :returns: a :class:`GtkDocCommentBlock` object or ``None`` uu iiu'Skipping invalid GTK-Doc comment block:ucodeucommentuGGTK-Doc comment block start token "/**" should not be preceded by code:uOGTK-Doc comment block start token "/**" should not be followed by comment text:iÿÿÿÿuDGTK-Doc comment block end token "*/" should not be followed by code:uLGTK-Doc comment block end token "*/" should not be preceded by comment text:u indentationuinvalid comment text:u u u SECTION:%su section_nameu%s:%su class_nameu property_nameu delimiterufieldsu%s::%su signal_nameu%su symbol_nameumissing ":" at column %s:u'identifier not found on the first line:uparameter_nameu,"@%s" parameter unexpected at this location:u;encountered multiple "Returns" parameters or tags for "%s".uVarargsu...u9"@%s" parameter is deprecated, please use "@..." instead:u.multiple "@%s" parameters for identifier "%s":utag_nameuvGObject-Introspection specific GTK-Doc tag "%s" has been deprecated, please use annotations on the identifier instead:u u-u%s %siu%s %s=%su,malformed "Attributes:" tag will be ignored:u attributesu3Duplicate "Attributes:" annotation will be ignored:u/GTK-Doc tag "Description:" has been deprecated:u %su&"%s:" tag unexpected at this location:u>encountered multiple return value parameters or tags for "%s".u(multiple "%s:" tags for identifier "%s":u(annotations not supported for tag "%s:".uvalueu descriptionN(IR tretsubt LINE_BREAK_REtsplitR.tCOMMENT_BLOCK_START_REtmatchR RtendtgroupR tstarttCOMMENT_BLOCK_END_REtFalsetINDENTATION_REtappendtCOMMENT_ASTERISK_RERt SECTION_REt PROPERTY_REt SIGNAL_REt SYMBOL_REtPART_IDENTIFIERRkRlRmt_parse_annotationstsuccesstend_poststripRtTruet PARAMETER_REtlowertPART_PARAMETERSt TAG_RETURNSR[Rjt _parse_fieldsR\RptendswithRotkeysRZt EMPTY_LINE_REtPART_DESCRIPTIONtTAG_REtDEPRECATED_GI_ANN_TAGStTAG_ATTRIBUTESt_parse_annotation_options_listt_parse_annotationtgettTAG_DESCRIPTIONt PART_TAGSt TAG_RETURNtTAG_RETURN_VALUEtTAG_RETURNS_VALUEtTAG_DEPRECATEDt TAG_SINCEtTAG_VALUE_VERSION_RER<t TAG_STABILITYtTAG_VALUE_STABILITY_REt capitalizetrstriptannotations_changedRt_clean_description_fieldRnR&(0RR—R“R˜RlRmtcomment_block_post comment_linestcomment_lines_lentresultRR™tidentifier_warnedt block_indentt line_indentt part_indenttin_partt current_partt returns_seentlinet original_linet column_offsettidentifier_nametidentifier_delimitertidentifier_fieldstidentifier_fields_starttrest marker_post param_nametparam_name_lowert param_fieldstparam_fields_startRt parameterttag_namettag_name_lowert tag_fieldsttag_fields_startR$t transformedt annotationt ann_optionsR't docannotationtstored_annotationR%trR€((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR·s”           !                            !                                                        cC`sz|jrv|jjƒdkr*d|_qvtj|jjddƒdƒra|jjƒ|_qv|jjƒ|_ndS(uª Remove extraneous leading and trailing whitespace from description fields. :param part: a GTK-Doc comment block part having a description field uu iiN(R\R³RR¼R¢R RÏ(Rtpart((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRјs   "cC`srg}|rn|jdƒ}|dkr\td|d|||ƒ|j||||ƒ}qn|jdƒ}n|S(u£ Parse annotation options into a list. For example:: ┌──────────────────────────────────────────────────────────────┠│ 'option1 option2 option3' │ ─▷ source ├──────────────────────────────────────────────────────────────┤ │ ['option1', 'option2', 'option3'] │ â—─ parsed options └──────────────────────────────────────────────────────────────┘ :param position: :class:`giscanner.message.Position` of `line` in the source file :param column: start column of the `options` in the source file :param line: complete source line :param options: annotation options to parse :returns: a list of annotation options u=iuMinvalid annotation options: expected a "list" but received "key=value pairs":u N(tfindR Rt!_parse_annotation_options_unknownR (RRtcolumnRÝR%tparsedRÕ((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRÁ¨s c C`sxtƒ}|rtxb|jdƒD]N}|jddƒ}|d}t|ƒdkr]|dnd} | ||u iiiu="%s" annotation has been deprecated, please use "%s" instead:u%s=%su3malformed "(attribute)" annotation will be ignored:N(NN(RtANN_LPARtANN_RPARR R¶R.Rt ANN_INOUT_ALTR Rct ANN_ATTRIBUTER^RÁR tLIST_ANNOTATIONStDICT_ANNOTATIONSRýR÷( RRRøRÝRðRûR$RñR'((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRÂøs>"            cC`s|r0|dkr!t|ƒ}q6|jƒ}ng}t}d} d} d} g} d} d}xbt|ƒD]T\} }|jƒ}|tkr | d7} | dkr°| } n| tkrìtd|d|| |ƒttddddƒS| dkr»| j |ƒq»n°|t kry| d8} | tkr]td|d|| |ƒttddddƒS| dkr™td|d|| |ƒttddddƒS| dkri| d}|t kr>|j ||| |dj | ƒjƒƒ\}}|dk r`||kr(td|f|d|| |ƒn|||eZdZed„Zd„Zd„Zd„Zd„ZRS(uU Serialized :class:`GtkDocCommentBlock` objects into GTK-Doc comment blocks. cC`s ||_dS(N(tindent(RR((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRÒscC`sâg}xÌ|jƒD]¾\}}|r½t|tƒrFdj|ƒ}n]d}xH|jƒD]:\}}|r‚|d||f7}qY|d|f7}qYW|jƒ}|jd||fƒq|jd|fƒqWdj|ƒS(uA Serialize an annotation field. For example:: ┌──────────────────────────────────────────────────────────────┠│ {'name': {'opt1': 'value1', 'opt2':'value2', 'opt3':None} │ â—─ GtkDocAnnotations ├──────────────────────────────────────────────────────────────┤ │ '(name opt1=value1 opt2=value2 opt3)' │ ─▷ serialized └──────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────┠│ {'name': ['opt1', 'opt2']} │ â—─ GtkDocAnnotations ├──────────────────────────────────────────────────────────────┤ │ '(name opt1 opt2)' │ ─▷ serialized └──────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────┠│ {'unkownname': ['unknown list of options']} │ â—─ GtkDocAnnotations ├──────────────────────────────────────────────────────────────┤ │ '(unkownname unknown list of options)' │ ─▷ serialized └──────────────────────────────────────────────────────────────┘ :param annotations: :class:`GtkDocAnnotations` to be serialized :returns: a string u uu%s=%s u%s u(%s %s)u(%s)(Rt isinstancetlistRR³R©(RRt serializedR$R%tserialize_optionsRüR<((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_serialize_annotations×s cC`sd|jf}|jr6|d|j|jƒ7}n|jry|jjdƒre|d|j7}qƒ|d|j7}n |d7}|jdƒS(uˆ Serialize a parameter. :param parameter: :class:`GtkDocParameter` to be serialized :returns: a string u@%su: u u:(R[RRR\RR (RRêR((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_serialize_parameters    cC`sÃ|jjƒ}|jr5|d|j|jƒ7}n|jrR|d|j7}n|jr•|jjdƒr|d|j7}q•|d|j7}n|j r¶|j r¶|d7}n|jdƒS(uv Serialize a tag. :param tag: :class:`GtkDocTag` to be serialized :returns: a string u: u u:(R[RÎRRR<R\RR (RRR((sz/home/vagrant/ruby-gnome2.win32/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_serialize_tag"s     c C`sœ|dkrdSg}|jjdƒr;|j|jƒnO|jrs|j|jƒ}|jd|j|fƒn|jd|jfƒx-|jjƒD]}|j|j |ƒƒqšW|j rý|jdƒx*|j j dƒD]}|j|ƒqãWn|j rF|jdƒx0|j jƒD]}|j|j |ƒƒq#Wn|jrªt|jƒjdƒddprd}|jd ƒr—|}|d} q¶|d }|} n d}d} d} xX| t|ƒkr|| } | rød | | f|| ksˆ           %             ÿÔU ÿÿÿY