ASN.1 BITSTRING subtyping false error
Submitted by Gyorgy Rethy
Link to original bug (#521417)
Description
Created attachment 269978 IEEE ASN.1 modules
ETSI is changing ITS security definitions to ASN.1, this problem come up during this work.
In module IEEE1609dot2 line 287, a BITSTRING is subtyped, disallowing using an empty named bit list for its instances. This is a legal notation, which is misinterpreted by Titan.
Titan issues the error messages to this line:
../asn1/LibIts/Security/IEEE1609dot2.asn:287: error: syntax error, unexpected $end, expecting <upperidentifier>
or <loweridentifier>
or {block} or ...
../asn1/LibIts/Security/IEEE1609dot2.asn:287: error: TableConstraint can only be applied to ObjectClassFieldType
In ASN.1, this kind of subtyping is allowed:
ConstrainedType ::= Type Constraint | <etc.>
Constraint ::= "(" ConstraintSpec ExceptionSpec ")"
ConstraintSpec ::= SubtypeConstraint | <etc.>
SubtypeConstraint ::= ElementSetSpecs
ElementSetSpec ::= Unions | ALL Exclusions
Exclusions ::= EXCEPT Elements
Elements ::= SubtypeElements | <etc.>
SubtypeElements ::= SingleValue | <etc.>
SingleValue ::= Value
Value ::= BuiltinValue
BuiltinValue ::= BitStringValue | <etc.>
BitStringValue ::= bstring | hstring | "{" IdentifierList "}" | "{" "}" | CONTAINING Value
Attachment 269978, "IEEE ASN.1 modules":
IEEE1609dot2.zip
Version: 6.2.0