But #EBNF introduces a more succint representation. Esp. w/the Kleene star '*''.
Let's look at a broken version of the syntax of #Bash's if/then/elif syntax:
#POBNF:
IfStmt ::= if BoolExpr then Statements ElIfClause ElseClause fi
ElIfClause ::= elif BoolExpr then Statements
| ...
#EBNF:
IfStmt ::= if BoolExpr then Statements ElIfClause* (else Statements)? fi
ElIfClause ::= elif BoolExpr then Statements
ElseClause ::= else Statements
(Whitespace elided)
Epsilon is sometimes represented in #POBNF (Plain Old #BNF) 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 #grammar
notation and the underlying finite state machine tech used to actually #parse
the strings in the #language. Really, it is just multiple states returned from the delta function. #NFA #PDA #DFA
#pobnf #bnf #grammar #parse #language #nfa #pda #dfa