0.2.1 • Published 5 years ago

@statebox/pnpro.js v0.2.1

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
github
Last release
5 years ago

PNPRO.js

Assuming you have a string with the contents of a .PNPRO file in xmlDocument,

let parse = require('@statebox/pnpro.js')
let result = parse(xmlDocument)

Output format for parse:

  • title: project title, string
  • nets: array of nets
    • name: net name
    • places: array of places
      • name: place name/identifier
      • x, y: screen coordinates
      • marking: nr of tokens in this place (initial marking)
    • transitions: array of transitions
      • name: transition name
      • pre, post: dictionary of in/out arcs, place name => weight
      • x,y: screen coordinates
    • nll: list of pairs of list of place indices
    • nbpt: zero padded version of the nll list