Skip to content
This repository has been archived by the owner on Jun 15, 2019. It is now read-only.

GerHobbelt/jison2json

 
 

Repository files navigation

jison2json [OBSOLETED]

build status

jison grammars come in two formats: JSON or a special text format similar to Bison's. This utility converts from the jison's format to JSON. See the json2jison for the reverse conversion.

deprecation notice

From today (2017/oct/15) the jison2json repository is obsolete for the jison2json package/codebase: the primary source is the jison monorepo's packages/jison2json/ directory. See also GerHobbelt/jison#16.

(For a comparable argument, see also "Why is Babel a monorepo?")

Issues, pull requests, etc. for jison2json should be filed there; hence we do not accept issue reports in this secondary repository any more.

This repository will track the primary source for a while still, but be very aware that this particular repository will always be lagging behind!

install

npm install @gerhobbelt/jison2json -g

build

To build the library yourself, follow the install & build directions of the monorepo.

usage

# single grammar
jison2json grammar.y

# or separate grammars
jison2json grammar.y lex.l

Or require it and convert programatically:

var jison2json = require('@gerhobbelt/jison2json');
var grammar = "%% foo: bar { return true; };";

var json = jison2json.convert(grammar);

license

MIT

About

grammar.y -> grammar.json

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 67.4%
  • HTML 16.9%
  • Makefile 15.7%