-
Notifications
You must be signed in to change notification settings - Fork 9
Description
In the current IUPAC SMILES+ draft document, leading zeros are not allowed for atom properties including isotope, H count, charge, atom class, and ring bonds.
In an effort to clarify this in the formal grammar, digit notation was added:
digit ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
digit_nonzero ::= '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
We then added notation like this below to specify no leading zeros (The isotope specification supports up to 3 digits, nnn):
isotope ::= digit | digit_nonzero digit | digit_nonzero digit digit
In hindsight, there is probably a cleaner way to do this by defining a number, which can not have leading zeros. If you ideas on how best to do this with the formal grammar, please comment!