Abstract
Honu is a new language that fuses traditional algebraic notation (e.g., infix binary operators) with Scheme-style language extensibility. A key element of Honu's 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. We present the design of Honu, explain its parsing and macro-extension algorithm, and show example syntactic extensions.
- Hiroshi Arai and Ken Wakita. An implementation of a hygienic syntactic macro system for JavaScript: a preliminary report. In Proc. Workshop on Self-Sustaining Systems, 2010. Google Scholar
Digital Library
- Kevin Atkinson, Matthew Flatt, and Gary Lindstrom. ABI Compatibility Through a Customizable Language. In Proc. Generative Programming and Component Engineering, pp. 147--156, 2010. Google Scholar
Digital Library
- Jonathan Bachrach and Keith Playford. Java Syntax Extender. In Proc. Object-Oriented, Programming, Systems, Languages, and Applications, 2001. Google Scholar
Digital Library
- Jason Baker. Macros that Play: Migrating from Java to Myans. Masters dissertation, University of Utah, 2001.Google Scholar
- Cristiano Calcagno, Walid Taha, Liwen Huang, and Xavier Leroy. Implementing Multi-stage Languages Using ASTs, Gensym, and Reflection. In Proc. Generative Programming and Component Engineering, 2003. Google Scholar
Digital Library
- Luca Cardelli and Florian Matthes. Extensible syntax with lexical scoping. Technical report, Research Report 121, Digital SRC, 1994.Google Scholar
- Russ Cox, Tom Bergan, Austin T. Clements, Frans Kaashoek, and Eddie Kohler. Xoc, an extension-oriented compiler for systems programming. In Proc. 13th Conference on Architectural Support for Programming Languages and Operating Systems, 2008. Google Scholar
Digital Library
- Ryan Culpepper and Matthias Felleisen. Fortifying Macros. In Proc. ACM Intl. Conf. Functional Programming, 2010. Google Scholar
Digital Library
- Daniel de Rauglaudre. Camlp4. 2007. http://brion.inria.fr/gallium/index.php/Camlp4Google Scholar
- Sebastian Erdweg, Tillmann Rendel, Christian Kästner, and Klaus Ostermann. SugarJ: Library-Based Syntactic Language Extensibility. In Proc. Object-Oriented, Programming, Systems, Languages, and Applications, pp. 391--406, 2011. Google Scholar
Digital Library
- Robert Bruce Findler and Matthias Felleisen. Contracts for Higher-Order Functions. In Proc. ACM Intl. Conf. Functional Programming, pp. 48--59, 2002. Google Scholar
Digital Library
- Matthew Flatt. Compilable and Composable Macros, You Want it When? In Proc. ACM Intl. Conf. Functional Programming, pp. 72--83, 2002. Google Scholar
Digital Library
- Matthew Flatt, Ryan Culpepper, David Darais, and Robert Bruce Findler. Macros that Work Together: Compile-Time Bindings, Partial Expansion, and Definition Contexts. Journal of Functional Programming (to appear), 2012. http://www.cs.utah.edu/plt/expmodel-6/ Google Scholar
Digital Library
- Robert Grimm. Better extensibility through modular syntax. In Proc. Programming Language Design and Implementation pp. 38--51, 2006. Google Scholar
Digital Library
- J. Heering, P. R. H. Hendriks, P. Klint, and J. Rekers. The Syntax Definition Formalism SDF---reference manual---.SIGPLAN Not. 24(11), pp. 43--75, 1989. Google Scholar
Digital Library
- Simon Peyton Jones and Tim Sheard. Template metaprogramming for Haskell. In Proc. Haskell Workshop, Pitssburgh, pp. 1--16, 2002. Google Scholar
Digital Library
- Richard Kelsey, William Clinger, and Jonathan Rees (Ed.). R5RS. ACM SIGPLAN Notices, Vol. 33, No. 9. (1998), pp. 26--76., 1998. Google Scholar
Digital Library
- Eugene Kohlbecker, Daniel P. Friedman, Matthias Felleisen, and Bruce Duba. Hygienic Macro Expansion. In Proc. Lisp and Functional Programming, pp. 151--181, 1986. Google Scholar
Digital Library
- Nathaniel Nystrom, Michael R. Clarkson, and Andrew C. Myers. Polyglot: An Extensible Compiler Framework for Java. In Proc. 12th International Conference on Compiler Construction. pp. 138--152, 2003. Google Scholar
Digital Library
- Vaughan R. Pratt. Top down operator precedence. In Proc. 1st annual ACM SIGACT-SIGPLAN symposium on Principles of programming languages, 1973. Google Scholar
Digital Library
- Ryan Culpepper, Sukyoung Ryu, Eric Allan, Janus Neilson, Jon Rafkind. Growing a Syntax. In Proc. FOOL 2009, 2009.Google Scholar
- Jonathan Riehl. Language embedding and optimization in mython. In Proc. DLS 2009. pp. 39--48, 2009. Google Scholar
Digital Library
- Tiark Rompf and Martin Odersky. Lightweight Modular Staging: a Pragmatic Approach to Runtime Code Generation and Compiled DSLs. In Proc. Generative Programming and Component Engineering, pp. 127--136, 2010. Google Scholar
Digital Library
- Andrew Shalit. Dylan Reference Manual. 1998. http://www.opendylan.org/books/drm/TitleGoogle Scholar
- Michael Sperber (Ed.). Revised6 Report on the Algorithmic Language Scheme. Cambridge University Press, 2011. Google Scholar
Digital Library
- Sam Tobin-Hochstadt and Matthias Felleisen. Design and Implementation of Typed Scheme. Higher Order and Symbolic Computation, 2010.Google Scholar
- Masaru Tomita. An efficient context-free parsing algorithm for natural languages. International Joint Conference on Artificial Intelligence. pp. 756--764., 1985. Google Scholar
Digital Library
- Alessandro Warth and Ian Piumarta. Ometa: an Object-Oriented Language for Pattern Matching. In Proc. Dynamic Languages Symposium, 2007. Google Scholar
Digital Library
- Daniel Weise and Roger Crew. Programmable syntax macros. In Proc. SIGPLAN Conference on Programming Language Design and Implementation, 1993. Google Scholar
Digital Library
Index Terms
Honu: syntactic extension for algebraic notation through enforestation
Recommendations
Honu: syntactic extension for algebraic notation through enforestation
GPCE '12: Proceedings of the 11th International Conference on Generative Programming and Component EngineeringHonu is a new language that fuses traditional algebraic notation (e.g., infix binary operators) with Scheme-style language extensibility. A key element of Honu's design is an enforestation parsing step, which converts a flat stream of tokens into an S-...
Sweeten your JavaScript: hygienic macros for ES5
DLS '14Lisp and Scheme have demonstrated the power of macros to enable programmers to evolve and craft languages. In languages with more complex syntax, macros have had less success. In part, this has been due to the difficulty in building expressive hygienic ...
Sweeten your JavaScript: hygienic macros for ES5
DLS '14: Proceedings of the 10th ACM Symposium on Dynamic languagesLisp and Scheme have demonstrated the power of macros to enable programmers to evolve and craft languages. In languages with more complex syntax, macros have had less success. In part, this has been due to the difficulty in building expressive hygienic ...






Comments