A copy of this work was available on the public web and has been preserved in the Wayback Machine. The capture dates from 2017; you can also visit the original URL.
The file type is application/pdf
.
Hygienic Source-Code Generation Using Functors
[chapter]
2017
Lecture Notes in Computer Science
Existing source-code-generating tools such as Lex and Yacc suffer from practical inconveniences because they use disembodied code to implement actions. To prevent this problem, such tools could generate closed functors that are then instantiated by the programmer with appropriate action code. This results in all code being type checked in its appropriate context, and it assists the type checker in localizing errors correctly. We have implemented a lexer generator and parser generator based on this technique for both Standard ML and Haskell.
doi:10.1007/978-3-319-73305-0_4
fatcat:ojc22igytvh7hfonaea7uum7hq