synalysis / Grammars

Grammars for Synalyze It! and Hexinator
MIT License
92 stars 14 forks source link

Inconsistent measurement #8

Closed duanemoody closed 4 years ago

duanemoody commented 4 years ago

https://github.com/synalysis/Grammars/blob/2892dc9ebc46f317bc57a7c589542b6d70334477/stl.grammar#L17 The X vertex is measured as 32 bits, but the Y and Z vertices are measured as 4 bytes without explanation for the difference. According to the STL specification all three vertices are unsigned 32-bit floating point values so I don't understand why they aren't all described using the same unit in the grammar here. Documentation for Synalyze It! doesn't indicate the first instance of a pattern needs to be defined differently, either.

synalysis commented 4 years ago

I'm not the author of the grammar (the author's email is mentioned in the element) however I assume there's no special reason for the difference. As bytes usually consist of 8 bits both representations conform to the specification.

Is there any reason other than curiosity for bringing this up?

duanemoody commented 4 years ago

Curiosity alone. Thank you for humoring me.