Origen-SDK / o2

MIT License
4 stars 0 forks source link

STIL - Allow waveform defs with no semicolon #203

Open ginty opened 1 week ago

ginty commented 1 week ago

In AMD we have some historical STIL files which do not terminate waveform events with a ; in cases where there was only a single event.

Until recently the OM STIL parser handled that OK (unintentionally), but recent updates made by @rlaj have made it fail to parse such definitions (again unintentionally).

This update relaxes the allowed syntax vs. the spec slightly by allowing the final event to have no semicolon at the end.

Added parsing test cases for this and the tagged waveform definitions which were previously un-tested.

ginty commented 1 week ago

Since it is outside the spec, would it be prudent to add an option for this (I don't mind which is the default)? Something like either use_strict_stil_spec = true/false, or relax_stil_spec = true/false and setup the parser accordingly?

Yeah that's fair, let me see if I can come up with a way to do this

coreyeng commented 1 week ago

@rlaj, I'm not that familiar with STIL and you're probably right. I put that more in "we don't know what we don't know" category. If we do have an option though, we can lump other things we aren't thinking about in there. A "strict STIL parser" may be a WiP but we'll have that option to cover things we use that are outside of that.