BlueBrain / MorphIO

A python and C++ library for reading and writing neuronal morphologies
https://morphio.readthedocs.io
Apache License 2.0
26 stars 22 forks source link

Mistake in lexer rule #471

Closed mingodad closed 1 year ago

mingodad commented 1 year ago

Looking through the lexer code in https://github.com/BlueBrain/MorphIO/blob/953696993fba4a24f1c13f31f5856f464e77353a/src/readers/NeurolucidaLexer.inc#L140 it seems that the intent was this rules_.push("[Cc]ell[ ]?[Bb]ody", +Token::CELLBODY); , notice the optional space need be escaped (\, " ") of enclosed in [ ].

BenHanson commented 1 year ago

Nope, it is fine as it is. It is only in gram_grep config files or in flex .y files that you need to do that.

mgeplf commented 1 year ago

Nope, it is fine as it is.

Agreed, I'm going to close this.

Thanks @BenHanson; didn't know we signed up for top tier support :) Seriously though, thanks for the great package.

mingodad commented 1 year ago

Every day is a day to learn something new ! Thanks !

mingodad commented 1 year ago

Only out of curiosity because I didn't found any specification of the grammar for the format that is being parsed but I noticed that for example in (Color Green) one or more number of spaces are accepted but for (CellBody) or (Cell Body) are accepted but not (Cell Body) with more than one space.

mgeplf commented 1 year ago

The format being parsed is a proprietary and custom, and thus the grammer isn't available to us. Our parser is the best reverse engineering we've been able to do, so that's probably why we're a bit permissive of what is acceptable.