I present the design of a parser that adds Scheme-style language extensibility to languages with implicitly delimited and infix syntax. A key element of my design is an enforestation parsing step, which converts a flat stream of tokens into an S-expression-like tree, in addition to the initial "read" phase of parsing and interleaved with the "macro-expand" phase.
My parser uses standard lexical scoping rules to communicate syntactic extensions to the parser. In this way extensions naturally compose locally as well as through module boundaries. I argue that this style of communication is better suited towards a useful extension system than tools not directly integrated with the compiler.
This dissertation explores the limits of this design in a new language called Honu. I use the extensiblity provided by Honu to develop useful language extensions such as LINQ and a parser generator. I also demonstrate the generality of the parsing techniques by applying them to Java and Python.
Cited By
- Schuster C, Disney T and Flanagan C Macrofication Proceedings of the 25th European Symposium on Programming Languages and Systems - Volume 9632, (644-671)
- Disney T, Faubion N, Herman D and Flanagan C (2014). Sweeten your JavaScript, ACM SIGPLAN Notices, 50:2, (35-44), Online publication date: 12-May-2015.
- Disney T, Faubion N, Herman D and Flanagan C Sweeten your JavaScript Proceedings of the 10th ACM Symposium on Dynamic languages, (35-44)
Recommendations
Decoding with syntactic and non-syntactic phrases in a syntax-based machine translation system
SSST '09: Proceedings of the Third Workshop on Syntax and Structure in Statistical TranslationA key concern in building syntax-based machine translation systems is how to improve coverage by incorporating more traditional phrase-based SMT phrase pairs that do not correspond to syntactic constituents. At the same time, it is desirable to include ...
Improve syntax-based translation using deep syntactic structures
This paper introduces deep syntactic structures to syntax-based Statistical Machine Translation (SMT). We use a Head-driven Phrase Structure Grammar (HPSG) parser to obtain the deep syntactic structures of a sentence, which include not only a fine-...
Syntax-aware neural machine translation directed by syntactic dependency degree
AbstractThere are various ways to incorporate syntax knowledge into neural machine translation (NMT). However, quantifying the dependency syntactic intimacy (DSI) between word pairs in a dependency tree has not being considered to use in attentional and ...