Aspect26 / TrufflePascal

Year project - Pascal interpreter written in Java using Truffle API
9 stars 3 forks source link

Support for `program' keyword #28

Closed vhotspur closed 7 years ago

vhotspur commented 7 years ago

The simplest program in standard Pascal is not runnable:

program Hello;
begin
    writeln('Hello, World!');
end.
$ java -cp build/:Trupple.jar cz.cuni.mff.d3s.trupple.compiler.CompilerMain Hello.pas
-- line 1 col 1: invalid Pascal
Errors while parsing source file, the code cannot be interpreted...
Aspect26 commented 7 years ago

The grammar file is missing "program" identifier on the "right side" of Pascal rule