EFeru / DbcParser

.NET CAN bus dbc file parser
MIT License
76 stars 28 forks source link

SignalLineParser is still using legacy split based parsing instead of regex based one #32

Closed JDDEmbedded closed 1 year ago

JDDEmbedded commented 1 year ago

How do I enable the new regex parsing feature? Do I have to use the source code or is there a way to do it with v1.3.0 as compiled? Right now the SignalLineParser, at least, is not using the regex parsing by default. I've found that some DBC files will not parse properly. For example, if there is no space between the signal name and the ":" character then an exception is thrown. A quick test with an online regex tester shows that this issue won't happen with the regex parsing. Would be nice if Parser.ParseFromPath or similar methods had a parameter that allowed the caller to specify whether to parse using regex.

Adhara3 commented 1 year ago

Hi,

regex parsing shounld be enabled by default in version 1.3.0, if it is failing there is a bug in the regex we are using or we missed something in the SignalLineParser class. Let us double check

Thanks A

Adhara3 commented 1 year ago

Hi,

we double checked, you are right SsignalLineParser is still using the legacy parsing, not the regex based one. Thiss is a leftover, we will release ASAP a fixed version.

Would be nice if Parser.ParseFromPath or similar methods had a parameter that allowed the caller to specify whether to parse using regex.

We won't do this, we prefer to keep it simple and use regex by default everywhere as the only parsing strategy. In the future, if we ever introduce a new different parsing strategy, we will allow user to select which one to use.

Sorry for the inconvenience A

Adhara3 commented 1 year ago

Hi,

released in version 1.3.1 already available on nuget.org

Cheers A

JDDEmbedded commented 1 year ago

Thanks for the prompt fix!