Vernalhav / pyrser

Python parser generator
1 stars 0 forks source link

Add default conflict resolution #3

Open Vernalhav opened 1 year ago

Vernalhav commented 1 year ago

Should this be solved at the parsing table level (as in there always being exactly one Action for each transition) or at the parser level (as in having a actions.Conflict action that stores all possibilities), to be disambiguated by the parser?

Vernalhav commented 1 year ago

The actions.Conflict approacah is interesting because it allows for other components to interact with it (such as logging the conflicts to the user outside of the table creation routine). Otherwise, an events-based approach would work to decouple the conflict logging logic, but it doesn'r seem too Pythonic.