Minres / CoreDSL

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

Grammar update for encoding fields #66

Open AtomCrafty opened 2 years ago

AtomCrafty commented 2 years ago

Encoding fields currently need to specify both a start and end index, even if they only consist of one bit. I would change the grammar to also allow a single start index, in which case the end index would be assumed to be the same.

In addition, the grammar currently only allows integer literals as range specifiers, whereas it should really allow arbitrary constant expressions.

jopperm commented 2 years ago

I would change the grammar to also allow a single start index, in which case the end index would be assumed to be the same.

Good idea, and seems uncontroversial.

In addition, the grammar currently only allows integer literals as range specifiers, whereas it should really allow arbitrary constant expressions.

Yes, it could allow these for consistency reasons, though I don't think there's a pressing need for non-literal expressions in this context.