-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
66 lines (43 loc) · 2.04 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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