Home >

news ヘルプ

論文・著書情報


タイトル
和文: 
英文:An implementation of a hygienic syntactic macro system for JavaScript : A preliminary report 
著者
和文: 荒井 浩, 脇田 建.  
英文: Hiroshi Arai, Ken Wakita.  
言語 English 
掲載誌/書名
和文: 
英文:Proceedings of the Workshop on Self-Sustaining Systems 
巻, 号, ページ        
出版年月 2010年9月27日 
出版者
和文: 
英文:ACM 
会議名称
和文: 
英文:Workshop on Self-Sustaining Systems 
開催地
和文: 
英文:Tokyo 
公式リンク https://dl.acm.org/citation.cfm?id=1942798
 
DOI https://doi.org/10.1145/1942793.1942798
アブストラクト The article describes an implementation scheme of a hygienic syntactic macro system for JavaScript. Instead of implementing the complex logic of a hygienic macro system from scratch, the proposed method heavily relies on an existing Scheme implementation of its hygienic syntactic macro system. A program written in our macro-enhanced version of JavaScript is first translated into a Scheme program. It is then macro-expanded by a macro expander of Scheme into a macro-free Scheme code. Finally, it is translated back to Javascript, which at this point is free of macros. To deal with the macro-enhanced syntax, an extensible parser architecture based on top-down operator precedence is proposed. A prototype hygienic macro system, including both the parser and the two-way translator, is implemented by only 2,000 lines of Scheme code.

©2007 Institute of Science Tokyo All rights reserved.