Debian Codegraph @

example/usercontext/parser/productionstable.go

raw symbols SCIP
1 // Code generated by gocc; DO NOT EDIT.
2
3 package parser
4
5 import "github.com/goccmack/gocc/example/usercontext/ast"
6
7 type (
8 ProdTab [numProductions]ProdTabEntry
9 ProdTabEntry struct {
10 String string
11 Id string
12 NTType int
13 Index int
14 NumSymbols int
15 ReduceFunc func([]Attrib, interface{}) (Attrib, error)
16 }
17 Attrib interface {
18 }
19 )
20
21 var productionsTable = ProdTab{
22 ProdTabEntry{
23 String: `S' : Grammar << >>`,
24 Id: "S'",
25 NTType: 0,
26 Index: 0,
27 NumSymbols: 1,
28 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
29 return X[0], nil
30 },
31 },
32 ProdTabEntry{
33 String: `Grammar : Words "...42..." << X[0], nil >>`,
34 Id: "Grammar",
35 NTType: 1,
36 Index: 1,
37 NumSymbols: 2,
38 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
39 return X[0], nil
40 },
41 },
42 ProdTabEntry{
43 String: `Words : capitalized << >>`,
44 Id: "Words",
45 NTType: 2,
46 Index: 2,
47 NumSymbols: 1,
48 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
49 return X[0], nil
50 },
51 },
52 ProdTabEntry{
53 String: `Words : Words capitalized << >>`,
54 Id: "Words",
55 NTType: 2,
56 Index: 3,
57 NumSymbols: 2,
58 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
59 return X[0], nil
60 },
61 },
62 ProdTabEntry{
63 String: `Words : lowercase << ast.NewIdentifier(X[0], C) >>`,
64 Id: "Words",
65 NTType: 2,
66 Index: 4,
67 NumSymbols: 1,
68 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
69 return ast.NewIdentifier(X[0], C)
70 },
71 },
72 ProdTabEntry{
73 String: `Words : Words lowercase << ast.NewIdentifier(X[1], C) >>`,
74 Id: "Words",
75 NTType: 2,
76 Index: 5,
77 NumSymbols: 2,
78 ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
79 return ast.NewIdentifier(X[1], C)
80 },
81 },
82 }