github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/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 "bad chars здесь" 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 sCondFieldsError3 { 79 f6 int16 (out, if[val[mask] == SOME_CONST] || [val[mask]]) ### unexpected '[', expecting int, identifier, string 80 } ### unexpected '}', expecting comment, define, include, resource, identifier 81 82 sCondFieldsError4 { 83 f7 int16 (out, if[val[mask] == SOME_CONST || val[mask] ==]) ### unexpected ']', expecting int, identifier, string 84 } ### unexpected '}', expecting comment, define, include, resource, identifier 85 86 type mybool8 int8 87 type net_port proc[1, 2, int16be] 88 type mybool16 ### unexpected '\n', expecting '[', identifier 89 type type4:4 int32 ### unexpected ':', expecting '[', identifier 90 91 type templ0[] int8 ### unexpected ']', expecting identifier 92 type templ1[A,] int8 ### unexpected ']', expecting identifier 93 type templ2[,] int8 ### unexpected ',', expecting identifier 94 type templ3[ ### unexpected '\n', expecting identifier 95 type templ4[A] ### unexpected '\n', expecting int, identifier, string 96 type templ5[A] const[A] 97 type templ6[A, B] const[A, B] 98 type templ7[0] ptr[in, int8] ### unexpected int, expecting identifier 99 100 type templ_struct0[A, B] { 101 len len[parent, int16] 102 typ const[A, int16] 103 data B 104 } [align_4] 105 106 s4 { 107 f0 int8 (attr) 108 f1 int8 (attr1, attr2[arg1, "arg2"]) 109 f2 int8 ("attr1") 110 } 111 112 s5 { 113 f0 int8 ( ### unexpected '\n', expecting int, identifier, string 114 115 s6 { 116 f0 int8 () ### unexpected ')', expecting int, identifier, string