Skip to content

Commit

Permalink
Merge pull request #45 from Whitehouse112/bugfixed
Browse files Browse the repository at this point in the history
Bugfixed on #23 and #41
  • Loading branch information
Adhara3 authored Sep 14, 2023
2 parents 7e1e478 + 8fd0e07 commit 4fc93d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DbcParserLib/Parsers/PropertiesDefinitionLineParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal class PropertiesDefinitionLineParser : ILineParser
{
private const string PropertiesDefinitionLineStarter = "BA_DEF_ ";
private const string PropertiesDefinitionDefaultLineStarter = "BA_DEF_DEF_ ";
private const string PropertyDefinitionParsingRegex = @"BA_DEF_\s+(BU_|BO_|SG_|EV_)\s+""([a-zA-Z_][\w]*)""\s+(?:(?:(INT|HEX)\s+(-?\d+)\s+(-?\d+))|(?:(FLOAT)\s+([\d\+\-eE.]+)\s+([\d\+\-eE.]+))|(STRING)|(?:(ENUM)\s+((?:""[^""]*"",+)*(""[^""]*""))))\s*;";
private const string PropertyDefinitionParsingRegex = @"BA_DEF_(?:\s+(BU_|BO_|SG_|EV_))?\s+""([a-zA-Z_][\w]*)""\s+(?:(?:(INT|HEX)\s+(-?\d+)\s+(-?\d+))|(?:(FLOAT)\s+([\d\+\-eE.]+)\s+([\d\+\-eE.]+))|(STRING)|(?:(ENUM)\s+((?:""[^""]*"",+)*(""[^""]*""))))\s*;";
private const string PropertyDefinitionDefaultParsingRegex = @"BA_DEF_DEF_\s+""([a-zA-Z_][\w]*)""\s+(-?\d+|[\d\+\-eE.]+|""[^""]*"")\s*;";

private readonly IParseFailureObserver m_observer;
Expand Down
2 changes: 1 addition & 1 deletion DbcParserLib/Parsers/ValueTableLineParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal class ValueTableLineParser : ILineParser
{
private const string ValueTableLineStarter = "VAL_ ";
private const string ValueTableLinkParsingRegex = @"VAL_\s+(\d+)\s+([a-zA-Z_][\w]*)\s+([a-zA-Z_][\w]*)\s*;";
private const string ValueTableParsingRegex = @"VAL_\s+(?:(?:(\d+)\s+([a-zA-Z_][\w]*))|([a-zA-Z_][\w]*))\s+((?:\d+\s+(?:""[^""]*"")\s+)*)\s*;";
private const string ValueTableParsingRegex = @"VAL_\s+(?:(?:(\d+)\s+([a-zA-Z_][\w]*))|([a-zA-Z_][\w]*))\s+((?:(?:-?\d+)\s+(?:""[^""]*"")\s+)*)\s*;";

private readonly IParseFailureObserver m_observer;

Expand Down

0 comments on commit 4fc93d1

Please sign in to comment.