Modular Interpreter Written in JavaScript

OData support
Kundra László János
Department of Automation and Applied Informatics

Learning how to program can be a problematic experience for new students. In my thesis, I propose a solution to the problematic first experiences by creating a modular interpreter written in JavaScript that can interpret any kind of programming language - if a module is created for it - and translate that code to JavaScript.

The solution consists of a regular expressions and state machine based lexical analyser module called Lexer, and a Parser module that implements the LALR parsing algorithm to parse grammars defined in BNF. The resulting AST then can be interpreted with the proper language module, which can directly run the equivalent JavaScript code.

In my thesis I describe the solution and explain the used algorithms, and the choice behind them. I also give a brief explanation of the used technologies to make the solution easy to understand even for those who do not know much about JavaScript or formal grammars. Using this solution it is easy to build interactive websites for programming language courses.


Please sign in to download the files of this thesis.