yhirose / cpp-peglib

A single file C++ header-only PEG (Parsing Expression Grammars) library
MIT License
884 stars 112 forks source link

Traceprint #77

Closed mumme74 closed 4 years ago

mumme74 commented 4 years ago

This is also a part of pull request #74

yhirose commented 4 years ago

@mumme74, thank you for the pull request. I spent some time to review it, and I acknowledged some good ideas in it.

I also did some research about how other PEG parsers handle tracking, and found the following one gives an interesting idea as well. https://docs.rs/peg/0.6.1/peg/#tracing

I'll ponder over how the tracing feature can be improved. Thank you!

yhirose commented 4 years ago

I have changed the trace feature which can now show whether a rule matched or not. https://github.com/yhirose/cpp-peglib/commit/fe2d67fc88e2ca69bfdd6630532efc8909e76e09