Concrete Syntax with Black Box Parsers
Rodin Aarssen (CWI, Netherlands), Jurgen Vinju (CWI, Netherlands),, Tijs van der Storm (CWI, Netherlands)

TL;DR
This paper introduces Concretely, a method to incorporate external black box parsers into meta programming systems, enabling concrete syntax pattern matching for complex languages without the need to develop new grammars.
Contribution
It presents Concretely and Tympanic, tools that reuse existing parsers and automatically map external ASTs to internal data structures in meta programming systems.
Findings
Supports reuse of existing parsers for Java, JavaScript, C++
Automates AST mapping with Tympanic DSL
Enables concrete syntax pattern matching for complex languages
Abstract
Context: Meta programming consists for a large part of matching, analyzing, and transforming syntax trees. Many meta programming systems process abstract syntax trees, but this requires intimate knowledge of the structure of the data type describing the abstract syntax. As a result, meta programming is error-prone, and meta programs are not resilient to evolution of the structure of such ASTs, requiring invasive, fault-prone change to these programs. Inquiry: Concrete syntax patterns alleviate this problem by allowing the meta programmer to match and create syntax trees using the actual syntax of the object language. Systems supporting concrete syntax patterns, however, require a concrete grammar of the object language in their own formalism. Creating such grammars is a costly and error-prone process, especially for realistic languages such as Java and C++. Approach: In this paper we…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
