当我试图由ETSI通过命令"asn1c VAM-PDU-Descriptions.sean"生成与C++兼容的C源代码VAM-PDU-Descriptions.sean文件时,我得到了以下错误:

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"

我正在使用的.shans文件的前几行如下:

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
    }

而且,据我所知,我得到了一个与上面代码的第21和22行相关的语法错误,不过我是直接从ETSI网站下载的.

有人能给我解释一下我错过了什么吗?

推荐答案

后继者是相当新的,您的编译器无法识别它.

只需将其从您的规范中删除,然后重试.

C++相关问答推荐

为什么这个gcc迂腐的人忽视了扩展?

在struct中调用函数,但struct在void中 *

堆栈在作用域阻塞后会被释放吗?

我无法让LLDB正确运行我的可执行文件

在c++中使用堆栈的有效括号

在编译时参数化类型定义

为什么net/if.h在ifaddrs.h之前?

Make Node函数.S有什么问题吗?

Square不与Raylib一起移动

RawMotion的XInput2错误(具有较高值的XISelectEvents上的BadValue)

如何使用_newindex数组我总是得到错误的参数

为什么数组的最后一个元素丢失了?

通过描述符查找文件路径时出现问题

在vfork()之后,链接器如何在不 destruct 父内存的情况下解析execve()?

从CentOS 7到Raspberry PI 2B的交叉编译-无法让LIBC和System Include标头一起工作

使用正则表达式获取字符串中标记的开始和结束

生成一个半RNG,结果用C表示(无随机/随机)

挥发性语义的形式化理解

在git补丁中自动添加C的宏

多行表达式:C 编译器如何处理换行符?