Skip to content

Grammar railroad diagram #41

@mingodad

Description

@mingodad

I've just added the grammar/lexer of this project to https://mingodad.github.io/parsertl-playground/playground/ an Yacc/Lex compatible online editor/interpreter (select Qasm parser (be patient) (partially working) from Examples then click Parse to see a parse tree for the content in Input source) and also generated an EBNF understood by https://github.com/GuntherRademacher/rr to generate a nice navigable railroad diagram (see next comment with instructions at the top).

In doing so I've noticed that the lexer seems to be reused from another project and has several unused tokens and several duplicates for other tokens, the parser grammar seems to be generated from a tool that inline/expand several rules (maybe https://github.com/BNFC/bnfc ?) what make the grammar bigger and slower.

I hope https://mingodad.github.io/parsertl-playground/playground/ can help develop/test/debug this project grammar.

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