DEIB-GECO / GMQL

GMQL - GenoMetric Query Language
http://www.bioinformatics.deib.polimi.it/geco/
Apache License 2.0
18 stars 11 forks source link

Compiler defaul error message #106

Open marcomass opened 6 years ago

marcomass commented 6 years ago

The default message for and error in the compiler seems to be "Missing ";" character at the end of the query". This is somehow misleading when the error is actually different, e.g. in the case of missing operator () such as "R = UNION A B;" instead of "R = UNION() A B;", or use of | in metadata attribute names such as "manually_curated|dataType" instead of "manually_curated__dataType".
Can these cases (and possibly others) be addressed with a specific error message, and somehow change the default error message to differentiate it from the one of a specific error?

pp86 commented 6 years ago

I do agree that the error report in case of syntax error sometimes is not to helpful; but it is really a hard task to design a parser that understands what it is wrong. Infact the parser is implemented as a white list of valid syntax constructs, not as a black list of invalid constructs.

Understanding why none of the rules was match is an extremely hard task.

I you have any better message to be shown as default one, I will substitute it.

Also, I move label this as "enhancement" since it does not provide a wrong result.

marcomass commented 6 years ago

@pp86 Thank you for the clarification. For the default error message, I suggest to use something different from any specific error (such as the absence of the final ";"), e.g., what do you think about a generic "Error at line ...."?