Commit | Line | Data |
---|---|---|
951c7801 C |
1 | @anyid@ |
2 | type t; | |
3 | identifier id; | |
4 | @@ | |
5 | ||
6 | t id () { | |
7 | ... | |
8 | } | |
9 | ||
10 | @script:python@ | |
11 | x << anyid.id; | |
12 | @@ | |
13 | ||
14 | print "Identifier: %s" % x | |
15 | ||
16 | @contains@ | |
17 | type t; | |
f3c4ece6 | 18 | identifier foo =~ "foo"; |
951c7801 C |
19 | @@ |
20 | ||
21 | t foo () { | |
22 | ... | |
23 | } | |
24 | ||
25 | @script:python@ | |
26 | x << contains.foo; | |
27 | @@ | |
28 | ||
29 | print "Contains foo: %s" % x | |
30 | ||
31 | @nocontain@ | |
32 | type t; | |
97111a47 | 33 | identifier foo !~ "foo"; |
951c7801 C |
34 | @@ |
35 | ||
36 | t foo () { | |
37 | ... | |
38 | } | |
39 | ||
40 | @script:python@ | |
41 | x << nocontain.foo; | |
42 | @@ | |
43 | ||
44 | print "Does not contain foo: %s" % x | |
45 | ||
46 | @endsby@ | |
47 | type t; | |
f3c4ece6 | 48 | identifier foo =~ "foo$"; |
951c7801 C |
49 | @@ |
50 | ||
51 | t foo () { | |
52 | ... | |
53 | } | |
54 | ||
55 | @script:python@ | |
56 | x << endsby.foo; | |
57 | @@ | |
58 | ||
59 | print "Ends by foo: %s" % x | |
60 | ||
61 | @beginsby@ | |
62 | type t; | |
f3c4ece6 | 63 | identifier foo =~ "^foo"; |
951c7801 C |
64 | @@ |
65 | ||
66 | t foo () { | |
67 | ... | |
68 | } | |
69 | ||
70 | @script:python@ | |
71 | x << beginsby.foo; | |
72 | @@ | |
73 | ||
74 | print "Begins by foo: %s" % x |