jrclogic / SMCDEL

A symbolic model checker for Dynamic Epistemic Logic.
https://w4eg.de/malvin/illc/smcdelweb
GNU General Public License v2.0
39 stars 9 forks source link

web interface: show more helpful parse errors #9

Closed m4lvin closed 5 years ago

m4lvin commented 5 years ago

Parse errors should be shown in the web interface.

Steps to reproduce: In the web interface load one of the examples, remove a ) or introduce another syntax error, then click "Run SMCDEL!"

Result: Something went wrong appears in the output frame. The server stdout prints Parse error in line 13, column 3 or similar.

Wanted: Parse error in line 13, column 3 should be shown in the web interface.

Bonus: Also move the textarea cursor to the position of the syntax error or highlight it somehow.

m4lvin commented 5 years ago

Note: The same goes for lexical error at line 1, column 1 etc. which is triggered by forbidden characters in the input, e.g. @ or #.

This means we should use the monadic interfaces of at least happy and alex.

Edit: adjusting the posn wrapper of alex seems easier and sufficient.

m4lvin commented 5 years ago

fixed in https://github.com/jrclogic/SMCDEL/commit/255fc04d3ed2da01b5b2cba6f8f27f544084985b