github.com/bgentry/go@v0.0.0-20150121062915-6cf5a733d54d/src/cmd/gc/yerr.h (about)

     1  // Copyright 2010 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Example-based syntax error messages.
     6  // See bisonerrors, Makefile, go.y.
     7  
     8  static struct {
     9  	int yystate;
    10  	int yychar;
    11  	char *msg;
    12  } yymsg[] = {
    13  	// Each line of the form % token list
    14  	// is converted by bisonerrors into the yystate and yychar caused
    15  	// by that token list.
    16  
    17  	{222, ',',
    18  	"unexpected comma during import block"},
    19  
    20  	{32, ';',
    21  	"missing import path; require quoted string"},
    22  
    23  	{380, ';',
    24  	"missing { after if clause"},
    25  
    26  	{401, ';',
    27  	"missing { after switch clause"},
    28  
    29  	{239, ';',
    30  	"missing { after for clause"},
    31  
    32  	{478, LBODY,
    33  	"missing { after for clause"},
    34  
    35  	{22, '{',
    36  	"unexpected semicolon or newline before {"},
    37  
    38  	{145, ';',
    39  	"unexpected semicolon or newline in type declaration"},
    40  
    41  	{37, '}',
    42  	"unexpected } in channel type"},
    43  	
    44  	{37, ')',
    45  	"unexpected ) in channel type"},
    46  	
    47  	{37, ',',
    48  	"unexpected comma in channel type"},
    49  
    50  	{441, LELSE,
    51  	"unexpected semicolon or newline before else"},
    52  
    53  	{259, ',',
    54  	"name list not allowed in interface type"},
    55  
    56  	{239, LVAR,
    57  	"var declaration not allowed in for initializer"},
    58  
    59  	{65, '{',
    60  	"unexpected { at end of statement"},
    61  
    62  	{379, '{',
    63  	"unexpected { at end of statement"},
    64  	
    65  	{126, ';',
    66  	"argument to go/defer must be function call"},
    67  	
    68  	{428, ';',
    69  	"need trailing comma before newline in composite literal"},
    70  	
    71  	{439, ';',
    72  	"need trailing comma before newline in composite literal"},
    73  	
    74  	{113, LNAME,
    75  	"nested func not allowed"},
    76  
    77  	{647, ';',
    78  	"else must be followed by if or statement block"}
    79  };