Compiler icon indicating copy to clipboard operation
Compiler copied to clipboard

add a dev / debug mode

Open CircleCode opened this issue 12 years ago • 4 comments

writing grammar can be a tricky work.

Of course pp and Hoa\Compiler ease the job, but a dev / debug mode allowing the developer to understand the grammar in some special cases, and giving verbose traces would be a real plus.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

CircleCode avatar Oct 29 '13 17:10 CircleCode

Hello :-),

What kind of tools? A list would be appreciated :-) !

hoaproject avatar Oct 29 '13 18:10 hoaproject

Resurecting an issue :-P I have very important performance issue during parsing, and I would like to know what the parser has done to be so long. So, a list of rules it passed or not for each node could be interesting to improve anything...

guiled avatar Feb 21 '18 21:02 guiled

A while ago I implemented a POC debug parser working with the dbg protocol.

It allows to put breakpoints in PP grammars and see which rule the compiler uses. If anyone is interested in using it/contributing/testing/whatever, I can try to make it work again and push it somewhere.

jubianchi avatar Mar 05 '18 22:03 jubianchi

This seems very interesting ! I've made a tracer that plays every rules the parser passed through and am working on a viewer (like a video player, with rule breadcrumb and parsing progression (backtrack) ). Your work seems very good as well :-)

guiled avatar Mar 06 '18 11:03 guiled