Closed jameskermode closed 3 years ago
This appears to be a bug in the grammar - the quoted whitespace-separated-float element is a Repeat(Regex..., mi=1))
, which allows for a repeat without any whitespace, so it parses 0.050.44
as 0.050
followed by .44
, I suspect. These are separated by a wordbreak regex \b
. A List(,, delimiter=' ')
doesn't seem to work. What does work for parsing is Sequence(Repeat(Regex(re_float+'\s'), mi=0), Regex(re_float)))
, but that breaks the C and python tree walking code, in different ways, because there's one additional depth nesting of container tree nodes.
I opened a pyleri issue https://github.com/transceptor-technology/pyleri/issues/19 to see whether this can be handled cleanly. The working option above can definitely be made to work, but requires special parsing of this new tree topology. A pyleri.List
with whitespace delimiters seems much preferable.
As reported at libAtoms/ExtXYZ.jl#12, this file contains a typo in the Lattice and should give an error:
However, it is read successfully but gives a strange cell:
For this to be the case there must be an error in the parser, or even in the grammar.