Skip to content

Objects set members are not parsed at all #154

@hodossy

Description

@hodossy

I have a structure similar to the following in a file test.asn, whihc I parse with parse_files('test.asn'):

DATA-Descriptions DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

DATA-ID-AND-TYPE ::= CLASS {
  &id DataId UNIQUE,
  &Type
} WITH SYNTAX {&Type IDENTIFIED BY &id}

DataId ::= INTEGER (0..255)

Data DATA-ID-AND-TYPE ::= {
    {ADataType IDENTIFIED BY aDataId} |
    {BDataType IDENTIFIED BY bDataId},
    ...
}

aDataId DataId ::= 1
bDataId DataId ::= 2

END

The outcome of the parsing is the following:

{
  "DATA-Descriptions": {
    "imports": {},
    "types": {
      "DataId": {
        "type": "INTEGER",
        "restricted-to": [(0, 255)]
      }
    },
    "values": {
      "aDataId": {
        "type": "DataId",
        "value": 1
      },
      "bDataId": {
        "type": "DataId",
        "value": 2
      }
    },
    "object-classes": {
      "DATA-ID-AND-TYPE": {
        "members": [{
          "type": "DataId",
          "name": "&id"
        }, {
          "type": "OpenType",
          "name": "&Type"
        }]
      }
    },
    "object-sets": {
      "Data": {
        "class": "DATA-ID-AND-TYPE",
        "members": []
      }
    },
    "extensibility-implied": False,
    "tags": "AUTOMATIC"
  }
}

The members of the Data object set is an empty array, but there should be two members. I think this is partially related to the CLASS keyword, and its support is in the known limitations list, but that is parsed correctly. Are object sets supported? Is this due to the fact, that the objects are a CLASS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions