[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.1 ASN.1 syntax
The parser is case sensitive. The comments begin with "– " and end at the end of lines. An example is in "pkix.asn" file. ASN.1 definitions must have this syntax:
definitions_name {<object definition>} DEFINITIONS <EXPLICIT or IMPLICIT> TAGS ::= BEGIN <type and constants definitions> END
The token "::=" must be separate from others elements, so this is a wrong declaration:
;; INCORRECT Version ::=INTEGER |
the correct form is:
Version ::= INTEGER |
Here is the list of types that the parser can manage:
- INTEGER
- ENUMERATED
- BOOLEAN
- OBJECT IDENTIFIER
- NULL
- BIT STRING
- OCTET STRING
- UTCTime
- GeneralizedTime
- GeneralString
- SEQUENCE
- SEQUENCE OF
- SET
- SET OF
- CHOICE
- ANY
- ANY DEFINED BY
This version doesn't manage REAL type. It doesn't allow the "EXPORT" and "IMPORT" sections too.
The SIZE constraints are allowed, but no check is done on them.