-
Notifications
You must be signed in to change notification settings - Fork 66
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
Question about behavior of repetitions #381
Labels
blocks-release
Blocks an imminent release. High Priorty.
Comments
Yes, this is a bug. Need to wrap |
hildjj
added a commit
to hildjj/peggy
that referenced
this issue
Mar 19, 2023
hildjj
added a commit
to hildjj/peggy
that referenced
this issue
Mar 20, 2023
hildjj
added a commit
to hildjj/peggy
that referenced
this issue
Mar 21, 2023
* main: Update deps, CHANGELOG, version. Rebuild. Fix typos. Move parens to correct place. Rebuilt patch from scratch, incorporating comments Update dependencies Remove --optimize. Fixes peggyjs#392. --allowed-start-rule=\* documented for CLI. Fixes peggyjs#386. Put parens around integer conversions in repetition. Fixes peggyjs#381. Tweaking the error format() documentation Authors and small grammar fix Change silver to hex Update to node-inspect-extracted@2.0.2 Update CHANGELOG Make online version work in old browsers. Fixes peggyjs#371. Updating grammarSource documentation Add Marcel Bolten to authors Remove redundant options variants in behavior test Handle null and undefined explicitly Fixes peggyjs#374. CLI was throwing exception on grammar errors without a CLI test also being specified. Stub out new CHANGELOG.md section
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all,
I think there is a discrepancy between the documentation for repetitions in conjunction with code blocks and results of preceding labeled expressions and the actual behavior.
In particular the statement
seems to be wrong.
A grammar like:
does not return a number and hence should be equivalent to
However, the parser accepts infinite input of "a".
This is probably due to the following lines, in particular
|0
and the operator precedence?:peggy/lib/compiler/passes/generate-js.js
Lines 490 to 496 in d2f5bb9
Any clarification is appreciated.
The text was updated successfully, but these errors were encountered: