Work

Interpreting a basic turtle graphics programming language: hand-coded vs JavaCC based implementations

Year: 2019
Type: article
Abstract: Interpretation of custom programming languages is a challenging task for many software programmers. This paper presents an easy to follow approach to this problem by using as input language a small programming language for generating turtle graphics. First, we present a step by step almost automatic manual implementation in JavaScript of an interpreter for this input language. Then, we automate the implementation even more, by using the JavaCC code generator. In this second implementation, instead of directly interpreting the abstract syntax tree in order to generate a drawing in a Canvas element, we translate it to an SVG graphics file. Besides their usefulness as case studies, the resulting applications can be used as tools for teaching basic programming concepts.
Language: English
Open Access status: diamond
OpenAlex ID: W2990309130
FWCI:
Cites:
Cited by:
Related to: 10