Skip to content

Commit 802abda

Browse files
committed
doc/patterns-and-pitfalls.md: fix a typo
1 parent 39ccead commit 802abda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/patterns-and-pitfalls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Note that the rule for the lower precedence operators (`+` and `-`) invokes the
9696

9797
#### 🐍 Ambiguous recursion
9898

99-
Notice that in the arithmetic grammar above, `mulExp` appears on the right hand side of all of `addExp`'s cases. Be careful that you don't write rules that are "ambiguously recursive", e.g. `addExp = addExp "+" addExp`. If you write your grammar like this, a reader can't tell whether `+` is left-associative or right-associative. (In Ohm, you will actually get a right-assiciative parse — see [#56](https://github.com/ohmjs/ohm/issues/56) for details.)
99+
Notice that in the arithmetic grammar above, `mulExp` appears on the right hand side of all of `addExp`'s cases. Be careful that you don't write rules that are "ambiguously recursive", e.g. `addExp = addExp "+" addExp`. If you write your grammar like this, a reader can't tell whether `+` is left-associative or right-associative. (In Ohm, you will actually get a right-associative parser — see [#56](https://github.com/ohmjs/ohm/issues/56) for details.)
100100

101101
## Semantics
102102

0 commit comments

Comments
 (0)