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;
171 const char *cur = *pcur;
174 return *pcur > cur;
182 const char *cur = *pcur;
184 if (is_digit( cur )) {
185 *val = *cur++ - '0';
186 while (is_digit( cur ))
187 *val = *val * 10 + *cur++ - '0';
188 *pcur = cur;
196 const char *cur = *pcur;
197 int sign = (*cur == '-' ? -1 : 1);
199 if (*cur == '+' || *cur == '-')
200 cur++;
202 if (parse_uint(&cur, (uint *)val)) {
204 *pcur = cur;
213 const char *cur = *pcur;
215 if (is_alpha_underscore( cur )) {
216 ret[i++] = *cur++;
217 while (is_alpha_underscore( cur ) || is_digit( cur )) {
220 ret[i++] = *cur++;
223 *pcur = cur;
233 const char *cur = *pcur;
237 if (*cur == '0' && *(cur + 1) == 'x') {
239 fi.ui = strtoul(cur, NULL, 16);
241 cur += 10;
245 *val = (float) atof( cur );
246 if (*cur == '-' || *cur == '+')
247 cur++;
248 if (is_digit( cur )) {
249 cur++;
251 while (is_digit( cur ))
252 cur++;
254 if (*cur == '.') {
255 cur++;
256 if (is_digit( cur )) {
257 cur++;
259 while (is_digit( cur ))
260 cur++;
265 if (uprcase( *cur ) == 'E') {
266 cur++;
267 if (*cur == '-' || *cur == '+')
268 cur++;
269 if (is_digit( cur )) {
270 cur++;
271 while (is_digit( cur ))
272 cur++;
279 *pcur = cur;
285 const char *cur = *pcur;
291 v.dval = strtod(cur, (char**)pcur);
292 if (*pcur == cur)
303 const char *cur = *pcur;
309 v.i64val = strtoll(cur, (char**)pcur, 0);
310 if (*pcur == cur)
321 const char *cur = *pcur;
327 v.u64val = strtoull(cur, (char**)pcur, 0);
328 if (*pcur == cur)
340 const char *cur;
356 while (itr != ctx->cur) {
378 if (str_match_nocase_whole( &ctx->cur, "FRAG" ))
380 else if (str_match_nocase_whole( &ctx->cur, "VERT" ))
382 else if (str_match_nocase_whole( &ctx->cur, "GEOM" ))
384 else if (str_match_nocase_whole( &ctx->cur, "TESS_CTRL" ))
386 else if (str_match_nocase_whole( &ctx->cur, "TESS_EVAL" ))
388 else if (str_match_nocase_whole( &ctx->cur, "COMP" ))
410 const char *cur = ctx->cur;
412 if (parse_uint( &cur, val )) {
413 eat_opt_white( &cur );
414 if (*cur == ':') {
415 cur++;
416 ctx->cur = cur;
429 const char *cur = *pcur;
431 if (str_match_nocase_whole( &cur, tgsi_file_name(i) )) {
432 *pcur = cur;
445 const char *cur;
447 cur = ctx->cur;
448 eat_opt_white( &cur );
449 if (*cur == '.') {
450 cur++;
452 eat_opt_white( &cur );
453 if (uprcase( *cur ) == 'X') {
454 cur++;
457 if (uprcase( *cur ) == 'Y') {
458 cur++;
461 if (uprcase( *cur ) == 'Z') {
462 cur++;
465 if (uprcase( *cur ) == 'W') {
466 cur++;
475 ctx->cur = cur;
491 if (!parse_file( &ctx->cur, file )) {
495 eat_opt_white( &ctx->cur );
496 if (*ctx->cur != '[') {
500 ctx->cur++;
516 eat_opt_white( &ctx->cur );
517 if (!parse_uint( &ctx->cur, &uindex )) {
535 eat_opt_white( &ctx->cur );
536 if (*ctx->cur != ']') {
540 ctx->cur++;
559 const char *cur;
564 eat_opt_white( &ctx->cur );
566 cur = ctx->cur;
567 if (parse_file( &cur, &brackets->ind_file )) {
571 eat_opt_white( &ctx->cur );
573 if (*ctx->cur == '.') {
574 ctx->cur++;
575 eat_opt_white(&ctx->cur);
577 switch (uprcase(*ctx->cur)) {
594 ctx->cur++;
595 eat_opt_white(&ctx->cur);
598 if (*ctx->cur == '+' || *ctx->cur == '-')
599 parse_int( &ctx->cur, &brackets->index );
604 if (!parse_uint( &ctx->cur, &uindex )) {
612 eat_opt_white( &ctx->cur );
613 if (*ctx->cur != ']') {
617 ctx->cur++;
618 if (*ctx->cur == '(') {
619 ctx->cur++;
620 eat_opt_white( &ctx->cur );
621 if (!parse_uint( &ctx->cur, &brackets->ind_array )) {
625 eat_opt_white( &ctx->cur );
626 if (*ctx->cur != ')') {
630 ctx->cur++;
641 const char *cur = ctx->cur;
645 eat_opt_white( &cur );
646 if (cur[0] == '[') {
647 ++cur;
648 ctx->cur = cur;
694 eat_opt_white( &ctx->cur );
696 if (!parse_uint( &ctx->cur, &uindex )) {
699 if (ctx->cur[0] == ']' && ctx->implied_array_size != 0) {
709 eat_opt_white( &ctx->cur );
711 if (ctx->cur[0] == '.' && ctx->cur[1] == '.') {
714 ctx->cur += 2;
715 eat_opt_white( &ctx->cur );
716 if (!parse_uint( &ctx->cur, &uindex )) {
721 eat_opt_white( &ctx->cur );
728 if (*ctx->cur != ']') {
732 ctx->cur++;
747 const char *cur;
758 cur = ctx->cur;
759 eat_opt_white( &cur );
761 if (cur[0] == '[') {
765 ++cur;
766 ctx->cur = cur;
813 const char *cur;
822 cur = ctx->cur;
823 eat_opt_white( &cur );
863 const char *cur = ctx->cur;
867 eat_opt_white( &cur );
868 if (*cur == '.') {
871 cur++;
872 eat_opt_white( &cur );
874 if (uprcase( *cur ) == 'X')
876 else if (uprcase( *cur ) == 'Y')
878 else if (uprcase( *cur ) == 'Z')
880 else if (uprcase( *cur ) == 'W')
886 cur++;
889 ctx->cur = cur;
905 if (*ctx->cur == '-') {
906 ctx->cur++;
907 eat_opt_white( &ctx->cur );
911 if (*ctx->cur == '|') {
912 ctx->cur++;
913 eat_opt_white( &ctx->cur );
958 eat_opt_white( &ctx->cur );
959 if (*ctx->cur != '|') {
963 ctx->cur++;
1005 const char *cur = *pcur;
1009 if (str_match_nocase_whole(&cur, mnemonic)) {
1010 *pcur = cur;
1016 if (str_match_no_case(&cur, mnemonic)) {
1018 if (str_match_no_case(&cur, "_SAT")) {
1019 *pcur = cur;
1023 if (str_match_no_case(&cur, "_PRECISE")) {
1024 *pcur = cur;
1028 if (!is_digit_alpha_underscore(cur))
1045 const char *cur;
1052 eat_opt_white( &ctx->cur );
1054 cur = ctx->cur;
1057 if (match_inst(&cur, &saturate, &precise, info)) {
1059 ctx->cur = cur;
1062 else if (*cur == '\0' || eat_white( &cur )) {
1063 ctx->cur = cur;
1105 eat_opt_white( &ctx->cur );
1106 if (*ctx->cur != ',') {
1110 ctx->cur++;
1111 eat_opt_white( &ctx->cur );
1126 if (str_match_nocase_whole( &ctx->cur, tgsi_texture_names[j] )) {
1139 cur = ctx->cur;
1140 eat_opt_white( &cur );
1141 for (i = 0; inst.Instruction.Texture && *cur == ',' && i < TGSI_FULL_MAX_TEX_OFFSETS; i++) {
1142 cur++;
1143 eat_opt_white( &cur );
1144 ctx->cur = cur;
1147 cur = ctx->cur;
1148 eat_opt_white( &cur );
1152 cur = ctx->cur;
1153 eat_opt_white(&cur);
1155 for (; inst.Instruction.Memory && *cur == ',';
1156 ctx->cur = cur, eat_opt_white(&cur)) {
1159 cur++;
1160 eat_opt_white(&cur);
1162 j = str_match_name_from_array(&cur, tgsi_memory_names,
1169 j = str_match_name_from_array(&cur, tgsi_texture_names,
1176 j = str_match_format(&cur);
1182 ctx->cur = cur;
1187 cur = ctx->cur;
1188 eat_opt_white( &cur );
1189 if (info->is_branch && *cur == ':') {
1192 cur++;
1193 eat_opt_white( &cur );
1194 if (!parse_uint( &cur, &target )) {
1200 ctx->cur = cur;
1223 eat_opt_white( &ctx->cur );
1224 if (*ctx->cur != '{') {
1228 ctx->cur++;
1230 eat_opt_white( &ctx->cur );
1232 if (*ctx->cur != ',') {
1236 ctx->cur++;
1237 eat_opt_white( &ctx->cur );
1242 ret = parse_double(&ctx->cur, &values[i].Uint, &values[i+1].Uint);
1246 ret = parse_int64(&ctx->cur, &values[i].Uint, &values[i+1].Uint);
1250 ret = parse_uint64(&ctx->cur, &values[i].Uint, &values[i+1].Uint);
1254 ret = parse_float(&ctx->cur, &values[i].Float);
1257 ret = parse_uint(&ctx->cur, &values[i].Uint);
1260 ret = parse_int(&ctx->cur, &values[i].Int);
1273 eat_opt_white( &ctx->cur );
1274 if (*ctx->cur != '}') {
1278 ctx->cur++;
1290 const char *cur, *cur2;
1294 if (!eat_white( &ctx->cur )) {
1321 cur = ctx->cur;
1322 eat_opt_white( &cur );
1323 if (*cur == ',') {
1324 cur2 = cur;
1347 ctx->cur = cur = cur2;
1351 if (*cur == ',' && !is_vs_input) {
1354 cur++;
1355 eat_opt_white( &cur );
1358 if (str_match_nocase_whole(&cur, tgsi_texture_names[i])) {
1368 cur2 = cur;
1386 cur = cur2;
1390 ctx->cur = cur;
1394 if (str_match_nocase_whole(&cur, tgsi_texture_names[i])) {
1403 eat_opt_white( &cur );
1404 if (*cur != ',') {
1408 ++cur;
1409 eat_opt_white( &cur );
1412 if (str_match_nocase_whole(&cur, tgsi_return_type_names[i])) {
1439 cur2 = cur;
1444 cur = cur2;
1456 ctx->cur = cur;
1458 if (str_match_nocase_whole(&cur, "ATOMIC")) {
1460 ctx->cur = cur;
1463 if (str_match_nocase_whole(&cur, "GLOBAL")) {
1466 ctx->cur = cur;
1467 } else if (str_match_nocase_whole(&cur, "SHARED")) {
1469 ctx->cur = cur;
1470 } else if (str_match_nocase_whole(&cur, "PRIVATE")) {
1472 ctx->cur = cur;
1473 } else if (str_match_nocase_whole(&cur, "INPUT")) {
1475 ctx->cur = cur;
1478 if (str_match_nocase_whole(&cur, "LOCAL")) {
1480 ctx->cur = cur;
1483 cur = ctx->cur;
1484 eat_opt_white( &cur );
1485 if (*cur == ',') {
1486 cur++;
1487 eat_opt_white( &cur );
1490 if (str_match_nocase_whole(&cur, tgsi_semantic_names[i])) {
1493 cur2 = cur;
1511 cur = cur2;
1517 ctx->cur = cur;
1525 cur = ctx->cur;
1526 eat_opt_white( &cur );
1527 if (*cur == ',' &&
1529 cur++;
1530 eat_opt_white(&cur);
1531 if (str_match_nocase_whole(&cur, "STREAM")) {
1534 eat_opt_white(&cur);
1535 if (*cur != '(') {
1539 cur++;
1542 eat_opt_white(&cur);
1543 if (!parse_uint(&cur, &stream[i])) {
1548 eat_opt_white(&cur);
1550 if (*cur != ',') {
1554 cur++;
1558 if (*cur != ')') {
1562 cur++;
1569 ctx->cur = cur;
1573 cur = ctx->cur;
1574 eat_opt_white( &cur );
1575 if (*cur == ',' && !is_vs_input) {
1578 cur++;
1579 eat_opt_white( &cur );
1581 if (str_match_nocase_whole( &cur, tgsi_interpolate_names[i] )) {
1585 ctx->cur = cur;
1591 cur = ctx->cur;
1592 eat_opt_white( &cur );
1593 if (*cur == ',' && !is_vs_input) {
1596 cur++;
1597 eat_opt_white( &cur );
1599 if (str_match_nocase_whole( &cur, tgsi_interpolate_locations[i] )) {
1602 ctx->cur = cur;
1608 cur = ctx->cur;
1609 eat_opt_white( &cur );
1610 if (*cur == ',' && !is_vs_input) {
1611 cur++;
1612 eat_opt_white( &cur );
1613 if (str_match_nocase_whole( &cur, tgsi_invariant_name )) {
1615 ctx->cur = cur;
1641 if (*ctx->cur == '[') {
1644 ++ctx->cur;
1646 eat_opt_white( &ctx->cur );
1647 if (!parse_uint( &ctx->cur, &uindex )) {
1657 eat_opt_white( &ctx->cur );
1658 if (*ctx->cur != ']') {
1663 ctx->cur++;
1666 if (!eat_white( &ctx->cur )) {
1671 if (str_match_nocase_whole(&ctx->cur, tgsi_immediate_type_names[type]))
1704 const char *cur = *pcur;
1706 if (str_match_nocase_whole( &cur, tgsi_primitive_names[i])) {
1708 *pcur = cur;
1721 const char *cur = *pcur;
1723 if (str_match_nocase_whole( &cur, tgsi_fs_coord_origin_names[i])) {
1725 *pcur = cur;
1738 const char *cur = *pcur;
1740 if (str_match_nocase_whole( &cur, tgsi_fs_coord_pixel_center_names[i])) {
1742 *pcur = cur;
1755 const char *cur = *pcur;
1757 if (str_match_nocase_whole( &cur, tgsi_processor_type_names[i])) {
1759 *pcur = cur;
1774 if (!eat_white( &ctx->cur )) {
1778 if (!parse_identifier( &ctx->cur, id, sizeof(id) )) {
1793 eat_opt_white( &ctx->cur );
1797 if (!parse_primitive(&ctx->cur, &values[0] )) {
1807 if (!parse_fs_coord_origin(&ctx->cur, &values[0] )) {
1813 if (!parse_fs_coord_pixel_center(&ctx->cur, &values[0] )) {
1819 if (!parse_property_next_shader(&ctx->cur, &values[0] )) {
1826 if (!parse_uint(&ctx->cur, &values[0] )) {
1852 eat_opt_white( &ctx->cur );
1860 while (*ctx->cur != '\0') {
1862 if (!eat_white( &ctx->cur )) {
1867 if (*ctx->cur == '\0')
1873 else if (str_match_nocase_whole( &ctx->cur, "DCL" )) {
1877 else if (str_match_nocase_whole( &ctx->cur, "IMM" )) {
1881 else if (str_match_nocase_whole( &ctx->cur, "PROPERTY" )) {
1902 ctx.cur = text;