On 27/07/2019 07:57, Mark Rotteveel wrote:
> When working on my pull request for FLOAT, I noticed that the way that
> the precision fragments (ie precision_opt and precision_opt_nz) works in
> the grammar yields non-intuitive error messages.
> 
> For example, a negative precision just yields an unclear
> """
> Token unknown - line 10, column 20
> -
> """
> 
> Using a zero value with precision_opt_nz yields the slightly better
> """
> Positive value expected
> At line 10, column 20
> """
> 
> Better would be to have and error message with the right range for the
> type (which is usually done for positive values that are not valid).
> 
> Is there a reason that isn't currently done?
> 

I disagree. If a rule can catch the problem, let it be.

Token unknown happens for all rules used incorrectly.


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to