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.
Wed 21 JunDisplayed time zone: Eastern Time (US & Canada) change
16:00 - 18:00 | PLDI: Parsing & Formal LanguagesPLDI Research Papers at Cypress 2 Chair(s): Eric Eide University of Utah | ||
16:00 20mTalk | Search-Based Regular Expression Inference on a GPU PLDI Research Papers DOI Pre-print | ||
16:20 20mTalk | Derivative Based Nonbacktracking Real-World Regex Matching with Backtracking Semantics PLDI Research Papers Dan Moseley Microsoft DevDiv, Mario Nishio Microsoft Azure, Jose Perez Rodriguez Microsoft DevDiv, Olli Saarikivi Microsoft Research, Redmond, Stephen Toub Microsoft DevDiv, Margus Veanes Microsoft, Tiki Wan Microsoft Azure, Eric Xu Microsoft, USA DOI | ||
16:40 20mTalk | Repairing Regular Expressions for Extraction PLDI Research Papers DOI | ||
17:00 20mTalk | Recursive State Machine Guided Graph Folding for Context-Free Language Reachability PLDI Research Papers Yuxiang Lei University of New South Wales, Yulei Sui University of New South Wales, Sydney, Shin Hwei Tan Concordia University, Qirun Zhang Georgia Institute of Technology DOI | ||
17:20 20mTalk | Interval Parsing Grammars for File Format Parsing PLDI Research Papers Jialun Zhang Pennsylvania State University, Greg Morrisett Cornell University, Gang (Gary) Tan Pennsylvania State University DOI | ||
17:40 20mTalk | flap: A Deterministic Parser with Fused Lexing PLDI Research Papers Jeremy Yallop University of Cambridge, Ningning Xie University of Toronto, Neel Krishnaswami University of Cambridge DOI Pre-print |