We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#include <pire/pire.h> int main() { Pire::Lexer lexer("abc"); Pire::Scanner s1 = lexer.Parse().Compile<Pire::Scanner>(); Pire::Scanner s2 = lexer.Parse().Compile<Pire::Scanner>(); const char* text = "abc"; std::cout << "abc " << Pire::Matches(s1, text, text + 3) << ' ' << Pire::Matches(s2, text, text + 3) << std::endl; std::cout << "ab " << Pire::Matches(s1, text, text + 2) << ' ' << Pire::Matches(s2, text, text + 2) << std::endl; std::cout << " " << Pire::Matches(s1, text, text + 0) << ' ' << Pire::Matches(s2, text, text + 0) << std::endl; }
Output:
abc 1 0 ab 0 0 0 1
Expected output:
abc 1 1 ab 0 0 0 0
The text was updated successfully, but these errors were encountered:
Not sure why on Earth you've guessed it shouldn't.
Sorry, something went wrong.
If lexer should be a disposable object, please document it and throw an exception, when it is tried to be parsed twice.
No branches or pull requests
Output:
Expected output:
The text was updated successfully, but these errors were encountered: