Lines Matching refs:cur
42 static boolean is_alpha_underscore( const char *cur )
45 (*cur >= 'a' && *cur <= 'z') ||
46 (*cur >= 'A' && *cur <= 'Z') ||
47 *cur == '_';
50 static boolean is_digit( const char *cur )
52 return *cur >= '0' && *cur <= '9';
55 static boolean is_digit_alpha_underscore( const char *cur )
57 return is_digit( cur ) || is_alpha_underscore( cur );
91 const char *cur = *pcur;
93 while (*str != '\0' && *str == uprcase( *cur )) {
95 cur++;
98 *pcur = cur;
112 const char *cur = *pcur;
114 if (str_match_no_case(&cur, str) &&
115 !is_digit_alpha_underscore(cur)) {
116 *pcur = cur;
135 const char *cur = *pcur;
138 return *pcur > cur;
146 const char *cur = *pcur;
148 if (is_digit( cur )) {
149 *val = *cur++ - '0';
150 while (is_digit( cur ))
151 *val = *val * 10 + *cur++ - '0';
152 *pcur = cur;
160 const char *cur = *pcur;
161 int sign = (*cur == '-' ? -1 : 1);
163 if (*cur == '+' || *cur == '-')
164 cur++;
166 if (parse_uint(&cur, (uint *)val)) {
168 *pcur = cur;
177 const char *cur = *pcur;
179 if (is_alpha_underscore( cur )) {
180 ret[i++] = *cur++;
181 while (is_alpha_underscore( cur ) || is_digit( cur ))
182 ret[i++] = *cur++;
184 *pcur = cur;
194 const char *cur = *pcur;
198 *val = (float) atof( cur );
200 if (*cur == '-' || *cur == '+')
201 cur++;
202 if (is_digit( cur )) {
203 cur++;
205 while (is_digit( cur ))
206 cur++;
208 if (*cur == '.') {
209 cur++;
210 if (is_digit( cur )) {
211 cur++;
213 while (is_digit( cur ))
214 cur++;
219 if (uprcase( *cur ) == 'E') {
220 cur++;
221 if (*cur == '-' || *cur == '+')
222 cur++;
223 if (is_digit( cur )) {
224 cur++;
225 while (is_digit( cur ))
226 cur++;
231 *pcur = cur;
238 const char *cur;
253 while (itr != ctx->cur) {
275 if (str_match_nocase_whole( &ctx->cur, "FRAG" ))
277 else if (str_match_nocase_whole( &ctx->cur, "VERT" ))
279 else if (str_match_nocase_whole( &ctx->cur, "GEOM" ))
281 else if (str_match_nocase_whole( &ctx->cur, "COMP" ))
303 const char *cur = ctx->cur;
305 if (parse_uint( &cur, val )) {
306 eat_opt_white( &cur );
307 if (*cur == ':') {
308 cur++;
309 ctx->cur = cur;
322 const char *cur = *pcur;
324 if (str_match_nocase_whole( &cur, tgsi_file_names[i] )) {
325 *pcur = cur;
338 const char *cur;
340 cur = ctx->cur;
341 eat_opt_white( &cur );
342 if (*cur == '.') {
343 cur++;
345 eat_opt_white( &cur );
346 if (uprcase( *cur ) == 'X') {
347 cur++;
350 if (uprcase( *cur ) == 'Y') {
351 cur++;
354 if (uprcase( *cur ) == 'Z') {
355 cur++;
358 if (uprcase( *cur ) == 'W') {
359 cur++;
368 ctx->cur = cur;
384 if (!parse_file( &ctx->cur, file )) {
388 eat_opt_white( &ctx->cur );
389 if (*ctx->cur != '[') {
393 ctx->cur++;
409 eat_opt_white( &ctx->cur );
410 if (!parse_uint( &ctx->cur, &uindex )) {
428 eat_opt_white( &ctx->cur );
429 if (*ctx->cur != ']') {
433 ctx->cur++;
451 const char *cur;
456 eat_opt_white( &ctx->cur );
458 cur = ctx->cur;
459 if (parse_file( &cur, &brackets->ind_file )) {
463 eat_opt_white( &ctx->cur );
465 if (*ctx->cur == '.') {
466 ctx->cur++;
467 eat_opt_white(&ctx->cur);
469 switch (uprcase(*ctx->cur)) {
486 ctx->cur++;
487 eat_opt_white(&ctx->cur);
490 if (*ctx->cur == '+' || *ctx->cur == '-')
491 parse_int( &ctx->cur, &brackets->index );
496 if (!parse_uint( &ctx->cur, &uindex )) {
504 eat_opt_white( &ctx->cur );
505 if (*ctx->cur != ']') {
509 ctx->cur++;
519 const char *cur = ctx->cur;
523 eat_opt_white( &cur );
524 if (cur[0] == '[') {
525 ++cur;
526 ctx->cur = cur;
572 eat_opt_white( &ctx->cur );
574 if (!parse_uint( &ctx->cur, &uindex )) {
577 if (ctx->cur[0] == ']' && ctx->implied_array_size != 0) {
587 eat_opt_white( &ctx->cur );
589 if (ctx->cur[0] == '.' && ctx->cur[1] == '.') {
592 ctx->cur += 2;
593 eat_opt_white( &ctx->cur );
594 if (!parse_uint( &ctx->cur, &uindex )) {
599 eat_opt_white( &ctx->cur );
606 if (*ctx->cur != ']') {
610 ctx->cur++;
625 const char *cur;
636 cur = ctx->cur;
637 eat_opt_white( &cur );
639 if (cur[0] == '[') {
640 ++cur;
641 ctx->cur = cur;
684 const char *cur;
693 cur = ctx->cur;
694 eat_opt_white( &cur );
727 const char *cur = ctx->cur;
731 eat_opt_white( &cur );
732 if (*cur == '.') {
735 cur++;
736 eat_opt_white( &cur );
738 if (uprcase( *cur ) == 'X')
740 else if (uprcase( *cur ) == 'Y')
742 else if (uprcase( *cur ) == 'Z')
744 else if (uprcase( *cur ) == 'W')
750 cur++;
753 ctx->cur = cur;
769 if (*ctx->cur == '-') {
770 ctx->cur++;
771 eat_opt_white( &ctx->cur );
775 if (*ctx->cur == '|') {
776 ctx->cur++;
777 eat_opt_white( &ctx->cur );
817 eat_opt_white( &ctx->cur );
818 if (*ctx->cur != '|') {
822 ctx->cur++;
834 const char *cur = *pcur;
837 if (str_match_nocase_whole(&cur, info->mnemonic)) {
838 *pcur = cur;
843 if (str_match_no_case(&cur, info->mnemonic)) {
845 if (str_match_nocase_whole(&cur, "_SAT")) {
846 *pcur = cur;
851 if (str_match_nocase_whole(&cur, "_SATNV")) {
852 *pcur = cur;
870 const char *cur;
877 eat_opt_white( &ctx->cur );
878 if (*ctx->cur == '(') {
886 ctx->cur++;
887 if (*ctx->cur == '!') {
888 ctx->cur++;
904 if (*ctx->cur != ')') {
909 ctx->cur++;
914 eat_opt_white( &ctx->cur );
916 cur = ctx->cur;
919 if (match_inst(&cur, &saturate, info)) {
921 ctx->cur = cur;
924 else if (*cur == '\0' || eat_white( &cur )) {
925 ctx->cur = cur;
947 eat_opt_white( &ctx->cur );
948 if (*ctx->cur != ',') {
952 ctx->cur++;
953 eat_opt_white( &ctx->cur );
968 if (str_match_nocase_whole( &ctx->cur, tgsi_texture_names[j] )) {
981 cur = ctx->cur;
982 eat_opt_white( &cur );
983 if (info->is_branch && *cur == ':') {
986 cur++;
987 eat_opt_white( &cur );
988 if (!parse_uint( &cur, &target )) {
994 ctx->cur = cur;
1017 eat_opt_white( &ctx->cur );
1018 if (*ctx->cur != '{') {
1022 ctx->cur++;
1024 eat_opt_white( &ctx->cur );
1026 if (*ctx->cur != ',') {
1030 ctx->cur++;
1031 eat_opt_white( &ctx->cur );
1036 ret = parse_float(&ctx->cur, &values[i].Float);
1039 ret = parse_uint(&ctx->cur, &values[i].Uint);
1042 ret = parse_int(&ctx->cur, &values[i].Int);
1055 eat_opt_white( &ctx->cur );
1056 if (*ctx->cur != '}') {
1060 ctx->cur++;
1072 const char *cur, *cur2;
1077 if (!eat_white( &ctx->cur )) {
1105 cur = ctx->cur;
1106 eat_opt_white( &cur );
1107 if (*cur == ',' && !is_vs_input) {
1110 cur++;
1111 eat_opt_white( &cur );
1114 if (str_match_nocase_whole(&cur, tgsi_texture_names[i])) {
1124 cur2 = cur;
1138 cur = cur2;
1142 ctx->cur = cur;
1146 if (str_match_nocase_whole(&cur, tgsi_texture_names[i])) {
1155 eat_opt_white( &cur );
1156 if (*cur != ',') {
1160 ++cur;
1161 eat_opt_white( &cur );
1164 if (str_match_nocase_whole(&cur, tgsi_type_names[i])) {
1191 cur2 = cur;
1196 cur = cur2;
1208 ctx->cur = cur;
1210 if (str_match_nocase_whole(&cur, "LOCAL")) {
1212 ctx->cur = cur;
1215 cur = ctx->cur;
1216 eat_opt_white( &cur );
1217 if (*cur == ',') {
1218 cur++;
1219 eat_opt_white( &cur );
1222 if (str_match_nocase_whole(&cur, tgsi_semantic_names[i])) {
1225 cur2 = cur;
1243 cur = cur2;
1249 ctx->cur = cur;
1259 if (*cur != '{') {
1263 ++cur;
1264 ctx->cur = cur;
1276 eat_opt_white( &ctx->cur );
1277 if (*ctx->cur != ',') {
1284 ++ctx->cur;
1286 eat_opt_white( &ctx->cur );
1287 if (*ctx->cur != '}') {
1292 ++ctx->cur;
1295 cur = ctx->cur;
1296 eat_opt_white( &cur );
1297 if (*cur == ',' && !is_vs_input) {
1300 cur++;
1301 eat_opt_white( &cur );
1303 if (str_match_nocase_whole( &cur, tgsi_interpolate_names[i] )) {
1307 ctx->cur = cur;
1339 if (!eat_white( &ctx->cur )) {
1344 if (str_match_nocase_whole(&ctx->cur, tgsi_immediate_type_names[type]))
1375 const char *cur = *pcur;
1377 if (str_match_nocase_whole( &cur, tgsi_primitive_names[i])) {
1379 *pcur = cur;
1392 const char *cur = *pcur;
1394 if (str_match_nocase_whole( &cur, tgsi_fs_coord_origin_names[i])) {
1396 *pcur = cur;
1409 const char *cur = *pcur;
1411 if (str_match_nocase_whole( &cur, tgsi_fs_coord_pixel_center_names[i])) {
1413 *pcur = cur;
1429 if (!eat_white( &ctx->cur )) {
1433 if (!parse_identifier( &ctx->cur, id )) {
1448 eat_opt_white( &ctx->cur );
1452 if (!parse_primitive(&ctx->cur, &values[0] )) {
1462 if (!parse_fs_coord_origin(&ctx->cur, &values[0] )) {
1468 if (!parse_fs_coord_pixel_center(&ctx->cur, &values[0] )) {
1475 if (!parse_uint(&ctx->cur, &values[0] )) {
1501 eat_opt_white( &ctx->cur );
1505 while (*ctx->cur != '\0') {
1507 if (!eat_white( &ctx->cur )) {
1512 if (*ctx->cur == '\0')
1518 else if (str_match_nocase_whole( &ctx->cur, "DCL" )) {
1522 else if (str_match_nocase_whole( &ctx->cur, "IMM" )) {
1526 else if (str_match_nocase_whole( &ctx->cur, "PROPERTY" )) {
1547 ctx.cur = text;