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

Parser fixes for parenthesized groups #102

Merged
merged 1 commit into from
Oct 11, 2021
Merged

Parser fixes for parenthesized groups #102

merged 1 commit into from
Oct 11, 2021

Conversation

anweiss
Copy link
Owner

@anweiss anweiss commented Oct 11, 2021

Fixes issue parsing parenthesized groups and includes some if let cleanup. Now properly parses the following example:

CRI-Reference = [
  (?scheme, ?((host.name // host.ip), ?port) // path.type),
  *path,
  *query,
  ?fragment
]

scheme = (0, text .regexp "[a-z][a-z0-9+.-]*")
host.name = (1, text)
host.ip = (2, bytes .size 4 / bytes .size 16)
port = (3, 0..65535)
path.type = (4, 0..127)
path = (5, text)
query = (6, text)
fragment = (7, text)

@anweiss anweiss self-assigned this Oct 11, 2021
@anweiss anweiss added bug Something isn't working parser labels Oct 11, 2021
@anweiss anweiss added this to the v1.0.0 milestone Oct 11, 2021
@anweiss anweiss merged commit 8654f6b into main Oct 11, 2021
@anweiss anweiss deleted the parser-fixes branch October 11, 2021 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant