摘要: 给出了一种基于文法分析技术的ABNF通用解析模块的设计与实现方案,只须通过配置协议的ABNF规则集,ABNF通用解析模块就可以自动对该规则集上定义的协议文本消息进行解析。实验结果表明,同传统的专用解析方法相比,该方法具有严格和通用的特点。
关键词:
ABNF范式,
递归下降算法,
深度优先搜索,
上下文无关文法
Abstract: A new general parsing method based on the syntax parsing techniques is proposed for the ABNF-coded protocol messages. Taking the ABNF rule set of the text-message syntax as input, it can automatically parse the protocol messages. The experimental results presented show that the new way is stricter and provides a more general usage compared with the traditional specific methods.
Key words:
ABNF,
Recursive descent parsing,
Depth-first search,
Context-free grammar
中图分类号:
李 伟;田 野;赵保华;周 颢. 一种ABNF编码协议消息的通用解析方法[J]. 计算机工程, 2006, 32(13): 141-143.
LI Wei;TIAN Ye;ZHAO Baohua;ZHOU Hao. A General Parsing Method for ABNF-coded Protocol Messages[J]. Computer Engineering, 2006, 32(13): 141-143.