Giter Site home page Giter Site logo

vshilenkov / vscode-rrebnf Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 350 KB

Visual Studio Code extension which provides syntax highlighting for EBNF suitable for Railroad Diagram Generator.

TypeScript 32.10% CMake 67.90%
vscode-extension vscode-language vscode ebnf-syntax syntax-highlighting highlight railroad-diagrams

vscode-rrebnf's Introduction

vscode-rrebnf

This VSCode extension provides Extended Backus–Naur Form syntax highlighting.

Grammar is taken from Railroad Diagram Generator

Features

  • Provides syntax highlighting for files with extension '.ebnf'

RR EBNF Grammar

  • Colours maybe customized by adopting settings.json

Screenshot above was taken with using the following theme customization:

{
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "entity.name.declaration.ebnf",
                "settings": {
                    "foreground": "#ff9404",
                    "fontStyle": "bold"
                }
            },
            {
                "scope": "entity.name.ebnf",
                "settings": {
                    "foreground": "#4ea5b6",
                }
            },
            {
                "scope": "keyword.operator.new.ebnf",
                "settings": {
                    "foreground": "#3875d7",
                }
            },
            {
                "scope": "keyword.operator.alternative.ebnf",
                "settings": {
                    "foreground": "#b4e4fd",
                }
            },
            {
                "scope": "keyword.operator.quantifier.ebnf",
                "settings": {
                    "foreground": "#c0a0f3",
                    "fontStyle": "bold"
                }
            },
            {
                "scope": "keyword.operator.difference.ebnf",
                "settings": {
                    "foreground": "#7cbdf1",
                }
            },
        ]
    }
}
  • Provides diagnostics
    • Used but undefined tokens

undefined

  • Redefined tokens

redefined

Requirements

  • It is required to split every rule with blank line
  • requires HyperScopes extension installed

Extension Settings

  • No settings provided

Known Issues

  • Grammar doesn't recognize links
  • Used non standard token classes
  • HyperScopes extension works not perfectly and provides not reliable output (hscopes/issues/2). Diagnostics features may require another approach for implementation.

Release Notes

0.0.4

  • include guard support (ifndef define endif)
  • tests

0.0.3

  • support for preprocessor directive #include

0.0.2

  • experimental diagnostics implementation

0.0.1

  • initial release with more or less stable tokenization

Links which were useful during development

vscode-rrebnf's People

Contributors

vshilenkov avatar

Stargazers

 avatar

Watchers

 avatar  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.