rapodaca / dialect

Documenting a subset of the SMILES language.
MIT License
13 stars 0 forks source link

Grammar should allow empty string #28

Closed rapodaca closed 2 years ago

rapodaca commented 2 years ago

Many formats support the empty molecule, including V2000 and V3000 molfile. If Dialect does not, this could create problems.

The empty string could be supported with something as simple as:

<string>     ::= <sequence> | ε
<sequence>   ::= <atom> ( <union> | <branch> | <split> )*
<union>      ::= <bond>? ( <cut> | <sequence> )
<branch>     ::= "(" ( "." | <bond> )? <sequence> ")"
<split>      ::= "." <sequence>
...