In the second example under BNF ala T-SQL, am I missing something?
Let us also make it a requirement that when calling bar it demands further information, which can be accomplished via squiggly brackets. And if these arguments are not provided, then bar will assume a default value of constant “1” as indicated by an underline.
<foo>::= [<foo> |<bar>]
<bar>::= {1 | 2}
Where is the underline? I assume that the second line is really supposed to read:
<bar>::= {_1_ | 2}
but it would be nice to know.
Good writeup, otherwise!
Also, a somewhat off-topic question. Should one really be required to manually HTML-escape the less than and greater than signs, or am I doing something wrong?