Minres / CoreDSL

Xtext project to parse CoreDSL files
Apache License 2.0
16 stars 3 forks source link

Rework ISA module grammar #26

Closed AtomCrafty closed 2 years ago

AtomCrafty commented 2 years ago

This PR changes the way InstructionSet and CoreDef nodes are parsed. For now, the sections can be specified in any order, but if we decide to fix it in #24, the necessary change would just be to remove the two & symbols in the ISA rule.

More importantly, I decided to parse declarations and assignments into separate lists, instead of combining them into one list of mixed BlockItems. This removes the need for unnecessary filter calls in many places (btw. flatMap[] exists, so there is no need to write it as map[].flatten).

Also @eyck unsigned is not a valid type, so I made the size specifier mandatory again. And the t_equals= is there for a reason, please don't remove that.