comparison src/gearsTools/generate_context.pl @ 346:36ed64fea8c1

emit context.h
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Mon, 02 Mar 2020 14:19:49 +0900
parents 49a70efcbd3a
children fde5f96c6ff1
comparison
equal deleted inserted replaced
345:efef0767b1bc 346:36ed64fea8c1
130 } 130 }
131 last if (/union Data end/); 131 last if (/union Data end/);
132 if (/struct (\w+) \{/) { 132 if (/struct (\w+) \{/) {
133 $dataGear{$1} = 'struct'; 133 $dataGear{$1} = 'struct';
134 } elsif (/^\s{4}(\w+) (\w+);/) { # primitive type 134 } elsif (/^\s{4}(\w+) (\w+);/) { # primitive type
135 $dataGear{$1} = 'primitive'; 135 my $vtype = $1;
136 my $vname = $2;
137 if (exists $dataGear{$vname}) {
138 next;
139 }
140 $dataGear{$vtype} = 'primitive';
136 } 141 }
137 $dataGear{"Context"} = "struct"; 142 $dataGear{"Context"} = "struct";
138 } 143 }
139 } 144 }
140 145