Title
Preserving Lexical Scoping When Dynamically Embedding Languages.
Abstract
There are various situations in which one may want to embed source code from one language into another, for example when combining relational query languages with application code or when performing staged meta-programming. Typically, one will want to transfer data between these languages. We propose an approach in which the embedded code shares variables with the host language, preserving lexical scoping rules even after the code is converted into an intermediate representation. We demonstrate this approach through a module for meta-programming using Lua as both embedded and host languages. Our technique supports dynamically generated code, requires no special annotation of functions to be translated and is implemented as a library, requiring no source pre-processing or changes to the host language execution environment.
Year
DOI
Venue
2015
10.1007/978-3-319-24012-1_3
SBLP
Keywords
DocType
Volume
Lua, Domain-specific languages, Embedded languages, Meta-programming, Multi-stage programming
Conference
9325
ISSN
Citations 
PageRank 
0302-9743
0
0.34
References 
Authors
6
4
Name
Order
Citations
PageRank
Félix Ribeiro100.34
Hisham Muhammad261.82
André Murbach Maidl3173.10
Roberto Ierusalimschy446354.25