<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:53:33 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[YANGTOOLS-544] YangSyntaxErrorException depending of the restictions/extensions order for the String type</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-544</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;module extension-def {&lt;br/&gt;
    namespace &quot;urn:simple.extension.typedefs&quot;;&lt;br/&gt;
    prefix &quot;ext&quot;;&lt;/p&gt;

&lt;p&gt;    extension unknown &lt;/p&gt;
{
        argument &quot;ext-arg&quot;;
        description &quot;Extension with single argument definition.&quot;;
    }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;module types {&lt;br/&gt;
    namespace &quot;urn:custom.types.demo&quot;;&lt;br/&gt;
    prefix &quot;types&quot;;&lt;/p&gt;

&lt;p&gt;    import extension-def &lt;/p&gt;
{ prefix &quot;ext&quot;; }

&lt;p&gt;    leaf leaf-length-unknown-pattern {&lt;br/&gt;
        type string &lt;/p&gt;
{
            length &quot;2..10&quot;;
            ext:unknown &quot;unknown&quot;;
            pattern &quot;[0-9a-fA-F]&quot;;
        }
&lt;p&gt;    }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;The given example results in &quot;YangSyntaxErrorException: mismatched input &apos;pattern&apos; expecting &lt;/p&gt;
{&apos;}
&lt;p&gt;&apos;&quot; because of the type string restriction order.&lt;/p&gt;


&lt;p&gt;type string {&lt;br/&gt;
   length &quot;2..10&quot;; &amp;lt;--- String restriction&lt;br/&gt;
   ext:unknown &quot;unknown&quot;; &amp;lt;--- extension&lt;br/&gt;
   pattern &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;0-9a-fA-F&amp;#93;&lt;/span&gt;&quot;; &amp;lt;--- String restriction&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;According to the YangParser.g4&lt;/p&gt;

&lt;p&gt;type body for string type:&lt;br/&gt;
type_body_stmts: (identifier_stmt)* (string_restriction) (identifier_stmt)*;&lt;br/&gt;
string_restrictions : (length_stmt |pattern_stmt)*;&lt;/p&gt;

&lt;p&gt;Recomended solution:&lt;/p&gt;

&lt;p&gt;string_restrictions : (length_stmt | identifier_stmt | pattern_stmt)*;&lt;/p&gt;

&lt;p&gt;It will allow any order of restrictions and extensions.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="22964">YANGTOOLS-544</key>
            <summary>YangSyntaxErrorException depending of the restictions/extensions order for the String type</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="icaro.damiani@datacom.ind.br">&#205;caro Franco Damiani</assignee>
                                    <reporter username="icaro.damiani@datacom.ind.br">&#205;caro Franco Damiani</reporter>
                        <labels>
                    </labels>
                <created>Wed, 11 Nov 2015 13:07:52 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:41 +0000</updated>
                            <resolved>Tue, 8 Dec 2015 09:09:42 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="43639" author="icaro.damiani@datacom.ind.br" created="Thu, 19 Nov 2015 18:37:27 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/29930/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/29930/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="43640" author="martin.ciglan" created="Fri, 20 Nov 2015 10:02:39 +0000"  >&lt;p&gt;just to add, this needs to be cherry-picked to stable/lithium branch in order to apply it in old parser.&lt;/p&gt;

&lt;p&gt;Beryllium master uses new statement parser with different grammar.&lt;/p&gt;</comment>
                            <comment id="43641" author="icaro.damiani@datacom.ind.br" created="Fri, 20 Nov 2015 12:17:06 +0000"  >&lt;p&gt;Done.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/29984/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/29984/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Should I abandon the old one?&lt;/p&gt;</comment>
                            <comment id="43642" author="martin.ciglan" created="Mon, 23 Nov 2015 08:55:04 +0000"  >&lt;p&gt;Old YANG parser code is present in Beryllium master code base, so you can keep it. Thank you.&lt;/p&gt;</comment>
                            <comment id="43643" author="tony.tkacik@gmail.com" created="Tue, 1 Dec 2015 15:19:52 +0000"  >&lt;p&gt;Merged into master, still waiting for unfreezing stable/lithium branch&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4623</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=4623]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i027vr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>