Skip to content

Badly rendered railroad diagram #477

@sammorley-short

Description

@sammorley-short

I’m trying to generate a pyparsing grammar railroad diagram, as described here, but when I run the example script the render comes out wrong with all these black boxes.

Script:

from pyparsing import Word, nums, alphas

street_address = Word(nums).set_name("house_number") + Word(alphas)[1, ...].set_name("street_name")
street_address.set_name("street_address")
street_address.create_diagram("street_address_diagram.html")

Render:

Screenshot 2023-04-12 at 22 57 17

(To install, I ran pip install "pyparsing[diagrams]")

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions