Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
RHarryH committed Dec 30, 2022
1 parent bc8b888 commit 14a2a98
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ as simple precedence grammar have to met following conditions:
- does not have conflicts in precedence table

However, when conflicts are detected, grammar might be considered as weak-precedence grammar. This kind of grammar accepts
conflict between ⋖ and ≐ precedences, merging them into single ⩿ precedence. Some sources add extra requirements for this
kind of grammars but this tool selects just the longest matching production. Therefore, both simple precedence and weak-precedence
grammars can be parsed by single parser implementation.
conflict between ⋖ and ≐ precedences, merging them into single ⩿ precedence when extra condition is true:
- `A -> aXb` and `B -> b` are productions and there are no relations `X ⋖ B` and `X ≐ B` (or simply `X ⩿ B`). In other words none of the production's right-hand side is a tail of another production's right-hand side.

Parser for weak-precedence grammar selects the longest matching production. Both simple precedence and weak-precedence
grammars are parsed by single parser implementation.

### Lexeme notation

Expand Down

0 comments on commit 14a2a98

Please sign in to comment.