Skip to content

SamReinsel/DBC-Language-Syntax

 
 

Repository files navigation

DBC Language Syntax

Visual Studio Marketplace Version GitHub Workflow Status

This extension provides basic syntax highlighting, bracket completion, code snippets and lexer/parser errors for the Vector DBC file format. This is created to work with version 2 of the Vector DBC file format.

Although DBC files are often programmatically generated, it can be useful to more easily read the DBC file itself in a plaintext format. Syntax highlighting is handled locally through VSCode's integrated TextMates language parsing engine, using PCRE regular expressions to match syntax.

Syntax Highlighting

Lexicographic and Parser Errors

Commonly Used Snippets

Supported keywords

  • BA
  • BA_DEF
  • BA_DEF_DEF
  • BA_DEF_DEF_REL
  • BA_DEF_REL
  • BA_REL
  • BO
  • BO_TX_BU
  • BS
  • BU
  • BU_SG_REL
  • CM
  • EV
  • NS
  • SG
  • SGTYPE
  • SIG_GROUP
  • VAL
  • VAL_TABLE
  • VERSION

Known Issues

  1. Attribute definitions that wrap lines may not be highlighted on the following lines.
  2. Signals that are multiplexed will not be recognized

Todo items

  • Make lexer and parser errors more useful
  • Add checks that prevent crashing when signals don't exist
  • Include debugging (invalid offset, start bit, min, max, etc)
  • Hover box to show all related fields as a hint

License

GNU General Public License v2.0 only

About

VS Code extension providing syntax highlighting for CAN DBC files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 53.7%
  • Yacc 35.5%
  • Lex 8.8%
  • Makefile 2.0%