Ben Ramsey :enfys: · @ramsey
3367 followers · 7369 posts · Server phpc.social

Does anyone know what “flavor” of / 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.

unicode.org/reports/tr35/#unic

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

#abnf #ebnf #unicode #cldr #ldml #tr35

Last updated 1 year ago

Ed Howland · @edhowland
5 followers · 108 posts · Server fosstodon.org

With , we have no need of Epsilon here. The followed by the
'*' operator simply means 0 or more of the preceding thing, here: The ElIfClause.
And for completeness: (else Statements)? means 0 or 1 of the preceding group making them optional.
Many times when trying to model your language syntax in , you are forced
to break out a new NonTerminal, and to supply a alternate Epsilon.
Often, you can avoid this with grouping and '*', '+' or '?'.
Where is E used in

#ebnf #nonterminal #bnf

Last updated 1 year ago

Ed Howland · @edhowland
5 followers · 106 posts · Server fosstodon.org

But introduces a more succint representation. Esp. w/the Kleene star '*''.
Let's look at a broken version of the syntax of 's if/then/elif syntax:
:
IfStmt ::= if BoolExpr then Statements ElIfClause ElseClause fi
ElIfClause ::= elif BoolExpr then Statements
| ...
:
IfStmt ::= if BoolExpr then Statements ElIfClause* (else Statements)? fi
ElIfClause ::= elif BoolExpr then Statements
ElseClause ::= else Statements
(Whitespace elided)

#ebnf #bash #pobnf

Last updated 1 year ago

Ed Howland · @edhowland
5 followers · 105 posts · Server fosstodon.org

Sometime back, I was working on a presentation re: and had this epiphany.
The Epsilon transition was nothing to be spooked about.
For those who might not be aware: Epsilon is a terminal symbol that might
occur in a production. (A pox on my younger doofus self who thought it was the empty string).
It actually introduces nondeterminism into the rules.
The insight was that with its regex-like symbols has no need of Epsilon.
Read on ...

#bnf #grammar #ebnf #parser #compiler #syntax

Last updated 1 year ago

Rich Apodaca · @rapodaca
51 followers · 77 posts · Server fosstodon.org

I'm making a tiny change to the Balsa grammar to reject strings with terminating branches (e.g., "CCC(C)" and "CCC(C).O"). They should never be needed and just complicate canonicalization.

Working paper at: chemrxiv.org/engage/chemrxiv/a

#ebnf #Cheminformatics

Last updated 2 years ago

Puppy Pi · @codepuppy
184 followers · 6705 posts · Server mathstodon.xyz

Can all Context-Free Grammars be described in Backus-Naur Form/Syntax?

Is BNF a "form" like Chomsky Normal Form or Greiback Normal Form, or is it just a "syntax" that can encode all CFG's and all BNF documents describe a CFG (a bijective encoding)?

The internet only tells me things that are so Basic I don't trust them to know about such questions, or so advanced they already assume I know the answer to this X'D





#parsers #parsing #BackusNaur #ebnf #bnf #ContextFreeGrammar #FormalGrammars #math

Last updated 2 years ago

Jevko · @jevko
12 followers · 37 posts · Server layer8.space