summaryrefslogtreecommitdiff
path: root/src/cmd/gc/yerr.h
blob: d0dd639ff3d82403be8801f5f7b8dc32cfe6eb07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Copyright 2010 The Go Authors.  All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Example-based syntax error messages.
// See bisonerrors, Makefile, go.y.

static struct {
	int yystate;
	int yychar;
	char *msg;
} yymsg[] = {
	// Each line of the form % token list
	// is converted by bisonerrors into the yystate and yychar caused
	// by that token list.

	{222, ',',
	"unexpected comma during import block"},

	{32, ';',
	"missing import path; require quoted string"},

	{380, ';',
	"missing { after if clause"},

	{401, ';',
	"missing { after switch clause"},

	{239, ';',
	"missing { after for clause"},

	{478, LBODY,
	"missing { after for clause"},

	{22, '{',
	"unexpected semicolon or newline before {"},

	{145, ';',
	"unexpected semicolon or newline in type declaration"},

	{37, '}',
	"unexpected } in channel type"},
	
	{37, ')',
	"unexpected ) in channel type"},
	
	{37, ',',
	"unexpected comma in channel type"},

	{441, LELSE,
	"unexpected semicolon or newline before else"},

	{259, ',',
	"name list not allowed in interface type"},

	{239, LVAR,
	"var declaration not allowed in for initializer"},

	{65, '{',
	"unexpected { at end of statement"},

	{379, '{',
	"unexpected { at end of statement"},
	
	{126, ';',
	"argument to go/defer must be function call"},
	
	{428, ';',
	"need trailing comma before newline in composite literal"},
	
	{439, ';',
	"need trailing comma before newline in composite literal"},
	
	{113, LNAME,
	"nested func not allowed"},

	{647, ';',
	"else must be followed by if or statement block"}
};