-
Notifications
You must be signed in to change notification settings - Fork 5
Regex_Search : Add tokenizer #20
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
base: dev
Are you sure you want to change the base?
Conversation
Revert accidental formatting changes Revert accidental formatting changes in exact module Final fixes l
|
|
||
| auto read_int = [&]() -> int { | ||
| skip_spaces(); | ||
| int val = 0; |
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.
unsigned int
| if (!found) | ||
| PzError::report_error(PzError::PzErrorType::PZ_INVALID_INPUT, | ||
| "Expected number in quantifier at position " + | ||
| std::to_string(t.pos)); |
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.
{,9} implicitly means {0,9}
| return t; | ||
| } | ||
|
|
||
| t.max = read_int(); |
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.
should not throw error ex: {1,} is 1 or more
| const char MIN_CHAR = '\0'; // ascii index 0 | ||
| const char MAX_CHAR = '\x7F'; // ascii index 127 |
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.
use pz_types standard, same for other types
Adds initial regex tokenizer with support for:
This is a draft for review and future integration with postfix conversion and NFA construction.