This is reasonable.dvgrn wrote:I haven't quoted quite all of the relevant parts, unfortunately -- the link above is a better source if you really want to dig into what it's doing. Seems as if when it hits the second "3-" in each pair in "B3-a3-r/S23-a3-r", that resets the isotropic bits to all-ON... whereas it doesn't reset the bits to all-OFF when it hits the second "2" in "B2a2e".
The easiest way to prevent non-canonical rule strings is to use whatever algorithm you like to convert a rule string to an internal format, then convert that internal format into a canonical string, then reject the original string if it is not an exact match for the the canonical output string (or, to be kinder and gentler, just ignore the input string and use the sanitized output string).