vlm / asn1c

The ASN.1 Compiler
http://lionet.info/asn1c/
BSD 2-Clause "Simplified" License
1.05k stars 559 forks source link

syntex error in asn file #112

Open sandipukani opened 8 years ago

sandipukani commented 8 years ago

I have wrote one sample .asn file, while completion it giving error.

ASN source like below,

RSI DEFINITIONS AUTOMATIC TAGS ::= BEGIN

MessageFrame ::= SEQUENCE { messageId MESSAGE-ID-AND-TYPE.&id({MessageTypes}), value MESSAGE-ID-AND-TYPE.&Type({MessageTypes}{@.messageId}) }

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

MessageTypes MESSAGE-ID-AND-TYPE ::= { { Message1 IDENTIFIED BY message1 } | { Message2 IDENTIFIED BY message2 } }

Message1 ::= SEQUENCE { msgCnt MsgCount, id TemporaryID }

Message2 ::= SEQUENCE { msgCnt MsgCount, id TemporaryID }

TemporaryID ::= OCTET STRING (SIZE(4)) MsgCount ::= INTEGER (0..127) RSImsgID ::= INTEGER (0..32767) message1 RSImsgID ::= 0 --'00'H message2 RSImsgID ::= 1 --'01'H

END

Kindly help me what I am missing in that.

velichkov commented 8 years ago

The problem most probably is that the asn1c does not fully support Information Object Class. You could try the version from #99. See also #108 #43 #64

brchiu commented 7 years ago

hi, @sandipukani

In newest repository acdca4184712a92b9318f3d0fbf9d70e581361aa , your ASN.1 excerpt can be parsed and C code generated. You can have a trial.

Thank you.