# dotparser

> Parser of GraphViz dot file format

Latest version **1.1.1** (published 2022-06-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install dotparser
pnpm add dotparser
yarn add dotparser
bun add dotparser
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-06-08 |
| First published | 2014-12-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 310.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 83 |
| Author | Andrei Kashcha |
| Maintainers | anvaka |
| Keywords | dot, xdot, graphviz, parser, ast |

## Links

- npm: https://www.npmjs.com/package/dotparser
- Repository: https://github.com/anvaka/dotparser
- Homepage: https://github.com/anvaka/dotparser#readme
- Issues: https://github.com/anvaka/dotparser/issues
- npm.io page: https://npm.io/package/dotparser

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2022-06-08
- 1.1.0 — 2021-09-04
- 1.0.0 — 2019-12-28
- 0.4.0 — 2019-01-19
- 0.3.0 — 2018-11-08
- 0.2.1 — 2018-09-03
- 0.2.0 — 2018-08-31
- 0.1.3 — 2015-10-06
- 0.1.2 — 2015-04-05
- 0.1.1 — 2015-01-01
- 0.1.0 — 2014-12-31

## README

# dotparser

Parser of GraphViz dot file format.

 [![Build Status](https://github.com/anvaka/dotparser/actions/workflows/tests.yaml/badge.svg)](https://github.com/anvaka/dotparser/actions/workflows/tests.yaml)

# usage

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

 // ast is now an abstract syntax tree of an empty graph:
 // [{
 //   "type": "graph",
 //   "children": [],
 //   "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](https://github.com/ellson/graphviz/tree/master/rtest/graphs).

# install

With [npm](https://npmjs.org) 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

---
_Source: https://npm.io/package/dotparser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
