igordejanovic / parglare

A pure Python LR/GLR parser - http://www.igordejanovic.net/parglare/
MIT License
136 stars 32 forks source link

Use ordinary dicts for parse table serialization #85

Closed SupraSummus closed 5 years ago

SupraSummus commented 5 years ago

Why I think this is a change for better:

SupraSummus commented 5 years ago

If .pgt files should be deterministic then I propose adding sort_keys=True to JSON dumping. Let me know if this is desired and I may add this change to the PR.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 90.301% when pulling 2041950d4d365c14aaa47debf9fc0b2c3f17b604 on SupraSummus:tables into 33558d5bf8e2bbf4c93f2c1a4e8dc37d5d38f0de on igordejanovic:master.

igordejanovic commented 5 years ago

Agreed. No need for OrderedDict. And, yes, I think it would be better to have pgt json files deterministic as it would make life easier when working with version control or making tests based on comparing outputs.

SupraSummus commented 5 years ago

Updated.

igordejanovic commented 5 years ago

Looks good. Thanks.