obermann / PEG4DOT

Parsing Expression Grammar (PEG) for GraphViz DOT file format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PEG4DOT

Parsing Expression Grammar (PEG, also PEG.js) for GraphViz DOT file format.

The GraphViz DOT file format as of the year 2020 has some inconsistencies. Details and the derivation of PEG can be found in PEG4DOT-Notes.html.

dot.pegjs semantics are not exactly the same as dot.peg. This dot.pegjs has small optimizations. To make it a validating parser follow the comments inside dot.pegjs. GrammKit autogenerated railroad diagram of dot.pegjs can be found in dot.pegjs.html. An example of using dot.pegjs (compiled as dot.js) can be found in https://github.com/obermann/vismm.

Resources

Ford, Bryan. (2004). Parsing Expression Grammars: A Recognition-Based Syntactic Foundation. ACM SIGPLAN Notices. 39. 111-122. 10.1145/964001.964011.

PEG.js Grammar Syntax and Semantics

PEG.js online parser generator for JavaScript

PEGSH - A Free Online PEG Syntax Highlighter

GrammKit

DOT in Wikipedia

Graphviz abstract grammar defining the DOT language

Prior Art

https://github.com/siefkenj/dotgraph

https://github.com/anvaka/dotparser

https://github.com/magjac/graphviz-visual-editor

https://github.com/dagrejs/graphlib-dot

https://github.com/gmamaladze/d3-dot-graph

https://github.com/eclipse/gef/tree/master/org.eclipse.gef.dot.ui/src/org/eclipse/gef/dot/internal/ui/conversion

About

Parsing Expression Grammar (PEG) for GraphViz DOT file format.

License:MIT License


Languages

Language:PEG.js 100.0%