<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi,</span><div style="font-family:arial,sans-serif;font-size:13px">I've encountered what I think is a bug in parsing asn1. Here is a testcase:</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>Testcase DEFINITIONS IMPLICIT TAGS ::=</div><div><br></div><div>BEGIN</div><div><br></div><div>

<span style="white-space:pre-wrap">     </span>BaseType ::= ENUMERATED {</div><div><span style="white-space:pre-wrap">                </span>foo,</div><div><span style="white-space:pre-wrap">             </span>bar,</div><div><span style="white-space:pre-wrap">             </span>buz,</div>

<div><span style="white-space:pre-wrap">          </span>qux,</div><div><span style="white-space:pre-wrap">             </span>...</div><div><span style="white-space:pre-wrap">      </span>}</div><div><span style="white-space:pre-wrap">                </span></div>

<div><span style="white-space:pre-wrap">  </span>SubType ::= BaseType ( foo | bar )</div><div><br></div><div>END</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

This gives the following error:</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>28> asn1ct:compile("Testcase", [ber,verbose]). </div>

<div>Erlang ASN.1 version "2.0.4", compiling "Testcase.asn"</div><div>Compiler Options: [ber,verbose,{i,"."}]</div><div>asn1error:13:'Testcase':'SubType'</div><div>{asn1,{undefined_type,bar}}</div>

<div>{error,[{error,{type,13,'Testcase','SubType',</div><div>                     {asn1,{undefined_type,bar}}}}]}</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

If I remove the extension marker in BaseType, it compiles fine.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">This is using R16B03 on Windows</div>

</div>