nsensfel / tonkadur

Narrative scripting/programming tool. Write stories in your favorite editor using a feature-rich language, compile them into a very small and simple language to easily integrate them into your game.
https://tonkadur.of.tacticians.online
Apache License 2.0
3 stars 0 forks source link

Parsing issues do not report the parsed file #1

Open nsensfel opened 4 years ago

nsensfel commented 4 years ago

Issues in parsing raised by ANTLR indicate messages looking like the following:

line 19:3 extraneous input '(variable' expecting {WS, AT_KW, PARAMETER_KW}
line 19:13 extraneous input 'oscar' expecting {WS, AT_KW, PARAMETER_KW}
<Java stack trace>

At no point is the file containing these lines indicated, making it difficult to locate the issue.

nsensfel commented 4 years ago

This should now be working properly.

nsensfel commented 4 years ago

It has improved, but there are still cases where the location of the issue isn't pointed out in any other detail than the file in which it occurred. This isn't enough.

nsensfel commented 4 years ago

Example of case where the reported error doesn't help enough: writing (cond 42).

nsensfel commented 3 years ago

Still an issue in 050e329f2a2e2367c2e4f1965190b0f6a5addf29. When the parser invalidates the input or when there is a Java error, it is still rather hard to figure out exactly what part of the narrative is causing the issue.