File formats specify how data is encoded for persistent storage. They cannot be formalized as context-free grammars since their specifications include context-sensitive patterns such as the random access pattern and the type-length-value pattern. We propose a new grammar mechanism called Interval Parsing Grammars IPGs) for file format specifications. An IPG attaches to every nonterminal/terminal an interval, which specifies the range of input the nonterminal/terminal consumes. By connecting intervals and attributes, the context-sensitive patterns in file formats can be well handled. In this paper, we formalize IPGs' syntax as well as its semantics, and its semantics naturally leads to a parser generator that generates a recursive-descent parser from an IPG. In general, IPGs are declarative, modular, and enable termination checking. We have used IPGs to specify a number of file formats including ZIP, ELF, GIF, PE, and part of PDF; we have also evaluated the performance of the generated parsers.


翻译:文件格式指定了数据加密的方式以用于持久化存储。它们不能被形式化为上下文自由文法,因为它们的规范包括上下文相关模式,例如随机访问模式和类型长度值模式。我们提出了一种称为区间语法分析器(IPG)的新型语法机制来处理文件格式规范。IPG会为每个非终端符/终端符附加一个区间,其中详细说明了该非终端符/终端符消耗的输入范围。通过连接区间和属性,可以很好地处理文件格式中的上下文相关模式。在本文中,我们将IPG的语法及语义形式正式化,其语义自然导致一个解析器生成器,它能够从IPG生成一个递归下降解析器。总体而言,IPG是声明式、模块化的并且能够实现终止检查。我们已经使用IPG指定了许多文件格式,包括ZIP、ELF、GIF、PE和部分PDF;我们还评估了生成的解析器的性能。

0
下载
关闭预览

相关内容

NeurlPS 2022 | 自然语言处理相关论文分类整理
专知会员服务
48+阅读 · 2022年10月2日
专知会员服务
25+阅读 · 2021年4月2日
Python图像处理,366页pdf,Image Operators Image Processing in Python
【新书】Java企业微服务,Enterprise Java Microservices,272页pdf
【干货】用BRET进行多标签文本分类(附代码)
专知会员服务
84+阅读 · 2019年12月27日
ExBert — 可视化分析Transformer学到的表示
专知会员服务
30+阅读 · 2019年10月16日
Java8 Lambda实现源码解析
阿里技术
2+阅读 · 2022年11月22日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
一文读懂依存句法分析
AINLP
16+阅读 · 2019年4月28日
基于PyTorch/TorchText的自然语言处理库
专知
27+阅读 · 2019年4月22日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
命名实体识别从数据集到算法实现
专知
55+阅读 · 2018年6月28日
上百份文字的检测与识别资源,包含数据集、code和paper
数据挖掘入门与实战
17+阅读 · 2017年12月7日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
1+阅读 · 2008年12月31日
国家自然科学基金
1+阅读 · 2008年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Arxiv
0+阅读 · 2023年6月4日
Arxiv
1+阅读 · 2023年6月2日
Arxiv
0+阅读 · 2023年6月2日
Arxiv
12+阅读 · 2021年11月1日
VIP会员
相关资讯
Java8 Lambda实现源码解析
阿里技术
2+阅读 · 2022年11月22日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
一文读懂依存句法分析
AINLP
16+阅读 · 2019年4月28日
基于PyTorch/TorchText的自然语言处理库
专知
27+阅读 · 2019年4月22日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
命名实体识别从数据集到算法实现
专知
55+阅读 · 2018年6月28日
上百份文字的检测与识别资源,包含数据集、code和paper
数据挖掘入门与实战
17+阅读 · 2017年12月7日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
1+阅读 · 2008年12月31日
国家自然科学基金
1+阅读 · 2008年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员