A Computational Interpretation of Context-Free Expressions

08/24/2017
by   Martin Sulzmann, et al.
0

We phrase parsing with context-free expressions as a type inhabitation problem where values are parse trees and types are context-free expressions. We first show how containment among context-free and regular expressions can be reduced to a reachability problem by using a canonical representation of states. The proofs-as-programs principle yields a computational interpretation of the reachability problem in terms of a coercion that transforms the parse tree for a context-free expression into a parse tree for a regular expression. It also yields a partial coercion from regular parse trees to context-free ones. The partial coercion from the trivial language of all words to a context-free expression corresponds to a predictive parser for the expression.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/20/2020

Structure-Constrained Process Graphs for the Process Semantics of Regular Expressions

Milner (1984) introduced a process semantics for regular expressions as ...
research
12/18/2018

CPEG: A Typed Tree Construction from Parsing Expression Grammars with Regex-Like Captures

CPEG is an extended parsing expression grammar with regex-like capture a...
research
09/17/2021

Games for Succinctness of Regular Expressions

We present a version of so called formula size games for regular express...
research
10/10/2018

Sound Regular Expression Semantics for Dynamic Symbolic Execution of JavaScript

Existing support for regular expressions in automated test generation or...
research
12/28/2020

FOREST: An Interactive Multi-tree Synthesizer for Regular Expressions

Form validators based on regular expressions are often used on digital f...
research
01/31/2018

Recognising and Generating Terms using Derivatives of Parsing Expression Grammars

Grammar-based sentence generation has been thoroughly explored for Conte...
research
10/26/2021

The Computational Complexity of Finding Arithmetic Expressions With and Without Parentheses

We show NP-completeness for various problems about the existence of arit...

Please sign up or login with your details

Forgot password? Click here to reset