/** * @file dbc_parser.h * @brief * * Created: 2026-03-13 * Author: Deeaitch (Dim. Himro) * * Licensed under the MIT License. * See LICENSE file in the project root for full license text. */ #ifndef DBC_PARSER_H #define DBC_PARSER_H #include #include "dbc_database.h" /** * @brief Minimal DBC parser. * * Supports: * - BO_ * - SG_ * - CM_ BO_ * - CM_ SG_ * * Ignores: * - attributes * - multiplexing * - value tables */ class DbcParser { public: /** * @brief Parse DBC file. * @param filePath Path to input file. * @return Parsed database. * @throws std::runtime_error on file or parse errors. * Line parse errors include the file path and one-based line number. */ DbcDatabase ParseFile (const std::string &filePath) const; private: static std::string Trim (const std::string &text); }; #endif /* DBC_PARSER_H */