Nez is a PEG(Parsing Expressing Grammar)-based open grammar language that allows us to describe complex syntax constructs without action code. Since open grammars are declarative and free from a host programming language of parsers, software engineering tools and other parser applications can reuse once-defined grammars across programming languages.
A key challenge to achieve practical open grammars is the expressiveness of syntax constructs and the resulting parser performance, as the traditional action code approach has provided very pragmatic solutions to these two issues. In Nez, we extend the symbol-based state management to recognize context-sensitive language syntax, which often appears in major programming languages. In addition, the Abstract Syntax Tree constructor allows us to make flexible tree structures, including the left-associative pair of trees. Due to these extensions, we have demonstrated that Nez can parse many grammars of practical programming languages.
Nez can generate various types of parsers since all Nez operations are independent of a specific parser language. To highlight this feature, we have implemented Nez with dynamic parsing, which allows users to integrate a Nez parser as a parser library that loads a grammar at runtime. To achieve its practical performance, Nez operators are assembled into low-level virtual machine instructions, including automated state modifications when backtracking, transactional controls of AST construction, and efficient memoization in packrat parsing. We demonstrate that Nez dynamic parsers achieve very competitive performance compared to existing efficient parser generators.
Wed 2 NovDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
10:30 - 12:10 | |||
10:30 25mTalk | Lightweight Programming Experiments without Programmers and Programs: An Example Study on the Effect of Similarity and Number of Object Identifiers on the Readability of Source Code using Natural Texts Onward! Papers Tim Marter University of Duisburg-Essen, Paul Babucke University of Duisburg-Essen, Philipp Lembken University of Duisburg-Essen, Stefan Hanenberg University of Duisburg-Essen DOI | ||
10:55 25mTalk | Emergent Software Services Onward! Papers Nicolás Cardozo Universidad de los Andes DOI Pre-print Media Attached | ||
11:20 25mTalk | Nez: Practical Open Grammar Language Onward! Papers Kimio Kuramitsu Yokohama National University, Japan DOI | ||
11:45 25mTalk | Exploring Cheap Type Inference Heuristics in Dynamically Typed Languages Onward! Papers DOI |