Skip to content

Relax whitespace handling in SG_ line parser (Vector CANdb++ accepts tighter formatting) #113

Description

@ChrisFromNI

Hi,
some DBC files generated or edited outside CANdb++ contain SG_ signal definitions with no or reduced whitespace between tokens. While this still follows the Vector DBC grammar, DbcParser currently expects strict spacing and fails to parse these lines.
Example of a minimally‑spaced but valid SG_ line (accepted by CANdb++):
SG_ SignalName optionalMultiplexerIdentifier :0|16@1+(0.1,0)[0|100]"rpm"Vector__XXX

Request:
Please consider relaxing the SG_ line parser to allow token adjacency where unambiguous (e.g., no required spaces around :, |, @, +/-, ( ), [ ], units, and receiver lists). This would improve compatibility with real‑world DBC files encountered in industry.

Thanks for maintaining this excellent library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions