diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2022-11-05 14:21:13 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2022-11-05 14:21:13 +0900 |
commit | b24f61a465d21af404ed647a977160042017e601 (patch) | |
tree | 0b695a6775ed6a0a7bb41404b598055855417673 /driver/parser.go | |
parent | Update README (diff) | |
download | urubu-b24f61a465d21af404ed647a977160042017e601.tar.gz urubu-b24f61a465d21af404ed647a977160042017e601.tar.xz |
Remove alias system
Remove unimportant features to tidy up the specification.
Diffstat (limited to 'driver/parser.go')
-rw-r--r-- | driver/parser.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/driver/parser.go b/driver/parser.go index 14e9752..b7f12ff 100644 --- a/driver/parser.go +++ b/driver/parser.go @@ -44,9 +44,6 @@ type Grammar interface { // Terminal retuns a string representaion of a terminal symbol. Terminal(terminal int) string - // TerminalAlias returns an alias for a terminal. - TerminalAlias(terminal int) string - // ASTAction returns an AST action entries. ASTAction(prod int) []int } @@ -370,11 +367,7 @@ func (p *Parser) searchLookahead(state int) []string { continue } - if alias := p.gram.TerminalAlias(term); alias != "" { - kinds = append(kinds, alias) - } else { - kinds = append(kinds, p.gram.Terminal(term)) - } + kinds = append(kinds, p.gram.Terminal(term)) } return kinds |