-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/bison datetime parser #3179
Feature/bison datetime parser #3179
Conversation
…ature/bison-datetime-parser
…ature/bison-datetime-parser
Codecov Report
@@ Coverage Diff @@
## master #3179 +/- ##
==========================================
+ Coverage 85.32% 85.34% +0.01%
==========================================
Files 1289 1293 +4
Lines 119819 120024 +205
==========================================
+ Hits 102239 102430 +191
- Misses 17580 17594 +14
Continue to review full report at Codecov.
|
; | ||
|
||
date | ||
: INTEGER NEGATIVE INTEGER NEGATIVE INTEGER { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use parser to validate the date value? It's more clear to replace the INTEGER
with meaningful YEAR
to validate the format. You can define the YEAR
with regex {DEC}{1,4}
to do the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to check the value range, e.g. 99
is still invalid minute number. So do it in one place now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minutes could also use regex to validate. you have used the parser why not let it do more thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's too complicate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And different month has different count of days, it can't validate by lex/parse rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minutes could also use regex to validate. you have used the parser why not let it do more thing?
Where is this check? I don't find it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See validateDate function
…ature/bison-datetime-parser
incompatible with before.
|
This PR don't modify this. |
Refactor #2770 by bison.
Close #2720
Close #2630