aboutsummaryrefslogtreecommitdiff
path: root/driver/parser.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-08-01 22:56:51 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-08-01 22:56:51 +0900
commit1fe733f82dd9ed2a3bf48a7d8fe8c9e0ee8a3965 (patch)
treeddb17e5a9726110ab485a79fccd1ecbcb53e0fca /driver/parser.go
parentWrite terminals to a description file (diff)
downloadcotia-1fe733f82dd9ed2a3bf48a7d8fe8c9e0ee8a3965.tar.gz
cotia-1fe733f82dd9ed2a3bf48a7d8fe8c9e0ee8a3965.tar.xz
Use maleeni v0.3.0
Diffstat (limited to 'driver/parser.go')
-rw-r--r--driver/parser.go4
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
}