Code Monkey home page Code Monkey logo

ebnfdiagram's Introduction

EBNF-Diagram
------------
jQuery plugin that plots syntax diagrams (aka railroad diagrams) out of a formal syntax description.


Getting it
----------
You can checkout the source code at git://github.com/marc-portier/ebnfdiagram.git

  $ git pull git://github.com/marc-portier/ebnfdiagram.git


Building
--------
There is no real automated build in place, sorry for that. What you need to do is:

0. Get a js interpreter you can operate from the command line.

   We recommend rhino, the more interesting platforms have it on board or at least in the package repositories.

1. Build the parser

   mkdir -p target/js;
   cd tools/jscc; 
   rhino jscc.js -o ../../target/js/ebnf-jq.js ../../src/main/syntax/ebnf-jq.par; 
   cd -;


There is a limited automation of these build-steps captured in some bash files, they are provided as is:
  ./build.sh


Testing
-------
Just point your browser to test/webenv/test.html.

Add some syntax in the textarea and push the buttons.

TODO: we think about providing some qunit testing. 


Documentation
-------------
The code itself is currently your best source of documentation. 
Given the total size of the project source it might be hard to make a more condense variant :)

The default browser-testpage (see above) shows the diagram of the syntax the rendition expects as input.

Nevertheless, some extra simple usage documents might be wise about:
 * howto customize the vizuals
 * howto integrate its use on your own pages

Also: 
  * the src/desgin folder contains a scan of sketches that help explain how some of the internal drawing stuff is happening.
  * js/cc and jQuery provide more docs that might come around handy. Check the file CREDITS for pointers.


Future Work
-----------
Is coordinated through github
See: https://github.com/marc-portier/ebnfdiagram

Next to the things you already thought of yourself, here is a short list of things to be added:
 * better build framework - and make it cross platform 
 * better jQuery usage: 
   * provide some automatic way to have pre/@class="ebnf" elements replaced with the diagram canvas

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.