D29327: Improve a bit parse error dignosis
jordi fita i mas
noreply at phabricator.kde.org
Sat May 2 01:12:46 BST 2020
jfita added inline comments.
INLINE COMMENTS
> staniek wrote in KDbSqlScanner.l:155
> Why it is "end" now when we're calling BEGIN() here?
BEGIN is to switch to a new start condition: after this flex will only look for rules that are within the group DATE_OR_TIME_caller, in this case the INITIAL or empty start condition. That is, it will look all the rules that have *no* prefix, hence this is the end of the date/time “subparser”.
In other words, this is the rule of the '#' character that ends the date/time literal.
> staniek wrote in KDbSqlScanner.l:379
> This is nice but how about keeping the
>
> [\~\!\@\#\^\&\|\`\?,()\[\]\.;\:\+\-\*\/\%\^\<\>\=] { ... }
>
> which just defines all single-character tokens and adding the . { } afterwards?
> In the . {} we may also add a debug explaining that the yytext[0] is unsupported.
> Doing so at flex level can have its value too.
Yes, it is indeed way better because now i can return an actual scanning error and the error message that the end user sees is “Unexpected character literal: x”, that is much nicer than the “Query error” i was getting before.
Thank you.
REPOSITORY
R15 KDb
REVISION DETAIL
https://phabricator.kde.org/D29327
To: jfita, staniek, piggz
Cc: Kexi-Devel-list, barman, wicik, staniek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kexi-devel/attachments/20200502/9992f165/attachment.html>
More information about the Kexi-devel
mailing list