8000 Feature Request: Configurable "equality" symbol in production rule · Issue #29 · katef/kgt · GitHub
[go: up one dir, main page]

Skip to content

Feature Request: Configurable "equality" symbol in production rule #29

Open

Description

@GavinHigham

Many grammars use different equality symbols to separate the left and right sides of a production rule:
symbol ::= replacement
symbol = replacement
symbol → replacement

If this symbol was configurable, it would make it easier to use these grammars with the tool.

Activity

  1. changed the title [-]Configurable "equality" symbol in production rule[/-] [+]Feature Request: Configurable "equality" symbol in production rule[/+] on Sep 18, 2020
  2. katef commented on Sep 20, 2020

    @katef
    Owner

    I wonder if it would make sense to attempt to provide a "generic" BNF dialect, where this (and #28 and other aspects) are configurable. This might be enough to deal with W3C, lua, the C standard and a few other "casual" dialects.

    The only dialects implemented currently are standardised ones - that is, formally specified by a particular standards body. I've resisted adding an add-hoc dialect, because of course everybody writes theirs differently. Details like escapes within strings get difficult. But I can imagine exposing a bunch of settings like this.

    Maybe the syntax is fixed, but the lexing is configurable?

  3. mingodad commented on Mar 24, 2021

    @mingodad

    Look here for how this project seems to manage configuration: https://github.com/gotthardp/bnfparser2/tree/master/parser/share/syntax

  4. mingodad commented on Mar 25, 2021

    @mingodad

    Also would be nice if kgt could support the EBNF supported by https://www.bottlecaps.de/rr/ui I did converted several (64) grammars to it here https://github.com/mingodad/plgh and would like to have then been managed by kgt

    tree-sitter-abnf.ebnf
    tree-sitter-agda.ebnf
    tree-sitter-bash.ebnf
    tree-sitter-beancount.ebnf
    tree-sitter-carp.ebnf
    tree-sitter-c.ebnf
    tree-sitter-clojure.ebnf
    tree-sitter-cpp.ebnf
    tree-sitter-c-sharp.ebnf
    tree-sitter-css.ebnf
    tree-sitter-dart.ebnf
    tree-sitter-elm.ebnf
    tree-sitter-embedded-template.ebnf
    tree-sitter-eno.ebnf
    tree-sitter-erlang.ebnf
    tree-sitter-fennel.ebnf
    tree-sitter-fortran.ebnf
    tree-sitter-go.ebnf
    tree-sitter-graphql.ebnf
    tree-sitter-haskel.ebnf
    tree-sitter-html.ebnf
    tree-sitter-janet.ebnf
    tree-sitter-java.ebnf
    tree-sitter-javascript.ebnf
    tree-sitter-jsdoc.ebnf
    tree-sitter-julia.ebnf
    tree-sitter-kotlin.ebnf
    tree-sitter-lbnf.ebnf
    tree-sitter-lean.ebnf
    tree-sitter-ledger.ebnf
    tree-sitter-lua.ebnf
    tree-sitter-markdown.ebnf
    tree-sitter-menhir.ebnf
    tree-sitter-minizinc.ebnf
    tree-sitter-nim.ebnf
    tree-sitter-nix.ebnf
    tree-sitter-perl.ebnf
    tree-sitter-php.ebnf
    tree-sitter-powershell.ebnf
    tree-sitter-prolog.ebnf
    tree-sitter-python.ebnf
    tree-sitter-ql.ebnf
    tree-sitter-reason.ebnf
    tree-sitter-r.ebnf
    tree-sitter-regex.ebnf
    tree-sitter-ruby.ebnf
    tree-sitter-rust.ebnf
    tree-sitter-scala.ebnf
    tree-sitter-sexp.ebnf
    tree-sitter-sml.ebnf
    tree-sitter-sourcepawn.ebnf
    tree-sitter-sparql.ebnf
    tree-sitter-stan.ebnf
    tree-sitter-svelte.ebnf
    tree-sitter-swift.ebnf
    tree-sitter-systemrdl.ebnf
    tree-sitter-teal.ebnf
    tree-sitter-toml.ebnf
    tree-sitter-turtle.ebnf
    tree-sitter-verilog.ebnf
    tree-sitter-vhdl.ebnf
    tree-sitter-vue.ebnf
    tree-sitter-wasm-wast.ebnf
    tree-sitter-yaml.ebnf
    tree-sitter-zig.ebnf
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0