diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-08-01 22:56:51 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-08-01 22:56:51 +0900 |
commit | 1fe733f82dd9ed2a3bf48a7d8fe8c9e0ee8a3965 (patch) | |
tree | ddb17e5a9726110ab485a79fccd1ecbcb53e0fca /driver/parser.go | |
parent | Write terminals to a description file (diff) | |
download | cotia-1fe733f82dd9ed2a3bf48a7d8fe8c9e0ee8a3965.tar.gz cotia-1fe733f82dd9ed2a3bf48a7d8fe8c9e0ee8a3965.tar.xz |
Use maleeni v0.3.0
Diffstat (limited to 'driver/parser.go')
-rw-r--r-- | driver/parser.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/parser.go b/driver/parser.go index fa89fcf..3af6a54 100644 --- a/driver/parser.go +++ b/driver/parser.go @@ -89,7 +89,7 @@ func (p *Parser) Parse() error { if tok.EOF { tsym = p.gram.ParsingTable.EOFSymbol } else { - tsym = p.gram.LexicalSpecification.Maleeni.KindToTerminal[tok.Mode.Int()][tok.Kind] + tsym = p.gram.LexicalSpecification.Maleeni.KindToTerminal[tok.KindID] } act := p.gram.ParsingTable.Action[p.top()*termCount+tsym] switch { @@ -192,7 +192,7 @@ func (p *Parser) nextToken() (*mldriver.Token, error) { return nil, fmt.Errorf("invalid token: %+v", tok) } - if skip[tok.Mode.Int()][tok.Kind] > 0 { + if skip[tok.KindID] > 0 { continue } |