计算机科学 > 程序设计语言
[提交于 2018年1月8日]
标题:Hygienic Source-Code Generation Using Functors
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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 Standard ML, OCaml, and Haskell.
提交历史
来自:Karl Crary[v1] 2018年1月8日 星期一 00:00:00 UTC