From f89d021bbe134e3efa0d015a41e9712960cdd009 Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Sun, 6 Nov 2022 21:31:46 +0900 Subject: Import source code of lexer generator From: https://github.com/nihei9/maleeni --- cmd/vartan/parse.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/vartan/parse.go') diff --git a/cmd/vartan/parse.go b/cmd/vartan/parse.go index ed35a60..f21a03b 100644 --- a/cmd/vartan/parse.go +++ b/cmd/vartan/parse.go @@ -7,7 +7,7 @@ import ( "os" "strings" - "github.com/nihei9/vartan/driver" + driver "github.com/nihei9/vartan/driver/parser" spec "github.com/nihei9/vartan/spec/grammar" "github.com/nihei9/vartan/tester" "github.com/spf13/cobra" @@ -172,7 +172,7 @@ func writeSyntaxErrorMessage(b *strings.Builder, cgram *spec.CompiledGrammar, sy case tok.Invalid(): fmt.Fprintf(b, "'%v' ()", string(tok.Lexeme())) default: - if kind := cgram.ParsingTable.Terminals[tok.TerminalID()]; kind != "" { + if kind := cgram.Syntactic.Terminals[tok.TerminalID()]; kind != "" { fmt.Fprintf(b, "'%v' (%v)", string(tok.Lexeme()), kind) } else { fmt.Fprintf(b, "'%v'", string(tok.Lexeme())) -- cgit v1.2.3