-
Notifications
You must be signed in to change notification settings - Fork 85
Create the 'Tables' data type #203
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
Conversation
I definitely like |
Sure, I can revert that bit. |
Thanks. I took a look at #200 to confirm and indeed the GLR stuff was pretty well separated in the end, so that goal does look attainable. |
Well, #200 uses a |
@int-index Ah I see. Yes, you were very right to demand we make the diffs readable. These things slipped past me. |
Also, btw, I am rebasing #200 on master and then this to queue up the next steps, so you can just worry about this for the moment. |
src/Tabular.lhs
Outdated
Find unused rules and tokens | ||
|
||
> find_redundancies | ||
> :: (LRAction -> [Int]) -> Grammar -> ActionTable -> ([Int], [String]) |
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.
> :: (LRAction -> [Int]) -> Grammar -> ActionTable -> ([Int], [String]) | |
> :: SelectReductions -> Grammar -> ActionTable -> ([Int], [String]) |
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.
Yeah, I couldn’t decide whether to use the type synonym or to keep the type signature verbatim when copying.
Alright, let’s change this one :-)
This data type encapsulates the result of processing the Grammar. In addition to ActionTable and GotoTable, it also includes intermediate results such as Lr0Items, which are needed for debug printing and info table generation. The 'find_redundancies' function has been moved from Main.lhs to Tabular.lhs almost verbatim (use git show --color-moved=blocks to confirm).
Nice! So do we want to merge #200 on top of this? |
Definitely some parts of #200, since it introduces the |
Okay, will you and @Ericson2314 do this? Also, I‘d like to make some more grammar-related types derive |
@knothed see what I wrote in #200 (comment). I am adding a little checklist to that PR. |
This data type encapsulates the result of processing the
Grammar
.In addition to
ActionTable
andGotoTable
, it also includes intermediate results such asLr0Items
, which are needed for debug printing and info table generation.The
find_redundancies
function has been moved fromMain.lhs
toTabular.lhs
almost verbatim (usegit show --color-moved=blocks
to confirm).