Open mingodad opened 1 year ago
I think that now I better understand the lalr
inner working, after going through it step by step with gdb
I found that the call with lenght == 0
where due to reducing rules that have empty
as one of their possible options but because there was no way to know about it in the action handlers I've added an extra parameter with the reducing transition (see here https://github.com/mingodad/lalr/commit/08939baf5b60fd9b833c604cbd2d96822c2de209).
I've noticed that in several grammars there is calls to default_action_handler with
length == 0
(see bellow list) which doesn't seems to make sense because nothing can be done.Also some calls to default_action_handler doesn't contain any
nodes[length-1].state()->transitions->reduced_symbol
.