From 61c306e8792f190f6ec720edf1b59cf80a5ad142 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Tue, 4 Jul 2023 12:06:06 +0300 Subject: [PATCH] doc/patterns-and-pitfalls.md: fix a typo --- doc/patterns-and-pitfalls.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/patterns-and-pitfalls.md b/doc/patterns-and-pitfalls.md index 94b17368..8ea1f5f1 100644 --- a/doc/patterns-and-pitfalls.md +++ b/doc/patterns-and-pitfalls.md @@ -96,7 +96,7 @@ Note that the rule for the lower precedence operators (`+` and `-`) invokes the #### 🐍 Ambiguous recursion -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.) +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.) ## Semantics