graalvm / simplelanguage

A simple example language built using the Truffle API.
http://openjdk.java.net/projects/graal/
Universal Permissive License v1.0
608 stars 198 forks source link

Can the antlr grammar be cleaned of all the Java code? #85

Open spullara opened 5 years ago

spullara commented 5 years ago

Right now I'd say it is a pretty non-standard ANTLR 4 grammar and detracts from the idea that this is a "SimpleLanguage". Most people that use Antlr use the generated visitor for compilation. For example, even a complicated grammar like for Java8 has very little (almost none except for checking character classes) Java code in the specification:

https://github.com/antlr/grammars-v4/blob/master/java8/Java8.g4

Is it a peculiarity of Truffle that requires it?