This commit is contained in:
deeaitch committed 2026-10-11 06:19:42 -04:00
1 parent bce707daf6
commit 51fcdb88ac
174 files changed
+5220 -2213

No files matched your search

+11 -4
View File
@@ -14,7 +14,7 @@
#include <string>
#include "dbc_database.h"
#include "dbc_diagnostic.h"
/**
* @brief Minimal DBC parser.
@@ -27,9 +27,8 @@
* - basic M / mN multiplexing
* - VAL_ signal value descriptions
*
* Ignores:
* - attributes
* - named VAL_TABLE_ tables
* Reports unsupported statements as warnings, except SG_MUL_VAL_ which is
* an error. VERSION, NS_, BS_, BU_ and NS_ symbol declarations stay quiet.
*/
class DbcParser {
public:
@@ -44,6 +43,14 @@ public:
*/
DbcDatabase ParseFile(const std::string &filePath) const;
/**
* @brief Parse with warnings and a structured first error instead of throwing.
* @return Valid database with diagnostics; empty database on error.
* File errors use line zero; statement errors use physical one-based lines.
* Warnings indicate ignored syntax and possible incomplete decoding.
*/
DbcParseResult ParseFileWithDiagnostics(const std::string &filePath) const;
};
#endif /* DBC_PARSER_H */