Skip to content
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

skip disables skipper inside argument - How to disable only outer skipper #797

Open
Flamefire opened this issue Oct 12, 2024 · 0 comments
Open

Comments

@Flamefire
Copy link
Contributor

skip[a] is documented as "Re-establish the skipper that got inhibited by lexeme or no_skip. "

It is underspecified if that applies to the outer and/or inner skipper.

Take this example: x3::lexeme[XXX >> x3::skip[YYY] ];

Is skip supposed to affect YYY, XXX >> YYY or both if XXX and YYY can contain skippers too?

What what the parser look like to join 2 parsers that might allow spaces inside without any space?

Example from Slack: https://godbolt.org/z/GYYejjrEd

auto const identifier = x3::lexeme[+x3::alpha];
auto const expr = identifier >> "=" >> identifier; 

auto const grammar = x3::lexeme[identifier >> '.' >> x3::skip[expr] ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant