github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/pkg/ast/testdata/errors.txt (about)

     1  # Copyright 2017 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  0x42		### unexpected int, expecting comment, define, include, resource, identifier
     5  foo		### unexpected '\n', expecting '(', '{', '[', '='
     6  %		### illegal character U+0025 '%'
     7  
     8  meta		### unexpected '\n', expecting int, identifier, string
     9  meta: foo	### unexpected ':', expecting int, identifier, string
    10  meta foo, bar	### unexpected ',', expecting '\n'
    11  
    12  int_flags0 = 0, 0x1, 0xab
    13  int_flags1 = 123ab0x			### bad integer "123ab0x"
    14  int_flags1 == 0, 1			### unexpected ==, expecting '(', '{', '[', '='
    15  int_flags = 0, "foo"			### unexpected string, expecting int, identifier
    16  int_flags2 = '				### char literal is not terminated
    17  int_flags3 = 'a				### char literal is not terminated
    18  int_flags3 = 'a, 1			### char literal is not terminated
    19  int_flags4 = 1, -2-			### bad integer "-2-"
    20  
    21  str_flags0 = "foo", "bar"
    22  str_flags1 = "non terminated		### string literal is not terminated
    23  str_flags2 = "bad chars здесь"		### illegal character U+00D0 'Ð' in string literal
    24  str_flags3 = "string", not a string	### unexpected identifier, expecting '\n'
    25  str_flags4 = "string", 42		### unexpected int, expecting string, hex string, identifier
    26  str_flags5 = `x`			### bad hex string literal: encoding/hex: invalid byte: U+0078 'x'
    27  
    28  call(foo ,int32 , bar int32)		### unexpected ',', expecting int, identifier, string
    29  call(foo int32:"bar")			### unexpected string, expecting int, identifier
    30  call(a int32, b len[a:"bar"])		### unexpected string, expecting int, identifier
    31  call() (attr)
    32  call() (attr1, attr2[arg1, "arg2"])
    33  call() ("attr1")
    34  call() (42)
    35  call() (				### unexpected '\n', expecting int, identifier, string
    36  call() ()				### unexpected ')', expecting int, identifier, string
    37  call(foo int32 (attr))	### unexpected '(', expecting ',', ')'
    38  
    39  define FOO bar
    40  
    41  foo(x int32[1:2:3, opt])
    42  foo2(x int32[1[2]:2])			### unexpected ':', expecting ']'
    43  
    44  s0 {
    45  	f0	string[""]
    46  }
    47  
    48  sf0 = "", "1"
    49  
    50  include <linux/foo.h>
    51  include "linux/foo.h"
    52  incdir </foo/bar>
    53  incdir "/foo/bar"
    54  
    55  s2 {
    56  	f1	int8
    57  
    58  	# comment
    59  
    60  	f2	int8
    61  
    62  	# comment
    63  
    64  }
    65  
    66  s3 {
    67  	f1	int8
    68  } [attribute[1, "foo"], another[and[another]]]
    69  
    70  sCondFieldsError1 {
    71  	f0	int16 (out, if[val[mask] SOME_CONST == val[mask]]) ### unexpected identifier, expecting ']'
    72  } ### unexpected '}', expecting comment, define, include, resource, identifier
    73  
    74  sCondFieldsError2 {
    75  	f5	int16 (out, if[val[mask] & == val[mask]]) ### unexpected ==, expecting int, identifier, string
    76  } ### unexpected '}', expecting comment, define, include, resource, identifier
    77  
    78  type mybool8 int8
    79  type net_port proc[1, 2, int16be]
    80  type mybool16				### unexpected '\n', expecting '[', identifier
    81  type type4:4 int32			### unexpected ':', expecting '[', identifier
    82  
    83  type templ0[] int8			### unexpected ']', expecting identifier
    84  type templ1[A,] int8			### unexpected ']', expecting identifier
    85  type templ2[,] int8			### unexpected ',', expecting identifier
    86  type templ3[				### unexpected '\n', expecting identifier
    87  type templ4[A]				### unexpected '\n', expecting int, identifier, string
    88  type templ5[A] const[A]
    89  type templ6[A, B] const[A, B]
    90  type templ7[0] ptr[in, int8]		### unexpected int, expecting identifier
    91  
    92  type templ_struct0[A, B] {
    93  	len	len[parent, int16]
    94  	typ	const[A, int16]
    95  	data	B
    96  } [align_4]
    97  
    98  s4 {
    99  	f0 int8 (attr)
   100  	f1 int8 (attr1, attr2[arg1, "arg2"])
   101  	f2 int8 ("attr1")
   102  }
   103  
   104  s5 {
   105  	f0 int8 (	### unexpected '\n', expecting int, identifier, string
   106  
   107  s6 {
   108  	f0 int8 ()	### unexpected ')', expecting int, identifier, string