English
Related papers

Related papers: Parsing Expression Grammars Made Practical

200 papers

Context-free grammars (CFGs) are the de-facto formalism for declaratively describing concrete syntax for programming languages and generating parsers. One of the major challenges in defining a desired syntax is ruling out all possible…

Programming Languages · Computer Science 2026-02-23 Yunjeong Lee , Gokul Rajiv , Ilya Sergey

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,…

Programming Languages · Computer Science 2015-11-30 Kimio Kuramitsu

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…

Programming Languages · Computer Science 2023-04-24 Jialun Zhang , Greg Morrisett , Gang Tan

This paper presents an extension of the GLL parsing algorithm for context-free grammars which also supports parsing expression grammars with ordered choice and lookahead. The new PEGLL algorithm retains support for unordered choice, and…

Formal Languages and Automata Theory · Computer Science 2022-08-29 Aaron Moss , Brynn Harrington , Emily Hoppe

Grammatical Error Correction (GEC) faces a critical challenge concerning explainability, notably when GEC systems are designed for language learners. Existing research predominantly focuses on explaining grammatical errors extracted in…

Computation and Language · Computer Science 2025-02-24 Jingheng Ye , Shang Qin , Yinghui Li , Hai-Tao Zheng , Shen Wang , Qingsong Wen

It is natural for probabilistic programs to use conditionals to express alternative substructures in models, and loops (recursion) to express repeated substructures in models. Thus, probabilistic programs with conditionals and recursion…

Programming Languages · Computer Science 2020-10-26 David Chiang , Chung-chieh Shan

PGA, short for ProGram Algebra, describes sequential programs as finite or infinite (repeating) sequences of instructions. The semigroup C of finite instruction sequences was introduced as an equally expressive alternative to PGA. PGA…

Programming Languages · Computer Science 2010-03-09 Stephan Schroevers

Ad hoc parsers are everywhere: they appear any time a string is split, looped over, interpreted, transformed, or otherwise processed. Every ad hoc parser gives rise to a language: the possibly infinite set of input strings that the program…

Software Engineering · Computer Science 2022-07-27 Michael Schröder , Jürgen Cito

We introduce recurrent neural network grammars, probabilistic models of sentences with explicit phrase structure. We explain efficient inference procedures that allow application to both parsing and language modeling. Experiments show that…

Computation and Language · Computer Science 2016-10-13 Chris Dyer , Adhiguna Kuncoro , Miguel Ballesteros , Noah A. Smith

We introduce Transformer Grammars (TGs), a novel class of Transformer language models that combine (i) the expressive power, scalability, and strong performance of Transformers and (ii) recursive syntactic compositions, which here are…

Computation and Language · Computer Science 2022-12-07 Laurent Sartran , Samuel Barrett , Adhiguna Kuncoro , Miloš Stanojević , Phil Blunsom , Chris Dyer

Graph-based semantic representations are valuable in natural language processing, where it is often simple and effective to represent linguistic concepts as nodes, and relations as edges between them. Several attempts has been made to find…

Formal Languages and Automata Theory · Computer Science 2021-05-10 Johanna Björklund , Frank Drewes , Anna Jonsson

I introduce a formalism for representing the syntax of recursively structured graph-like patterns. It does not use production rules, like a conventional graph grammar, but represents the syntactic structure in a more direct and declarative…

Formal Languages and Automata Theory · Computer Science 2025-04-25 Peter Fletcher

We study regular expressions that use variables, or parameters, which are interpreted as alphabet letters. We consider two classes of languages denoted by such expressions: under the possibility semantics, a word belongs to the language if…

Formal Languages and Automata Theory · Computer Science 2015-03-19 Pablo Barceló , Leonid Libkin , Juan Reutter

Traditional language processing tools constrain language designers to specific kinds of grammars. In contrast, model-based language specification decouples language design from language processing. As a consequence, model-based language…

Computation and Language · Computer Science 2012-02-03 Luis Quesada , Fernando Berzal , Francisco J. Cortijo

Grammatical Error Correction (GEC) should not focus only on high accuracy of corrections but also on interpretability for language learning. However, existing neural-based GEC models mainly aim at improving accuracy, and their…

Computation and Language · Computer Science 2022-03-15 Masahiro Kaneko , Sho Takase , Ayana Niwa , Naoaki Okazaki

A grammar formalism based upon CHR is proposed analogously to the way Definite Clause Grammars are defined and implemented on top of Prolog. These grammars execute as robust bottom-up parsers with an inherent treatment of ambiguity and a…

Computation and Language · Computer Science 2007-05-23 Henning Christiansen

Historically, true context-sensitive parsing has seldom been applied to programming languages, due to its inherent complexity. However, many mainstream programming and markup languages (C, Haskell, Python, XML, and more) possess…

Programming Languages · Computer Science 2016-09-20 Nicolas Laurent , Kim Mens

Software systems that process structured inputs often lack complete and up-to-date specifications, which specify the input syntax and the semantics of input processing. While grammar mining techniques have focused on recovering syntactic…

Software Engineering · Computer Science 2025-07-18 Andreas Pointner , Josef Pichler , Herbert Prähofer

A phonetic posteriorgram (PPG) is a time-varying categorical distribution over acoustic units of speech (e.g., phonemes). PPGs are a popular representation in speech generation due to their ability to disentangle pronunciation features from…

Audio and Speech Processing · Electrical Eng. & Systems 2024-02-28 Cameron Churchwell , Max Morrison , Bryan Pardo

We present the squirrel parser, a PEG packrat parser that directly handles all forms of left recursion with optimal error recovery, while maintaining linear time complexity in the length of the input even in the presence of an arbitrary…

Programming Languages · Computer Science 2026-01-09 Luke A. D. Hutchison