claw-project / claw-compiler

CLAW Compiler for Performance Portability
https://claw-project.github.io
BSD 2-Clause "Simplified" License
40 stars 15 forks source link

Better error message for the CLAW language parser #9

Closed clementval closed 7 years ago

clementval commented 8 years ago

Enhance the error message for the CLAW parser written with ANTLR

Now they look like that

line 1:10 no viable alternative at input '('

They should be more precise with information like the expecting token.

line 1:10 expecting IDENTIFIER but found (

clementval commented 7 years ago

Needs to use the information from getExpectedTokens() from the RecognitionException