diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-09-03 17:09:03 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-09-03 17:09:03 +0900 |
commit | ad35bf24d80c36b3847538cf846d35de7751f7f2 (patch) | |
tree | d503defc8467d08c89a47f568bb9a3bebf8ab8b2 | |
parent | Add tests for LAC (diff) | |
download | urubu-ad35bf24d80c36b3847538cf846d35de7751f7f2.tar.gz urubu-ad35bf24d80c36b3847538cf846d35de7751f7f2.tar.xz |
Use the LALR by default when using grammar.Compile instead of the CLI
-rw-r--r-- | grammar/grammar.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/grammar/grammar.go b/grammar/grammar.go index 7e86ea8..1080e53 100644 --- a/grammar/grammar.go +++ b/grammar/grammar.go @@ -977,7 +977,9 @@ func SpecifyClass(class Class) CompileOption { } func Compile(gram *Grammar, opts ...CompileOption) (*spec.CompiledGrammar, error) { - config := &compileConfig{} + config := &compileConfig{ + class: ClassLALR, + } for _, opt := range opts { opt(config) } |