mdaines / grammophone

A tool for analyzing and transforming context-free grammars.
https://mdaines.github.io/grammophone
MIT License
200 stars 23 forks source link

Display conflicts in automata, reuse components for all LR variants #38

Closed mdaines closed 7 months ago

mdaines commented 7 months ago

This adds red highlights to LR automata states that have a conflict in the corresponding parsing table.

Screenshot 2023-11-28 at 8 12 17 AM

Additionally, this changes the structure of LR(0) parsing tables to be similar to those for other LR tables so that the same components can be used for all of them.

The changes affect all example output for LR(0) parsing tables. The actual changes were obscured by the ordering of other calculations, so this PR also adds sorting to the update script so that diffs should be easier to read in the future.

modulovalue commented 7 months ago

Thank you @mdaines!