Are there any very minimal #flex / #bison like things that will produce a self-contained parser (maybe in a single function, no libraries) for a very small #ABNF or equivalent. #libpcap has grown a slightly complex capture source definition as it moves to mainstream the #rpcap mechanism. It used to be just "eth0" or "de0", but now there are many more things. Probably a superset of URN-syntax.

No tool available on the entire Internet that can convert an ABNF grammar to an EBNF grammar. 🤔

#ABNF #EBNF

@sethmlarson It seems to fail on most ABNF files. Could you share what ABNF input you provided to get the railroad diagrams you had in the post?

I tried running it on the `examples/abnf.abnf` it ships with and that produced nothing:

kgt -l abnf -e rrtext < examples/abnf.abnf

#ABNF #kgt #RailroadDiagram

There is not a single tool on the entire Internet to convert ABNF grammar to railroad diagrams. 🙄

PS: https://github.com/katef/kgt is the only one that claims to do this, but fails on its own example ABNF files.

#ABNF #RailroadDiagram

GitHub - katef/kgt: BNF wrangling and railroad diagrams

BNF wrangling and railroad diagrams. Contribute to katef/kgt development by creating an account on GitHub.

GitHub

Does anyone know what “flavor” of #ABNF / #EBNF this is written in? The table heading says “EBNF,” while the paragraph above references “ABNF,” but it appears to use a format that’s different from what’s defined in RFC 5234 or ISO/IEC 14977:1996.

https://www.unicode.org/reports/tr35/#unicode-locale-identifier

I could make assumptions about some of these characters, but I’d rather be as explicit as possible.

#Unicode #CLDR #LDML #TR35

Unicode Locale Data Markup Language (LDML)

As a frequent consumer (and dare I say... enjoyer!) of #ABNF I can't believe I hadn't stumbled across this delightful little tool yet:

https://github.com/katef/kgt

Makes cute little UTF-8 diagrams right in your terminal 

GitHub - katef/kgt: BNF wrangling and railroad diagrams

BNF wrangling and railroad diagrams. Contribute to katef/kgt development by creating an account on GitHub.

GitHub
The Jevko Syntax: Standard Grammar Specification

#EBNF is a #publicdomain EBNF #parser generator for #Ruby.

EBNF parses EBNF (Extended Backus-Naur Form) and BNF grammars that can be then translated into other forms, like S-Expressions, #ABNF, #HTML, and Ruby code. EBNF supports #PEG/#Packrat operation as well as LL(1) operation.

Website 🔗️: https://github.com/dryruby/ebnf

#free #opensource #foss #fossmendations #programming

GitHub - dryruby/ebnf: EBNF parser and generic parser generator for Ruby.

EBNF parser and generic parser generator for Ruby. - dryruby/ebnf

GitHub