Skip to content

Project: Variables and mathematical operators in Robot Karol Online

Entkenntnis edited this page Apr 17, 2024 · 4 revisions

Initial support will only include the java mode in German.

Architecture Overview

I'm using lezer-parser/java to parse the code and support syntax highlighting.

The compiler takes the AST from lezer and outputs bytecode that the vm can run. The vm is already supporting variables, scopes and basic mathematical operators.

There is a test page for the compiler that can be used to ensure that nothing breaks: https://karol.arrrg.de/test-java.html

Mixing modes

The compiler should be able to detect if advanced features are used. If advanced features are used, the editor should switch into "Profi-Modus" and disable switching to any other mode (blocks, robot karol, python). In this case the compiler only provides the bytecode and no robot karol code. In this mode any advancdd feature can be added to the language. We can be pragmatic (e.g. integer types), but should stay compatible with it.

Clone this wiki locally