Debian Codegraph @

tests/yaml/attribute.yaml

raw symbols SCIP
1 # attribute name can be a digit between 0 and 7, in which case it can
2 # be used in a match expression (but not in a multipass expression)
3 display: |
4 display a 1
5 display b 12
6 display A 17
7 table: |
8 sign a 1
9 sign b 12
10 attribute 5 b
11 match %5 a - 17
12 flags: {testmode: forward}
13 tests:
14 - - aabaa
15 - aabAa
16
17 # attribute name can be a word, in which case it can be used in a
18 # multipass expression (but not in a match expression)
19 # there are a number of reserved names: numericnocontchars,
20 # midendnumericmodechars, numericmodechars, capsmodechars,
21 # emphmodechars, seqdelimiter, seqbeforechars, seqafterchars,
22 # noletsign, noletsignbefore, noletsignafter
23 table: |
24 sign a 1
25 sign b 12
26 attribute foo b
27 noback context _%foo["a"] @17
28 flags: {testmode: forward}
29 tests:
30 - - aabaa
31 - aabAa
32
33 # attribute name can be a predefined attribute, i.e. space, letter,
34 # digit, punctuation, uppercase, lowercase, math, sign or litdigit
35 # (and it will set that attribute, not a custom one)
36 table: |
37 sign a 1
38 sign b 12
39 attribute letter b
40 noback context _$l["a"] @17
41 table: |
42 sign a 1
43 sign b 12
44 attribute letter b
45 noback context _%letter["a"] @17
46 table: |
47 sign a 1
48 sign b 12
49 attribute letter b
50 match %a a - 17
51 flags: {testmode: forward}
52 tests:
53 - - aabaa
54 - aabAa
55
56 # if the character is associated with a single-cell dot pattern, the
57 # attribute is also set on the dot pattern (only relevant for
58 # multipass rules)
59 table: |
60 sign a 1
61 sign b 12
62 attribute foo b
63 noback pass2 _%foo[@1] @17
64 flags: {testmode: forward}
65 tests:
66 - - aabaa
67 - aabAa
68
69 # class is deprecated but can still be used as an alias for attribute,
70 # but the name must be a word, and class and attribute may not be both
71 # present in the same table
72 table: |
73 sign a 1
74 sign b 12
75 class foo b
76 noback context _%foo["a"] @17
77 flags: {testmode: forward}
78 tests:
79 - - aabaa
80 - aabAa