Skip to content

Commit

Permalink
Merge pull request #52 from shitpoet/patch-1
Browse files Browse the repository at this point in the history
Update Priority.md
  • Loading branch information
jurgenvinju authored May 27, 2024
2 parents d74a7c8 + 00c5651 commit 7e5b402
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ Here a number of strings for this language, with brackets to show how they will

* Please do not assume that Rascal's priorities have the same semantics as SDF's priorities.
* When a priority does not have a filtering effect, such as in `E = E "+" > E "*"` it is usually better to use normal alternative composition: `E = E "+" | E "*"`. There is no difference in the semantics of parsing, but the latter expression is more intentional.
* You should not hide right or left recursion behind a nullable non-terminal, since the system will not filter the ambiguity then. Example:
* You should not hide right or left recursion behind a nullable terminal, since the system will not filter the ambiguity then. Example:
`E = left "a"? E "*" E > E "+" E` will remain ambiguous. This should be written as: `E = left ("a" E "*" E | E "*" E ) > E "+" E;` (unfolding the optional such that E becomes explicitly left-most).

0 comments on commit 7e5b402

Please sign in to comment.