You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Any non-number values, returned by the code block, will be interpreted as 0.
seems to be wrong.
A grammar like:
start=text:"a"|{ return'some string' }|
does not return a number and hence should be equivalent to
start=text:"a"|0|
However, the parser accepts infinite input of "a".
This is probably due to the following lines, in particular |0 and the operator precedence?:
* main:
Update deps, CHANGELOG, version. Rebuild.
Fix typos. Move parens to correct place.
Rebuilt patch from scratch, incorporating comments
Update dependencies
Remove --optimize. Fixespeggyjs#392.
--allowed-start-rule=\* documented for CLI. Fixespeggyjs#386.
Put parens around integer conversions in repetition. Fixespeggyjs#381.
Tweaking the error format() documentation
Authors and small grammar fix
Change silver to hex
Update to [email protected]
Update CHANGELOG
Make online version work in old browsers. Fixespeggyjs#371.
Updating grammarSource documentation
Add Marcel Bolten to authors
Remove redundant options variants in behavior test
Handle null and undefined explicitly
Fixespeggyjs#374. CLI was throwing exception on grammar errors without a CLI test also being specified.
Stub out new CHANGELOG.md section
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: