Writing a JavaScript interpreter for DBN using PEG.js and canvas (Part II)

In this article I build an interpreter for the DBN language from the parsed AST generated by the grammar we defined in the previous article in PEG.js. If you haven't read the first part, I strongly recommend to do so, otherwise this will make little sense to you. It should be quite easy to follow … Continue reading Writing a JavaScript interpreter for DBN using PEG.js and canvas (Part II)

Writing an interpreter for DBN using PEG.js and canvas (Part I)

In this first part of the article, I will define a grammar for DBN (Design By Numbers) and generate a parser for it that outputs an AST (Abstract Syntax Tree), so I can interpret the syntax tree it later on with JavaScript and draw it into an HTML5 Canvas. John Maeda created the DBN language … Continue reading Writing an interpreter for DBN using PEG.js and canvas (Part I)

Writing a JavaScript interpreter for DBN using PEG.js and canvas (Part I)

In this first part of the article, I will define a grammar for DBN (Design By Numbers) and generate a parser for it that outputs an AST (Abstract Syntax Tree), so I can interpret the syntax tree it later on with JavaScript and draw it into an HTML5 Canvas. John Maeda created the DBN language … Continue reading Writing a JavaScript interpreter for DBN using PEG.js and canvas (Part I)