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

h_many_up_to_n and h_many_i_j missing? #134

Open
uucidl opened this issue Jul 31, 2015 · 4 comments
Open

h_many_up_to_n and h_many_i_j missing? #134

uucidl opened this issue Jul 31, 2015 · 4 comments

Comments

@uucidl
Copy link

uucidl commented Jul 31, 2015

Hammer has:

hammer ABNF
h_many *(expr)
h_many1 1*(expr)
h_repeat_n n*n(expr)
? *n(expr)
? i*j(expr)

I've searched the source code and to my knowledge the last two cases are missing, for expressions with many elements up to n or many between i and j.

@uucidl uucidl changed the title many_up_to_n missing? many_up_to_n and many_i_j missing? Jul 31, 2015
@uucidl uucidl changed the title many_up_to_n and many_i_j missing? h_many_up_to_n and h_many_i_j missing? Jul 31, 2015
@abiggerhammer
Copy link
Member

Good point! What would you think about folding the two missing cases into an h_many_between that takes a lower and upper bound? up_to(n) is like saying between(0, n).

@uucidl
Copy link
Author

uucidl commented Jul 31, 2015

Yeah that would be perfect!

@uucidl
Copy link
Author

uucidl commented Jul 31, 2015

By the way this came up as I was building an RFC5322 parser from the spec. The lines in the body are all supposed to be *998text

@abiggerhammer
Copy link
Member

Cool. I'll try and get that banged into many.c this weekend.

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

2 participants