c++casn.1

"Unexpected TOK_WITH, expecting ';'" when generating the C++ compatible C source code of a .asn file using the ASN.1 to C compiler


When I try to generate the C++ compatible C source code of the VAM-PDU-Descriptions.asn file by ETSI through the command "asn1c VAM-PDU-Descriptions.asn" I get the following error:

ASN.1 grammar parse error near VAM-PDU-Descriptions.asn:21 (token "WITH"): syntax error, unexpected TOK_WITH, expecting ';'
Cannot parse "VAM-PDU-Descriptions.asn"

The first lines of the .asn file I'm using are the following:

VAM-PDU-Descriptions {itu-t(0) identified-organization(4) etsi(0) itsDomain(5)
    wg1(1) 103300 vam(1) major-version-3(3) minor-version-1(1)}
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

    IMPORTS
    AccelerationChangeIndication, BasicContainer, CartesianAngle, ClusterBreakupInfo,
    ClusterJoinInfo, ClusterLeaveInfo, Curvature, CurvatureCalculationMode, 
    DeltaTimeQuarterSecond, GenerationDeltaTime, HeadingChangeIndication, ItsPduHeader, LanePosition, 
    LateralAcceleration, LongitudinalAcceleration, PathHistory, PathPredicted, 
    SequenceOfSafeDistanceIndication, SequenceOfTrajectoryInterceptionIndication, 
    SequenceOfTrajectoryInterceptionIndication, Speed, StabilityChangeIndication, StationId, 
    TrajectoryInterceptionIndication, VerticalAcceleration, VruClusterInformation, VruDeviceUsage, 
    VruEnvironment, VruExteriorLights, GeneralizedLanePosition, VruProfileAndSubprofile, VruMovementControl,  
    VruSizeClass, YawRate, Wgs84Angle
    FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) 102894 cdd (2) major-version-3 (3) minor-version-1 (1) }
    WITH SUCCESSORS
    ;

    VAM ::= SEQUENCE {
        header ItsPduHeaderVam,
        vam    VruAwareness
    }

and, as far as I can understand, I'm getting a syntax error related to lines 21 and 22 of the above code, which however I downloaded straight from the ETSI website.

Can anyone please explain me what I am missing?


Solution

  • WITH SUCCESSORS is fairly new, your compiler does not recognize it.

    Just remove it from your spec and try again.