Debian Codegraph @

internal/test/t1/parser/productionstable.go

raw symbols SCIP
1 // Code generated by gocc; DO NOT EDIT.
2
3 package parser
4
5 type (
6 ProdTab [numProductions]ProdTabEntry
7 ProdTabEntry struct {
8 String string
9 Id string
10 NTType int
11 Index int
12 NumSymbols int
13 ReduceFunc func([]Attrib, interface{}) (Attrib, error)
14 }
15 Attrib interface {
16 }
17 )
18
19 var productionsTable = ProdTab{
20 ProdTabEntry{
21 String: `S' : A << >>`,
22 Id: "S'",
23 NTType: 0,
24 Index: 0,
25 NumSymbols: 1,
26 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
27 return X[0], nil
28 },
29 },
30 ProdTabEntry{
31 String: `A : B "c" << []interface{}{X[0], "c"}, nil >>`,
32 Id: "A",
33 NTType: 1,
34 Index: 1,
35 NumSymbols: 2,
36 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
37 return []interface{}{X[0], "c"}, nil
38 },
39 },
40 ProdTabEntry{
41 String: `B : empty << >>`,
42 Id: "B",
43 NTType: 2,
44 Index: 2,
45 NumSymbols: 0,
46 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
47 return nil, nil
48 },
49 },
50 ProdTabEntry{
51 String: `B : "b" << "b", nil >>`,
52 Id: "B",
53 NTType: 2,
54 Index: 3,
55 NumSymbols: 1,
56 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
57 return "b", nil
58 },
59 },
60 }