Home | History | Annotate | Download | only in testdata
      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 int_flags0 = 0, 0x1, 0xab
      9 int_flags1 = 123ab0x			### bad integer "123ab0x"
     10 int_flags1 == 0, 1			### unexpected '=', expecting int, identifier, string
     11 int_flags = 0, "foo"			### unexpected string, expecting int, identifier
     12 int_flags2 = '				### char literal is not terminated
     13 int_flags3 = 'a				### char literal is not terminated
     14 int_flags3 = 'a, 1			### char literal is not terminated
     15 int_flags4 = 1, -2-			### bad integer "-2-"
     16 
     17 str_flags0 = "foo", "bar"
     18 str_flags1 = "non terminated		### string literal is not terminated
     19 str_flags2 = "bad chars "		### illegal character U+00D0 '' in string literal
     20 str_flags3 = "string", not a string	### unexpected identifier, expecting string
     21 str_flags4 = "string", 42		### unexpected int, expecting string
     22 
     23 call(foo ,int32 , bar int32)		### unexpected ',', expecting int, identifier, string
     24 call(foo int32:"bar")			### unexpected string, expecting int, identifier
     25 
     26 define FOO `bar`
     27 define FOO `bar				### C expression is not terminated
     28 
     29 foo(x int32[1:2:3, opt])		### unexpected ':', expecting ']'
     30 
     31 s0 {
     32 	f0	string[""]
     33 }
     34 
     35 sf0 = "", "1"
     36 
     37 include <linux/foo.h>
     38 include "linux/foo.h"
     39 incdir </foo/bar>
     40 incdir "/foo/bar"
     41 
     42 s2 {
     43 	f1	int8
     44 
     45 	# comment
     46 
     47 	f2	int8
     48 
     49 	# comment
     50 
     51 }
     52 
     53 s3 {
     54 	f1	int8
     55 } [attribute[1, "foo"], another[and[another]]]
     56 
     57 type mybool8 int8
     58 type net_port proc[1, 2, int16be]
     59 type mybool16				### unexpected '\n', expecting '[', identifier
     60 type type4:4 int32			### unexpected ':', expecting '[', identifier
     61 
     62 type templ0[] int8			### unexpected ']', expecting identifier
     63 type templ1[A,] int8			### unexpected ']', expecting identifier
     64 type templ2[,] int8			### unexpected ',', expecting identifier
     65 type templ3[				### unexpected '\n', expecting identifier
     66 type templ4[A]				### unexpected '\n', expecting int, identifier, string
     67 type templ5[A] const[A]
     68 type templ6[A, B] const[A, B]
     69 type templ7[0] ptr[in, int8]		### unexpected int, expecting identifier
     70 
     71 type templ_struct0[A, B] {
     72 	len	len[parent, int16]
     73 	typ	const[A, int16]
     74 	data	B
     75 } [align_4]
     76