aboutsummaryrefslogtreecommitdiff
path: root/grammar/item.go
diff options
context:
space:
mode:
Diffstat (limited to 'grammar/item.go')
-rw-r--r--grammar/item.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/grammar/item.go b/grammar/item.go
index 153aea4..100d920 100644
--- a/grammar/item.go
+++ b/grammar/item.go
@@ -195,4 +195,10 @@ type lrState struct {
// s → ・A
// s → ・ε
emptyProdItems []*lrItem
+
+ // When isErrorTrapper is `true`, the item can shift the `error` symbol. The item has the following form.
+ // The `α` and `β` can be empty.
+ //
+ // A → α・error β
+ isErrorTrapper bool
}