dlang-community / Pegged

A Parsing Expression Grammar (PEG) module, using the D programming language.
534 stars 66 forks source link

Improvements to the tracer. #221

Closed veelo closed 7 years ago

veelo commented 7 years ago
  1. Improved position indication.
  2. Extended support for trace conditions.
PhilippeSigaud commented 7 years ago

I merged it, and #220 also.

What about a small version bump? Do you have any other improvements in mind?

On Sun, Feb 26, 2017 at 12:10 AM, Bastiaan Veelo notifications@github.com wrote:

  1. Improved position indication.
  2. Extended support for trace conditions.

You can view, comment on, or merge this pull request online at:

https://github.com/PhilippeSigaud/Pegged/pull/221 Commit Summary

  • Follow editor conventions: start lines and columns at 1. Include the index in trace messages.
  • Including the parse tree in the trace condition allows for switching on the tracer from a certain position in the input onward.

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PhilippeSigaud/Pegged/pull/221, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjYpwiO9sweN4p4Wu-vuf5-cPOyOzAPks5rgLTQgaJpZM4MMK9T .

veelo commented 7 years ago

Thanks!

What about a small version bump? Do you have any other improvements in mind?

Hold on a moment, I'd like to propose a longest_match parser. Coming up!

veelo commented 7 years ago

I'm ready for a version bump. https://github.com/PhilippeSigaud/Pegged/wiki/Extended-PEG-Syntax#longest-match-alternation

Also, I found it was about time to document the left-recursion algorithm, before I forget: https://github.com/PhilippeSigaud/Pegged/wiki/Left-Recursion

The tracer and HTML output are still undocumented I believe, but that'll have to wait.

Thanks.

PhilippeSigaud commented 7 years ago

The left-recursion documentation is very well written very interesting to read.

I'll bump the version to v0.4.0. Between the new documentation for left-recursion and the longest-match rule, field-tested on the EP grammar, that's quite justified.

veelo commented 7 years ago

Nice! Thanks.

PhilippeSigaud commented 7 years ago

There, that's done. See:

https://github.com/PhilippeSigaud/Pegged/releases

Tell me if I have to add something in the release notes.

On Wed, Mar 1, 2017 at 7:35 PM, Bastiaan Veelo notifications@github.com wrote:

Nice! Thanks.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/PhilippeSigaud/Pegged/pull/221#issuecomment-283428397, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjYp1rcuEz4do_jMZl_fKlTc7oN1nskks5rhbqEgaJpZM4MMK9T .

veelo commented 7 years ago

No it looks really nice. Thanks for the creds. Are you planning on leaving a note on the announce news group?

PhilippeSigaud commented 7 years ago

Yeah, good idea, I should do that. I've to go to work right now, I'll do that in a few hours.

On Wed, Mar 1, 2017 at 8:44 PM, Bastiaan Veelo notifications@github.com wrote:

No it looks really nice. Thanks for the creds. Are you planning on leaving a note on the announce news group?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/PhilippeSigaud/Pegged/pull/221#issuecomment-283447843, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjYp5vaYgyjoa-XPGaWAYzzoDG-V9Rxks5rhcqMgaJpZM4MMK9T .

veelo commented 7 years ago

The tracer and HTML output are still undocumented I believe, but that'll have to wait.

I found that I did document the tracer. Just updated it to the changed traceCondition API: https://github.com/PhilippeSigaud/Pegged/wiki/Grammar-Debugging

veelo commented 7 years ago

And I added a short mention of toHTML in https://github.com/PhilippeSigaud/Pegged/wiki/Using-the-Parse-Tree.

veelo commented 7 years ago

Turns out toHTML was already documented here https://github.com/PhilippeSigaud/Pegged/wiki/Parse-Result

Too bad the Wiki has no search function.

I'll shut up now :-)

PhilippeSigaud commented 7 years ago

There, here is the Announce post:

https://forum.dlang.org/post/qhcbtyvxlrabiqnccceo@forum.dlang.org

On Thu, Mar 2, 2017 at 8:03 AM, Philippe Sigaud philippe.sigaud@gmail.com wrote:

Yeah, good idea, I should do that. I've to go to work right now, I'll do that in a few hours.

On Wed, Mar 1, 2017 at 8:44 PM, Bastiaan Veelo notifications@github.com wrote:

No it looks really nice. Thanks for the creds. Are you planning on leaving a note on the announce news group?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/PhilippeSigaud/Pegged/pull/221#issuecomment-283447843, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjYp5vaYgyjoa-XPGaWAYzzoDG-V9Rxks5rhcqMgaJpZM4MMK9T .

veelo commented 7 years ago

Thank you. It's a nice announcement.