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

Epsilon is sometimes represented in (Plain Old ) as the Greek letter
itselff, the letter 'E' or 'e' or sometimes as '...' Different
BNF authors write it according to their own internal rules, apparently.
The fact of the symbol in BNF shows the rather tight coupling between a
notation and the underlying finite state machine tech used to actually
the strings in the . Really, it is just multiple states returned from the delta function.

#pobnf #bnf #grammar #parse #language #nfa #pda #dfa

Last updated 1 year ago