ó ¿×:Uc@@s½dZddlmZddlZddlZddlmZddlmZm Z m Z ddlm Z m Z ddl mZmZmZdZdZd Zd Zd Zd Zd ZdZeeeegZdZdZeegZdZdZeegZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)e e!e"e#e$e%e&e'e(e)g Z*eeee*Z+dZ,dZ-dZ.d Z/dZ0d!Z1d"Z2d#Z3d$Z4d%Z5d&Z6d'Z7d(Z8d)Z9d*Z:d+Z;d,Z<d-Z=d.Z>d/Z?d0Z@d1ZAdZBdZCd2ZDdZEdZFe.e:e;e/e0e1e2e3e4e5e6e7e8e9e<e=e>e?e@eAeBeCeDeEeFgZGd3ZHd4ZIeHeIgZJeGeJZKe/e0gZLgeKD]ZMeMeLkr°eM^q˜ZNd5ZOd6ZPd7ZQeOePeQgZRd8ZSd9ZTeSeTgZUd:ZVd;ZWd<ZXeVeWeXgZYd=ZZd>Z[d?Z\d@Z]eZe[e\e]gZ^ej_dAej`ƒZaej_dBej`ejbBƒZcej_dCej`ejbBƒZdej_dDej`ejbBƒZeej_dEej`ejbBƒZfej_dFej`ejbBƒZgej_dGej`ejbBƒZhej_dHej`ejbBƒZiej_dIej`ejbBƒZjej_dJej`ejbBƒZkej_dKej`ejbBƒZldLjme+ƒjndMdNƒZoej_dOeodPej`ejbBejpBƒZqej_dQej`ejbBƒZrej_dRej`ejbBejpBƒZsdSe fdT„ƒYZtdUeufdV„ƒYZvdWevfdX„ƒYZwdYevfdZ„ƒYZxd[evfd\„ƒYZyed]d^d_d`dagƒZzed]d^d_dgƒZ{dbeufdc„ƒYZ|ddeufde„ƒYZ}dS(fsp 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 #. Zero or more `parameter` parts, each consisting of: * a required `parameter_name` field * an optional `annotations` field * 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 * 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 #. 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_importN(t namedtuple(tnetgttlti(tCountert OrderedDict(tPositiontwarnterroriit deprecatedtreturnstsincet stabilityt descriptions return valuetreturns returns valuet attributessget value funcsref funcs rename tosset value functtransferttypes unref functvaluetvirtualt(t)s allow-nonetarraytclosuret constructortdestroys element-typetforeignsget-value-functintinouttmethodtnullabletoptionaltoutsref-funcs rename-totscopesset-value-functskips unref-funct attributesin-outs fixed-sizetlengthszero-terminatedscallee-allocatesscaller-allocatestasynctcalltnotifiedt containertfloatingtfulltnones \r\n|\r|\nsV ^ # 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 sû ^ # 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 s  ^ # 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 ss ^ (?P\s*) # 0 or more whitespace characters .* $ sà ^ # start \s* # 0 or more whitespace characters $ # end s0 ^ # 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 $ sz ^ # 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 sÄ ^ # 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 sà ^ # 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 s' ^ # 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 t|t s\ss® ^ # start \s* # 0 or more whitespace characters (?Ps) # 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 s¾ ^ # 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 s¾ ^ # 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 eZdZdZdd„ZRS(só 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`. tpositioncC@stj|ƒ||_dS(N(Rt__init__R0(tselfR0((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR1þs N(t__name__t __module__t__doc__t __slots__tNoneR1(((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR/õstGtkDocAnnotatablecB@s7eZdZd!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#RS($sK Base class for GTK-Doc comment block parts that can be annotated. R0t annotationscC@s||_tƒ|_dS(N(R0R/R9(R2R0((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR1s cC@sd|jfS(Ns(R9(R2((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__repr__scC@s´|jr°|jj}x˜|jjƒD]„\}}||jkrrt|d|jddƒƒ}||||ƒq%|tkr•td|f|ƒq%td|f|ƒq%WndS(sa Validate annotations stored by the :class:`GtkDocAnnotatable` instance, if any. t _do_validate_t-t_sunexpected annotation: %ssunknown annotation: %sN(R9R0titemstvalid_annotationstgetattrtreplacetALL_ANNOTATIONSR(R2R0tann_nametoptionstvalidate((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyREs   c C@sŒ|dkrd}n d|f}|dkr7d}n"|dkrLd}n d|f}|||ƒrˆtd||||f|ƒnd S( s, 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. iR,s%ds no optionsis one options %d optionss"%s" annotation %s %s, %s givenN(R( R2R0RCt n_optionstexpected_n_optionstoperatortmessagettts((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_validate_options3s        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(sß 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 tneedsstakes at leasts takes at mostis$invalid "%s" annotation option: "%s"N(tlenR7RLRRRR( R2R0RCRDtchoicestexact_n_optionst min_n_optionst max_n_optionsRFtoption((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_validate_annotationSs         cC@s|j|||ddƒdS(sm 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_allow_noneus cC@sýt|ƒdkrdSxà|jƒD]Ò\}}|ttgkr¬yt|ƒWqõttfk r¨|dkr‹td||f|ƒq©td|||f|ƒqõXq#|t krÞ|dkrõtd|f|ƒqõq#td||f|ƒq#WdS(sh 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 iNs)"%s" annotation option "%s" needs a valuesBinvalid "%s" annotation option "%s" value "%s", must be an integers-"%s" annotation option "length" needs a values$invalid "%s" annotation option: "%s"( RNR>tOPT_ARRAY_ZERO_TERMINATEDtOPT_ARRAY_FIXED_SIZEtintt TypeErrort ValueErrorR7RtOPT_ARRAY_LENGTH(R2R0RCRDRSR((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_arrays&        cC@sdS(sb 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((R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_attributes¢s cC@s|j|||ddƒdS(s_ 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 RRiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_closure¯s cC@s|j|||ddƒdS(sc 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_constructor»s cC@s|j|||ddƒdS(s_ 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_destroyÇs cC@s#|j|||ddddƒdS(s_ 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 RQiRRiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_element_typeÓs cC@s|j|||ddƒdS(s_ 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_foreignßs cC@s|j|||ddƒdS(sb 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_get_value_funcës cC@s|j|||ddƒdS(sZ 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_in÷s cC@s|j|||ddƒdS(s^ 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_inouts cC@s|j|||ddƒdS(s^ 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_methods cC@s|j|||ddƒdS(sk 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_nullables cC@s|j|||ddƒdS(sk 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_optional's cC@s#|j|||dddtƒdS(s[ 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 RRiRON(RTt OUT_OPTIONS(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_out3s cC@s|j|||ddƒdS(s` 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_ref_func@s cC@s|j|||ddƒdS(sa 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_rename_toLs cC@s#|j|||dddtƒdS(s] 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 RPiRON(RTt SCOPE_OPTIONS(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_scopeXs cC@s|j|||ddƒdS(sb 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_set_value_funces cC@s|j|||ddƒdS(s\ 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_skipqs cC@s#|j|||dddtƒdS(s` 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 RPiRON(RTtTRANSFER_OPTIONS(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_transfer}s cC@s|j|||ddƒdS(s\ 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_typeŠs cC@s|j|||ddƒdS(sb 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_unref_func–s cC@s|j|||ddƒdS(s] 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_value¢s cC@s|j|||ddƒdS(s_ 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 RPiN(RT(R2R0RCRD((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_do_validate_virtual®s (spositions annotations(N($R3R4R5R6R?R7R1R:RERLRTRUR\R]R^R_R`RaRbRcRdReRfRgRhRjRkRlRnRoRpRrRsRtRuRv(((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR8sD   ! ! tGtkDocParametercB@s\eZdZdZeeeeee e e e e eeeeefZdd„Zd„ZRS(s. Represents a GTK-Doc parameter part. tnameRcC@s&tj||ƒ||_d|_dS(N(R8R1RxR7R(R2RxR0((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR1Æs cC@sd|j|jfS(Ns(RxR9(R2((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR:Ïs(snames descriptionN(R3R4R5R6tANN_ALLOW_NONEt ANN_ARRAYtANN_ATTRIBUTESt ANN_CLOSUREt ANN_DESTROYtANN_ELEMENT_TYPEtANN_INt ANN_INOUTtANN_OUTt ANN_SCOPEtANN_SKIPt ANN_TRANSFERtANN_TYPEt ANN_OPTIONALt ANN_NULLABLER?R7R1R:(((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRw»s t GtkDocTagc B@sJeZdZdZeeeeee e e e f Z dd„Zd„ZRS(s( Represents a GTK-Doc tag part. RxRRcC@s/tj||ƒ||_d|_d|_dS(N(R8R1RxR7RR(R2RxR0((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR1Ýs  cC@sd|j|jfS(Ns(RxR9(R2((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR:és(snamesvalues descriptionN(R3R4R5R6RyRzR{R~RƒR„R…R‡R†R?R7R1R:(((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRˆÓs  tGtkDocCommentBlockcB@skeZdZd Zeeeeee e e e e eeeefZd d„Zd „Zd „Zd „ZRS(s- Represents a GTK-Doc comment block. t code_beforet code_aftert indentationRxtparamsRttagscC@sYtj||ƒd|_d|_g|_||_tƒ|_d|_ tƒ|_ dS(N( R8R1R7RŠR‹RŒRxRRRRŽ(R2RxR0((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR1ús      cC@st|j|jƒS(N(tcmpRx(R2tother((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt__cmp__scC@sd|j|jfS(Ns(RxR9(R2((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR:scC@sYtj|ƒx!|jjƒD]}|jƒqWx!|jjƒD]}|jƒqAWdS(sz Validate annotations applied to the :class:`GtkDocCommentBlock` identifier, parameters and tags. N(R8RERtvaluesRŽ(R2tparamttag((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyREs  (s code_befores code_afters indentationsnamesparamss descriptionstagsN(R3R4R5R6R{tANN_CONSTRUCTORt ANN_FOREIGNtANN_GET_VALUE_FUNCt ANN_METHODt ANN_REF_FUNCt ANN_RENAME_TOtANN_SET_VALUE_FUNCRƒR„R…tANN_UNREF_FUNCt ANN_VALUEt ANN_VFUNCR?R7R1R‘R:RE(((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR‰ís     tResulttsuccessR9t start_postend_postGtkDocCommentBlockParsercB@sqeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z e d „Z e e d „Z RS( s» 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 heavily based on gtkdoc-mkdb's `ScanSourceFile()`_ function and is currently in sync with GTK-Doc commit `47abcd5`_. .. _ScanSourceFile(): http://git.gnome.org/browse/gtk-doc/tree/gtkdoc-mkdb.in#n3722 .. _47abcd5: https://git.gnome.org/browse/gtk-doc/commit/?id=47abcd53b8489ebceec9e394676512a181c1f1f6 c C@sæi}xÙ|D]Ñ\}}}y|j|||ƒ}Wn*tk ratdt||ƒƒq nX|dk r |j|krÎ||j}tjj|j j ƒ}t d|j|j j |ƒf|j ƒn|||jj| j)ƒ} | j d6ƒ|!_?| j d7ƒ|!_)qÛ |$t@krÛ tAj| j)ƒ} | j d6ƒjBƒ|!_?| j d7ƒ|!_)qÛ qÞ n|!| j*|$<|!}q£nt/j|ƒd8kr|jCƒ}n|tt0gkr’| j)s^|tkr^|jD|||| ƒq^n| j)d8kry|| _)q£| j)d|7_)q£q£|t$t8gkr£|j)sÆ|jD|||| ƒn|j)d8krá||_)q£|j)d|7_)q£q£q£W| r‡| j)r"| j)jƒ| _)nx$| j*jEƒD]}!|jF|!ƒq2Wx$| j,jEƒD]}/|jF|/ƒqYW|| _G| jHƒ| Sd8Sd8S(9s¼ 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`` ts iiR.tcodet^s-Skipping invalid GTK-Doc comment block: %s %sR­sMGTK-Doc comment block start token "/**" should not be preceded by code: %s %ssUGTK-Doc comment block start token "/**" should not be followed by comment text: %s %siÿÿÿÿsJGTK-Doc comment block end token "*/" should not be followed by code: %s %ssRGTK-Doc comment block end token "*/" should not be preceded by comment text: %s %sRŒsinvalid comment text: %s %ss s s SECTION:%st section_names%s:%st class_namet property_namet delimitertfieldss%s::%st signal_names%st symbol_namesmissing ":" at column %s: %s %ss-identifier not found on the first line: %s %stparameter_names2"@%s" parameter unexpected at this location: %s %ss;encountered multiple "Returns" parameters or tags for "%s".tVarargss...s?"@%s" parameter is deprecated, please use "@..." instead: %s %ss4multiple "@%s" parameters for identifier "%s": %s %sttag_names|GObject-Introspection specific GTK-Doc tag "%s" has been deprecated, please use annotations on the identifier instead: %s %sR<s%s %sis%s %s=%ss2malformed "Attributes:" tag will be ignored: %s %sRs9Duplicate "Attributes:" annotation will be ignored: %s %ss5GTK-Doc tag "Description:" has been deprecated: %s %ss %ss,"%s:" tag unexpected at this location: %s %ss>encountered multiple return value parameters or tags for "%s".s.multiple "%s:" tags for identifier "%s": %s %ss(annotations not supported for tag "%s:".RRN(IRtretsubt LINE_BREAK_REtsplitRNtCOMMENT_BLOCK_START_REtmatchtendR R7tgroupRtstarttCOMMENT_BLOCK_END_REtFalsetINDENTATION_REtappendtCOMMENT_ASTERISK_RERAt SECTION_REt PROPERTY_REt SIGNAL_REt SYMBOL_REtPART_IDENTIFIERR‰RŠR‹t_parse_annotationsR R¢tstripR9tTruet PARAMETER_REtlowertPART_PARAMETERSt TAG_RETURNSRxRˆt _parse_fieldsRRŽtendswithRtkeysRwt 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_RERt TAG_STABILITYtTAG_VALUE_STABILITY_REt capitalizetrstript+_validate_multiline_annotation_continuationR’t_clean_description_fieldRŒRE(0R2R­R©R®RŠR‹tcomment_block_post comment_linestcomment_lines_lentresultR0tmarkerR¯tidentifier_warnedt block_indentt line_indentt part_indenttin_partt current_partt returns_seentlinet original_linet column_offsettidentifier_nametidentifier_delimitertidentifier_fieldstidentifier_fields_starttrestmarker_positiont param_nametparam_name_lowert param_fieldstparam_fields_startR”t parameterR¾ttag_name_lowert tag_fieldsttag_fields_startRCt transformedt annotationt ann_optionsRFt docannotationtstored_annotationRDR“((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR¤usª             !                                !                                                          cC@sz|jrv|jjƒdkr*d|_qvtj|jjddƒdƒra|jjƒ|_qv|jjƒ|_ndS(sª Remove extraneous leading and trailing whitespace from description fields. :param part: a GTK-Doc comment block part having a description field R²s iiN(RRÓR7RÜRÄRÂRï(R2tpart((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRñ\s   "cC@s]|j||||ƒ}|jrY|jrYd|j|d}td||f|ƒndS(s0 Validate annotatable parts' source text ensuring annotations don't span multiple lines. For example, the following comment block would result in a warning being emitted for the forth line:: /** * shiny_function: * @array_: (out caller-allocates) (array) * (element-type utf8) (transfer full): A beautiful array */ :param line: line to validate, stripped from ("``*/``") at start of the line. :param original_line: original line (including ("``*/``")) being validated :param column_offset: number of characters stripped from `line` when ("``*/``") was removed :param position: :class:`giscanner.message.Position` of `line` in the source file R.R´s9ignoring invalid multiline annotation continuation: %s %sN(RÒR R9R¡R (R2RþRÿRR0RõRö((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRðls  cC@sg}|r}|jdƒ}|dkrkd||d}td||f|ƒ|j||||ƒ}q}|jdƒ}n|S(s£ 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 t=iR.R´sSinvalid annotation options: expected a "list" but received "key=value pairs": %s %s(tfindRt!_parse_annotation_options_unknownRÂ(R2R0tcolumnRþRDtparsedRõRö((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRáˆs  c C@sxtƒ}|rtxb|jdƒD]N}|jddƒ}|d}t|ƒdkr]|dnd} | ||R.iiiR´sC"%s" annotation has been deprecated, please use "%s" instead: %s %ss%s=%ss9malformed "(attribute)" annotation will be ignored: %s %sN(NN(RAtANN_LPARtANN_RPARRÂRÖRNR7t ANN_INOUT_ALTRR€t ANN_ATTRIBUTER{RáR tLIST_ANNOTATIONStDICT_ANNOTATIONSRR( R2R0RRþRRRCRRöRF((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyRâÙsF"           cC@s&|rt|ƒ}ng}d}d}d} g} d} d} x…t|ƒD]w\}} | jƒ}| tkrö|d7}|dkr|} n| tkr×d||d}td||f|ƒttd d d ƒS|dkr½| j| ƒq½nÇ| t kr{|d8}| tkrTd||d}td||f|ƒttd d d ƒS|dkrœd||d}td||f|ƒttd d d ƒS|dkrk|d} |t krF|j ||| |dj | ƒj ƒƒ\}}|d k rb||kr6d||d}td|||f|ƒn|||eZdZed„Zd„Zd„Zd„Zd„ZRS(sU Serialized :class:`GtkDocCommentBlock` objects into GTK-Doc comment blocks. cC@s ||_dS(N(tindent(R2R8((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR1¶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(sA 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 R.R²s%s=%s s%s s(%s %s)s(%s)(R>t isinstancetlistR)RÓRË(R2R9t serializedRCRDtserialize_optionsRR((sz/home/vagrant/ruby-gnome2.win64/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(sˆ Serialize a parameter. :param parameter: :class:`GtkDocParameter` to be serialized :returns: a string s@%ss: s R2(RxR9R=RR3RÂ(R2R R;((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_serialize_parameterìs    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(sv Serialize a tag. :param tag: :class:`GtkDocTag` to be serialized :returns: a string s: s R2(RxRîR9R=RRR3RÂ(R2R”R;((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyt_serialize_tags     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|| RRÂRŽR?R8RRŒt most_commonRÚRNtinsertRŠR‹R)( R2tblocktlinesR9R“tlR”R8t start_indentRùR,Rþ((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pytwrite%sT       &      ( R3R4R5RÔR1R=R>R?RH(((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyR7±s   1  (~R5t __future__RR¦R¿t collectionsRRHRRRRRRIRRR RÑR×RÝRåRéRØRêRìt GTKDOC_TAGSRäRçtDEPRECATED_GTKDOC_TAGSRæRètDEPRECATED_GI_TAGSRàtTAG_GET_VALUE_FUNCt TAG_REF_FUNCt TAG_RENAME_TOtTAG_SET_VALUE_FUNCt TAG_TRANSFERtTAG_TYPEtTAG_UNREF_FUNCt TAG_VALUEt TAG_VFUNCRßtALL_TAGSR R!RyRzR{R|R•R}R~R–R—RR€R˜R‡R†RR™RšR‚R›RƒR„R…RœRžRtGI_ANNSR#R"tDEPRECATED_GI_ANNSRBR%tannR$RWR[RVt ARRAY_OPTIONStOPT_OUT_CALLEE_ALLOCATEStOPT_OUT_CALLER_ALLOCATESRitOPT_SCOPE_ASYNCtOPT_SCOPE_CALLtOPT_SCOPE_NOTIFIEDRmtOPT_TRANSFER_CONTAINERtOPT_TRANSFER_FLOATINGtOPT_TRANSFER_FULLtOPT_TRANSFER_NONERqtcompiletUNICODERÁtVERBOSERÃRÈRÌRÊRÜRÍRÐRÎRÏRÕR)RAt _all_tagst IGNORECASERÞRëRíR/tobjectR8RwRˆR‰R(R4R£R7(((sz/home/vagrant/ruby-gnome2.win64/gobject-introspection/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pytjst          %            ÿ¶@ÿÿÿ