MetaLexer

作者: Andrew Casey , Laurie Hendren

DOI: 10.1145/1960275.1960279

关键词:

摘要: Compiler toolkits make it possible to rapidly develop compilers and translators for new programming languages. Although there exist elegant modular extensible parsers, compiler developers must often resort ad-hoc solutions when extending or composing lexers. This paper presents MetaLexer, a lexical specification language associated tool.MetaLexer allows programmers define lexers in fashion. MetaLexer modules can be used break the of into collection smaller specifications. Control is passed between using concept meta-tokens meta-lexing. are also extensible.MetaLexer has two key features: abstracts state transitions out semantic actions makes by introducing multiple inheritance.We have constructed tool which converts specifications popular JFlex we our create three real languages their extensions: AspectJ (and extensions), MATLAB AspectMatlab extension), itself. The easier read, extensible, require much less action code than originals.

参考文章(18)
Bernhard Rumpe, Holger Krahn, Steven Völkel, Efficient Editor Generation for Compositional DSLs in Eclipse arXiv: Software Engineering. ,(2014)
Claus Brabrand, Michael I. Schwartzbach, Mads Vanggaard, The METAFRONT System: Extensible Parsing and Transformation Electronic Notes in Theoretical Computer Science. ,vol. 82, pp. 592- 611 ,(2003) , 10.1016/S1571-0661(05)82630-1
Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, William G. Griswold, An Overview of AspectJ ECOOP 2001 — Object-Oriented Programming. pp. 327- 354 ,(2001) , 10.1007/3-540-45337-7_18
Martin Bravenboer, Éric Tanter, Eelco Visser, Declarative, formal, and extensible syntax definition for aspectJ Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications - OOPSLA '06. ,vol. 41, pp. 209- 228 ,(2006) , 10.1145/1167473.1167491
Torbjörn Ekman, Görel Hedin, The JastAdd system — modular extensible compiler construction Science of Computer Programming. ,vol. 69, pp. 14- 26 ,(2007) , 10.1016/J.SCICO.2007.02.003
Walter Cazzola, Davide Poletti, DSL evolution through composition Proceedings of the 7th Workshop on Reflection, AOP and Meta-Data for Software Evolution - RAM-SE '10. pp. 6- ,(2010) , 10.1145/1890683.1890689
Torbjörn Ekman, Görel Hedin, The jastadd extensible java compiler conference on object-oriented programming systems, languages, and applications. ,vol. 42, pp. 1- 18 ,(2007) , 10.1145/1297027.1297029
Robert Grimm, Better extensibility through modular syntax ACM SIGPLAN Notices. ,vol. 41, pp. 38- 51 ,(2006) , 10.1145/1133255.1133987
E. Schmidt, M. E. Lesk, Lex—a lexical analyzer generator UNIX Vol. II. pp. 375- 387 ,(1990)