Skip to content

duplotech/dotparser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotparser

Parser of GraphViz dot file format.

Build Status

usage

 var parse = require('dotparser');
 var ast = parse('graph g {}');

 // ast is now an abstract syntax tree of an empty graph:
 // [{
 //   "type": "graph",
 //   "children": null,
 //   "id": "g"
 // }]

why?

The produced output is not bound to any specific graph library. It can be used by graph library authors to transform dot files into their own graph representation.

This implementation is capable of parsing all graphs from standard graphviz test suite.

install

With npm do:

npm install dotparser

compiling grammar

If you've changed grammar and want to have an updated parser, run this:

npm start

This will generate a new parser and save it into grammar/dot.js file

license

MIT

About

Parser of GraphViz dot file format

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%