You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsers determine the if grammar rules start with an identifier followed by a symbol and dynamically set the terminal regular expressions accordingly. Subsequent rules must either all begin with an identifier, or only a symbol.
Of note in this implementation is that the tokenizer and parser are streaming, so that they can process inputs of arbitrary size.
35
34
@@ -96,7 +95,7 @@ The {EBNF::Writer} class can be used to write parsed grammars out, either as for
96
95
The formatted HTML results are designed to be appropriate for including in specifications.
97
96
98
97
### Parser Errors
99
-
On a parsing failure, and exception is raised with information that may be useful in determining the source of the error.
98
+
On a parsing failure, an exception is raised with information that may be useful in determining the source of the error.
100
99
101
100
## EBNF Grammar
102
101
The [EBNF][] variant used here is based on [W3C](https://w3.org/)[EBNF][]
@@ -116,7 +115,7 @@ which can also be proceeded by an optional number enclosed in square brackets to
116
115
117
116
[1] symbol ::= expression
118
117
119
-
(Note, this can introduce an ambiguity if the previous rule ends in a range or enum and the current rule has no number. In this case, enclosing `expression` within parentheses, or adding intervening comments can resolve the ambiguity.)
118
+
(Note, introduces an ambiguity if the previous rule ends in a range or enum and the current rule has no number. The parsers dynamically determine the terminal rules for the `LHS` (the identifier, symbol, and `::=`) and `RANGE`).
120
119
121
120
Symbols are written in CAPITAL CASE if they are the start symbol of a regular language (terminals), otherwise with they are treated as non-terminal rules. Literal strings are quoted.
0 commit comments