GithubHelp home page GithubHelp logo

phogatfirstgitrepo / dbc-parser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from msalau/dbc-parser

0.0 0.0 0.0 190 KB

A Flex/Bison/Lemon parser of DBC files

License: MIT License

Shell 0.16% C 84.11% Makefile 1.00% Yacc 10.98% Lex 3.76%

dbc-parser's Introduction

This is a parser/scanner of DBC files

The application is useless on its own, but may be tweaked or embedded into any app to do real stuff. Originally the project was started to implement dbc parser that will become part of a wireshark plugin to dissect CAN traffic.

About DBC file format

DBC is a proprietary file format developed by Vector Informatik GmbH (c). Specification of the file format is not available to general public and thus reverse engineering is used to reconstruct its specification to some extent. CANdb++ Editor is used to verify a file to match specification.

DBC file format specification

Lexer rules

  1. Tokens are separated by delimiters: space, tab or new line;
  2. Delimiters are not enforced by the parser and thus are ignored;
  3. Text strings are enclosed into double quotes and may contain any other characters except for double quotes (e.g. text string may span several lines; side note: CANdb++ Editor is able to open dbc files with escaped double quotes \" but don't allow to edit or enter such strings in GUI);
  4. There are reserved keywords: VERSION, NS_, BS_, BO_, SG_, CM_, and etc.;
  5. Identifier names are composed of Latin letters, digits and/or underscores; Names should not start with a digit and may not match a reserved keyword;
  6. Some symbols are passed to the parser as-is: (, ), [, ], ,, :, ;, |, @;
  7. There are cases in which symbols + and - are used as separate tokens (not a prefix of a number);
  8. Standalone letter M or m and following digits with optional M are passed as a separate token type, such sequence may appear as a special token or as an identifier;
  9. Comments start with double slash and span until end of line and are ignored;

Parser rules

dbc-parser's People

Contributors

msalau avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.