Concrete Syntax Metapatterns
summary
Presents a compiler that compiles concrete syntax metapatterns via black-box parsers into abstract-syntax metapatterns, handling disjunctions, descendant patterns and inline patches; uses location metadata to decode encoded metavariables and provides a context-dependent fallback when nodes lack locations; can infer many required syntactic types to avoid annotations but warns of exponential blowup for many disjunctions/descendants; offers a Kotlin implementation supporting C++ with evaluated, reusable artifacts and a DOI-linked paper and archive.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:28Easier restructurings
- 3:35Concrete syntax patterns
- 5:21Meta patterns benefits
- 8:12Goal of meta patterns
- 8:33Compiling concrete syntax
- 10:19Parser interface requirements
- 11:24Compilation example
- 13:34Extending to disjunction
- 15:24Type inference for disjunction
- 17:32Context-dependent disjunction
- 19:42Descendant pattern compilation
- 21:27Practical challenges
- 22:09Summary
- 23:13Conclusion
related talks
01h 04mWhat FP Can Learn From Formal Languages: Towards a Leaner Syntax
52mAll the Languages Together
21mDataEngBytes 2023 - SYD-T3-04 - Abhinav Goyal
21mEverything as Compiler
09mA variant of recursive decent parsing
01h 02mThe sceptics guide to pattern matching
41mBuilding Parsers in C#: From Theory to Practice. The Uklon Case
01h 44mPractical Observable Sharing
