aboutsummaryrefslogtreecommitdiff
path: root/spec/test/tree_parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'spec/test/tree_parser.go')
-rw-r--r--spec/test/tree_parser.go35
1 files changed, 1 insertions, 34 deletions
diff --git a/spec/test/tree_parser.go b/spec/test/tree_parser.go
index bcbe382..0e834ae 100644
--- a/spec/test/tree_parser.go
+++ b/spec/test/tree_parser.go
@@ -46,9 +46,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
}
@@ -372,11 +369,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
@@ -429,7 +422,6 @@ type grammarImpl struct {
nonTerminals []string
lhsSymbols []int
terminals []string
- terminalAliases []string
astActions [][]int
}
@@ -549,27 +541,6 @@ func NewGrammar() *grammarImpl {
"escape_char",
"interpreted_string_close",
},
- terminalAliases: []string{
- "",
- "",
- "",
- "",
- "(",
- ")",
- "",
- "",
- "",
- "",
- "\"",
- "",
- "\\u",
- "{",
- "}",
- "",
- "",
- "\\",
- "\"",
- },
astActions: [][]int{
nil,
nil,
@@ -676,10 +647,6 @@ func (g *grammarImpl) Terminal(terminal int) string {
return g.terminals[terminal]
}
-func (g *grammarImpl) TerminalAlias(terminal int) string {
- return g.terminalAliases[terminal]
-}
-
func (g *grammarImpl) ASTAction(prod int) []int {
return g.astActions[prod]
}