diff options
Diffstat (limited to 'libparser.7')
| -rw-r--r-- | libparser.7 | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/libparser.7 b/libparser.7 index 2d921a7..c50b5c9 100644 --- a/libparser.7 +++ b/libparser.7 @@ -88,12 +88,14 @@ integer = _decimal | _hexadecimal; (* May not exceed 255. *) _low = character | integer; _high = character | integer; +nondeterministic = \(dq?\(dq; + committed = \(dq+\(dq, _, _operand; rejection = \(dq!\(dq, _, _operand; concatenation = _operand, {_, \(dq,\(dq, _, _operand}; -alternation = concatenation, {_, \(dq|\(dq, _, concatenation}; -optional = \(dq[\(dq, _, _expression, _, \(dq]\(dq; -repeated = \(dq{\(dq, _, _expression, _, \(dq}\(dq; +alternation = concatenation, {_, [nondeterministic], \(dq|\(dq, _, concatenation}; +optional = [nondeterministic], \(dq[\(dq, _, _expression, _, \(dq]\(dq; +repeated = [nondeterministic], \(dq{\(dq, _, _expression, _, \(dq}\(dq; group = \(dq(\(dq, _, _expression, _, \(dq)\(dq; char-range = \(dq<\(dq, _, _low, _, \(dq,\(dq, _, _high, \(dq_\(dq, \(dq>\(dq; exception = \(dq-\(dq; @@ -132,18 +134,18 @@ Optional symbols are taken whenever possible. Concatenation has higher precedence than alternation, groups .RB (\(dq ( "\(dq, ..., \(dq" ) \(dq) -have no semantic meaning and are useful only to put a -alternation inside a concatenation without creating a -new rule for that. +have no semantic meaning and are useful only for including +alternations inside concatenations or put alternations +or concatenations inside a commitment or rejection. .PP -The parser is non-deterministic, which can make it really -slow. The speed up parsing, you can add commits. Once the -committed sentence has been matched, the branching-points -inside it are unrecorded, so when the parser backtracks, -it will not try different choices inside the committed -sentence. Commit sentences are undone by the parser when -it backtracks to a branching-point outside the committed -sentence. +The parser has the ability to be non-deterministic, which +can make it really slow. The speed up parsing, you can add +commits. Once the committed sentence has been matched, +the branching-points inside it are unrecorded, so when +the parser backtracks, it will not try different choices +inside the committed sentence. Commit sentences are undone +by the parser when it backtracks to a branching-point +outside the committed sentence. .PP In character ranges, the .B _high |
