Offering an easy access to programming languages that are difficult to approach directly dramatically reduces the inhibition threshold. The Generative Modeling Language is such a language and can be described as being similar to Adobe's PostScript. A major drawback of all PostScript dialects is their unintuitive reverse Polish notation, which makes both - reading and writing - a cumbersome task. A language should offer a structured and intuitive syntax in order to increase efficiency and avoid frustration during the creation of code. To overcome this issue, we present a new approach to translate JavaScript code to GML automatically. While this translation is basically a simple infix-to-postfix notation rewrite for mathematical expressions, the correct translation of control flow structures is a non-trivial task, due to the fact that there is no concept of "goto" in the PostScript language and its dialects. The main contribution of this work is the complete translation of JavaScript into a PostScript dialect including all control flow statements. To the best of our knowledge, this is the first complete translator.
[1]
Sven Havemann,et al.
Generative mesh modeling
,
2005
.
[2]
James Gosling.
SunDew—a distributed and extensible window system
,
1986
.
[3]
Sven Havemann,et al.
Generative Parametric Design of Gothic Window Tracery
,
2004,
VAST.
[4]
John M. Snyder,et al.
Generative modeling: a symbolic system for geometric modeling
,
1992,
SIGGRAPH.
[5]
Scott McGregor,et al.
Screen postscript
,
1988,
SIGGRAPH '88.
[6]
Glenn C. Reid.
Thinking in PostScript
,
1990
.
[7]
Luc Van Gool,et al.
Procedural modeling of buildings
,
2006,
SIGGRAPH 2006.
[8]
Casey Reas,et al.
Processing: a programming handbook for visual designers and artists
,
2007
.