source: trunk/symbol_table/id_group_strms.py @ 2038

Last change on this file since 2038 was 2034, checked in by nmedfort, 7 years ago

Some changes for the eventual ICXML inclusion; please test these Ken; differences were reported during testing but I may have run them incorrectly.

File size: 2.4 KB
Line 
1class Groups():
2        starts = 0
3        ends = 0
4        ends_1 = 0
5        ends_2 = 0
6        ends_3 = 0
7        ends_4 = 0
8        ends_5 = 0
9        ends_6 = 0
10        ends_7 = 0
11        ends_8 = 0
12        ends_9 = 0
13        ends_10 = 0
14        ends_11 = 0
15        ends_12 = 0
16        ends_13 = 0
17        ends_14 = 0
18        ends_15 = 0
19        ends_16 = 0
20        ends_gte_17 = 0
21
22def Gen_lgth_groups(groups):
23
24        cursor = groups.starts
25        temp = groups.ends
26
27        # Group symbols of length 1
28        cursor = pablo.Advance(cursor)
29        groups.ends_1 = cursor & temp
30        temp = temp & ~groups.ends_1
31
32        # Group symbols of length 2
33        cursor = pablo.Advance(cursor)
34        groups.ends_2 = cursor & temp
35        temp = temp & ~groups.ends_2
36
37        # Group symbols of length 3
38        cursor = pablo.Advance(cursor)
39        groups.ends_3 = cursor & temp
40        temp = temp & ~groups.ends_3
41
42        # Group symbols of length 4
43        cursor = pablo.Advance(cursor)
44        groups.ends_4 = cursor & temp
45        temp = temp & ~groups.ends_4
46
47        # Group symbols of length 5
48        cursor = pablo.Advance(cursor)
49        groups.ends_5 = cursor & temp
50        temp = temp & ~groups.ends_5
51
52        # Group symbols of length 6
53        cursor = pablo.Advance(cursor)
54        groups.ends_6 = cursor & temp
55        temp = temp & ~groups.ends_6
56
57        # Group symbols of length 7
58        cursor = pablo.Advance(cursor)
59        groups.ends_7 = cursor & temp
60        temp = temp & ~groups.ends_7
61
62        # Group symbols of length 8
63        cursor = pablo.Advance(cursor)
64        groups.ends_8 = cursor & temp
65        temp = temp & ~groups.ends_8
66
67        # Group symbols of length 9
68        cursor = pablo.Advance(cursor)
69        groups.ends_9 = cursor & temp
70        temp = temp & ~groups.ends_9
71
72        # Group symbols of length 10
73        cursor = pablo.Advance(cursor)
74        groups.ends_10 = cursor & temp
75        temp = temp & ~groups.ends_10
76
77        # Group symbols of length 11
78        cursor = pablo.Advance(cursor)
79        groups.ends_11 = cursor & temp
80        temp = temp & ~groups.ends_11
81
82        # Group symbols of length 12
83        cursor = pablo.Advance(cursor)
84        groups.ends_12 = cursor & temp
85        temp = temp & ~groups.ends_12
86
87        # Group symbols of length 13
88        cursor = pablo.Advance(cursor)
89        groups.ends_13 = cursor & temp
90        temp = temp & ~groups.ends_13
91
92        # Group symbols of length 14
93        cursor = pablo.Advance(cursor)
94        groups.ends_14 = cursor & temp
95        temp = temp & ~groups.ends_14
96
97        # Group symbols of length 15
98        cursor = pablo.Advance(cursor)
99        groups.ends_15 = cursor & temp
100        temp = temp & ~groups.ends_15
101
102        # Group symbols of length 16
103        cursor = pablo.Advance(cursor)
104        groups.ends_16 = cursor & temp
105        temp = temp & ~groups.ends_16
106
107        # Group symbols of length greater than 16
108        groups.ends_gte_17 = temp
109
110def Main(groups):
111        Gen_lgth_groups(groups)
112
Note: See TracBrowser for help on using the repository browser.