Giter Site home page Giter Site logo

floffah / better-nearley-railroad Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 102 KB

An alternative to the built in nearley-railroad tool that adds a few more cool and useful features

License: MIT License

JavaScript 29.54% Nearley 13.96% TypeScript 47.60% HTML 8.90%
nearley railroad diagram generator

better-nearley-railroad's Introduction

better-nearley-railroad

An alternative to the built in nearley-railroad that is recursive and allows for templates.

  1. How to use
  2. Features

How to use

Although this library generates a single page, it does organise it (kind of)

The order of rules generated are in order from when it found them starting from the entry rule.

To get this working all you need to do is run npm install better-nearley-railroad && npx nearley-rr path-to-grammar.js out-file.html

See an example of the output here

However if you wish to use your own template you can pass the --config option along with a relative path to a file that may look like

{
  "template": "node_modules/better-nearley-railroad/template"
}

It is as easy as that!

Features

All of the built in nearley-railroad features plus:

  • Templates (which allow you to write your own javascript)
  • Recursive rules (Doesn't just use rules from a single file, gets them from all files)
  • The github repository is equipped with CodeQL scanning for better security.
  • And more to come! Suggest them by creating a suggestion issue.

better-nearley-railroad's People

Contributors

floffah avatar spenserblack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.