aboutsummaryrefslogtreecommitdiff
path: root/driver/parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'driver/parser.go')
-rw-r--r--driver/parser.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/driver/parser.go b/driver/parser.go
index dbebec3..14e9752 100644
--- a/driver/parser.go
+++ b/driver/parser.go
@@ -5,9 +5,6 @@ import (
)
type Grammar interface {
- // Class returns a class of grammar.
- Class() string
-
// InitialState returns the initial state of a parser.
InitialState() int
@@ -88,7 +85,7 @@ type SyntaxError struct {
type ParserOption func(p *Parser) error
-// DisableLAC disables LAC (lookahead correction). When the grammar has the LALR class, LAC is enabled by default.
+// DisableLAC disables LAC (lookahead correction). LAC is enabled by default.
func DisableLAC() ParserOption {
return func(p *Parser) error {
p.disableLAC = true
@@ -121,10 +118,6 @@ func NewParser(toks TokenStream, gram Grammar, opts ...ParserOption) (*Parser, e
stateStack: &stateStack{},
}
- if p.gram.Class() != "lalr" {
- p.disableLAC = true
- }
-
for _, opt := range opts {
err := opt(p)
if err != nil {