-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EnumCustomProperty parsing fails if more than one white-space character is used as separator #41
Comments
Hi @JuRichter , Regards |
Thanks a lot! |
…e character is used as separator. Updated and added some test EnumCustomProperty parsing fails if more than one white-space chracter is used as separator. Updated and added some test, code clean up.
* #23 Parsing failures management Added observer to listen for parsing failures. Code clean up. * #23 Added parsing failures management for each line parser Added parsing failures management for each line parser. Created silent and simple failure observer classes * #23 Added parsing failure tests Added parsing failure tests. Removed old and no more valid tests * #23 Added parsing failure observer in Demo application * #41 EnumCustomProperty parsing fails if more than one white-space character is used as separator. Updated and added some test EnumCustomProperty parsing fails if more than one white-space chracter is used as separator. Updated and added some test, code clean up. * #42 Bugfixed on NS definition Now every NS definition at the top of a file is ignored
Added support for signed integer in VAL_ regex. Fixed bug in EFeru#41 preventing custom definition from being correctly parsed
* EFeru#41 The regex to parse enum definition values had two nested capture groups which led to the last value beeing repeated twice. Fixed the regex and updated the test code to check for the correct values.
One of the last changes to the regex for parsing enum definitions caused a strange issue. Assume this definition: Parsing this definition would duplicate the last value. I submitted a PR (#46) to fix the issue and add some test code. |
Fixed the regex for parsing enum definitions, which got broken by a change related to EFeru#41.
#41 Fixed enum definition parser repeating last value twice
Line in dbc file:
BA_DEF_ BO_ "GenMsgSendType" ENUM "Cyclic","Event","CyclicIfActive","SpontanWithDelay","CyclicAndSpontan";
Propose fix in PropertiesDefinitionLineParser.cs:
Line 16:
Add:
private readonly char[] PropertySeparatorChar = { ' ' };
Line 92:
Replace:
var enumDefinition = match.Groups[10].Value.Replace("\"", "").Split(' ')[1];
By:
var enumDefinition = match.Groups[10].Value.Replace("\"", "").Split(PropertySeparatorChar, StringSplitOptions.RemoveEmptyEntries)[1];
The text was updated successfully, but these errors were encountered: