Skip to content

pg-format/pg-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PG formatter

This repository contains a parser and formatter of PG format for labeled property graphs and a web application to validate, format, and visualize PG format.

PG format is a text-based serialization of labeled property graphs. See PG specification and PG homepage for details.

Usage

The web application is started via index.html, just open the file in a web browser.

  • Query parameter pg can be used to pass a graph in PG format.
  • The "permalink" links to the current page with current editor content.
  • Examples from directory examples can be loaded by selecting from a dropdown.
  • A formatted variant or PG-JSONL can be selected to be shown at the right.

Development

To re-generate the code, install dependencies (npm install) and run:

  • npm run peggy to update the parser from src/pg.pegjs
  • npm run webpack to update the web application
  • nom run docs to update the grammar in EBNF form

Run npm test to execute unit tests.

License

The source code is licensed under MIT License.

References