help-libtasn1
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Circular definitions


From: Nikos Mavrogiannopoulos
Subject: Re: Circular definitions
Date: Mon, 25 Feb 2013 21:42:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

On 02/25/2013 02:06 PM, Yaroslav Gaydash wrote:

> Hello everybody,
> 
> Here's piece of MMS (ISO-9506) definition module.
> 
> Data ::= CHOICE {
>     array     [1] IMPLICIT SEQUENCE OF Data,
>     structure [2] IMPLICIT SEQUENCE OF Data,
>    ...
> } 
> 
> Another sample module is attached which shows TypeSpecification and 
> TypeDescription mutual use.
> So asn1_create_element() call is never return.


Hello,
 That's interesting. What does this structure mean actually? How are you
expected to parse it?

You can always use something like IMPLICIT SEQUENCE OF ANY, and then
read the raw der data from there and parse it as Data. However, that
structure definition looks like a test for a parser rather than a useful
structure.

> Is there a way to handle such circular or mutual use definitions?


As it is now probably not (without using the ANY trick). I don't know
how hard would it be to modify the library to understand and correctly
handle that syntax.

regards,
Nikos



reply via email to

[Prev in Thread] Current Thread [Next in Thread]