-
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
Update documentation.html #506
Conversation
Please ensure you are in the AUTHORS file and add a changelog entry. |
OK. I need to the the example working. I am not sure how it works, so I will remove it for now. |
To get the examples to work, add your example to |
Thanks! I will update the PR with examples later today. |
I think, that you should specially mention, that this is only composite rule which is constructed from two parts. Actually, everyone can approach to this solution, but it may not be immediately obvious. |
Maybe let's add a section for composite rules? we can add more to it later as desired. |
Its amazing how little information on the web there is about this EOI syntax. I left the example next to the |
docs/js/examples.peggy
Outdated
@@ -45,3 +45,7 @@ action = match:(" "+ "a" { return location(); }) rest:rest { return {match, rest | |||
alt = match:("a" / "b" / "c") rest:rest { return {match, rest}; } | |||
|
|||
rest "The rest of the input" = $.* | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this is a nitpick, but can you move your new rule above rest
please?
docs/documentation.html
Outdated
|
||
<dd> | ||
<p>Match END OF INPUT. This <em>Bang Dot</em> sequence will match a completely empty input, | ||
or patterns up to the end of input. This is a composite rule; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"patterns up to the end of the rule" isn't clear. I think you mean that it's useful when used as a predicate, but we probably need some more words.
docs/documentation.html
Outdated
<dd> | ||
<p>Match END OF INPUT. This <em>Bang Dot</em> sequence will match a completely empty input, | ||
or patterns up to the end of input. This is a composite rule; | ||
It should NOT be placed inside a character set or quote. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line seems obvious to me (we don't say this about any of the other primitives), and as such, it was confusing. Maybe remove?
I just trimmed off the fat and kept it simple. I was not sure if including the rebuilt peggy.js was appropriate. |
Not sure why my second commit did not show up, but it is now aligned with your comments. |
Add "END OF INPUT" syntax and example.