Egon,

Egon Andersen wrote:
> Steven Legg wrote:
> > In trying to tie up some loose ends in my ASN.1 compiler
> implementation
> > I've come across some situations where the interplay between
> > parameterization
> > and ambiguity in the notation becomes problematic. The
> ASN.1 specifications
> > don't provide sufficient detail for me to determine how to
> resolve the
> > problems.
> >
> [snip]
>
> I believe all your problems boils down to and is solved by:
>
> 18.11 Within an instance of value notation for an integer type with a
> "NamedNumberList", any occurrence of a name
> that is both an "identifier" from the "NamedNumberList" and a
> reference
> name shall be interpreted as the "identifier".
>
> 19.10 Within an instance of value notation for an enumerated type, any
> occurrence of a name that is both an
> "identifier" from the "Enumeration" and a reference name shall be
> interpreted as the "identifier".

The key point is that without the TYPE parameter being instantiated it
is not possible to decide whether the foobar after the DEFAULT is both a
reference and an identifier (from a NamedNumberList or an Enumeration,
in which case we will assume it is an identifier), or just a reference.
So whether foobar is ultimately an identifier or a reference depends
on the actual parameter for TYPE in any reference of Foobar.

For convenience, here's that type definition again.

        Foobar { TYPE, TYPE:foobar } ::= SEQUENCE {
                field1  TYPE DEFAULT foobar,
                field2  INTEGER { first (foobar) }
        }

In general, if I don't know whether a name is a DummyReference then I can't
make definitive judgements about questions like "is the DummyReference
employed at least once within its scope ?" and "is the usage of the
DummyReference consistent with its syntactic form ?" just by looking at
the parameterized definition in isolation. I can only answer those questions
during the process of actually expanding out specific parameterized
references
(and the answers can be different depending on the actual parameters).
So I suppose my question is: is ASN.1 parameterization meant to be this way
?

Regards,
Steven

Reply via email to