Lines Matching refs:_curchar

162   if (_curchar != '(') {
169 if ( (_curchar != '%')
170 || ( next_char(), (_curchar != '{')) ) {
178 parse_err(SYNERR, "keyword identifier expected at %c\n", _curchar);
253 } while(_curchar != '%');
255 if (_curchar != '}') {
418 if (_curchar != '(') {
425 if ((_curchar != '%') || (*(_ptr+1) != '{')) { // If not open block
433 parse_err(SYNERR, "keyword identifier expected at %c\n", _curchar);
483 } while(_curchar != '%');
485 if (_curchar != '}') {
513 if (_curchar != '(') {
521 parse_err(SYNERR, "keyword identifier expected at %c\n", _curchar);
535 } while (_curchar == ','); // Check for the comma
537 if (_curchar != ')') {
544 if (_curchar != ';') {
576 if (_curchar != ';') {
611 if (_curchar != ';') {
626 if (_curchar == '%' && *(_ptr+1) == '{') {
629 while (_curchar != '%' && *(_ptr+1) != '}') {
668 if (_curchar == '(') {
684 if (_curchar == ',') {
695 if (_curchar != ')') {
704 if (_curchar != ';') {
785 if (_curchar == '%' && *(_ptr+1) == '{') {
788 while (_curchar != '%' && *(_ptr+1) != '}') {
820 if (_curchar == '%' && *(_ptr+1) == '{') {
823 while (_curchar != '%' && *(_ptr+1) != '}') {
856 if (_curchar == '(') {
863 if (_curchar == ')') break;
868 parse_err(SYNERR, "parameter type expected at %c\n", _curchar);
876 parse_err(SYNERR, "parameter name expected at %c\n", _curchar);
884 } while(_curchar == ',');
886 if (_curchar != ')') parse_err(SYNERR, "missing ')'\n");
894 if ((_curchar != '%') || (*(_ptr+1) != '{')) { // If not open block
915 while ( (_curchar != '%') && (*(_ptr+1) != '}') ) {
920 while ((_curchar != '$') && ((_curchar != '%') || (*(_ptr+1) != '}')) ) {
922 if( (_curchar == '/') && ((*(_ptr+1) == '/') || (*(_ptr+1) == '*')) ) {
938 if (_curchar == '$') {
968 if (_curchar == '%' && *(_ptr+1) == '{') {
971 while (_curchar != '%' && *(_ptr+1) != '}') {
1160 if(_curchar == '(') {
1169 if(_curchar != ';') { // check for semi-colon
1187 if(_curchar == '(') {
1220 if(_curchar != ';') { // check for semi-colon
1233 if(_curchar == '(') {
1237 if(_curchar != ';') { // check for semi-colon
1275 if ( _curchar != '(' ) { // Check for delimiter
1284 parse_err(SYNERR, "keyword identifier expected at %c\n", _curchar);
1289 if ( _curchar != ')' ) { // Check for delimiter
1295 if(_curchar != ';') { // check for semi-colon
1325 if ( (_curchar != '%')
1326 || ( next_char(), (_curchar != '{')) ) {
1334 parse_err(SYNERR, "keyword identifier expected at %c\n", _curchar);
1342 if ( (_curchar != '%')
1343 || ( next_char(), (_curchar != '{')) ) {
1351 parse_err(SYNERR, "expected identifier, found \"%c\"\n", _curchar);
1356 if (_curchar != ',' && _curchar != '=') {
1357 parse_err(SYNERR, "expected `=`, found '%c'\n", _curchar);
1364 parse_err(SYNERR, "expected identifier, found \"%c\"\n", _curchar);
1367 if (_curchar != ';' ) {
1368 parse_err(SYNERR, "expected `;`, found '%c'\n", _curchar);
1374 if ( (_curchar != '%')
1375 || ( next_char(), (_curchar != '}')) ) {
1376 parse_err(SYNERR, "expected '%%}', found \"%c\"\n", _curchar);
1398 if ( (_curchar != '%')
1399 || ( next_char(), (_curchar != '{')) ) {
1405 while (_curchar != '%') {
1412 if (_curchar == ';') {
1423 if (_curchar == ';') {
1434 if (_curchar == ';') {
1444 if (_curchar != '=') {
1453 if (_curchar == ';') {
1462 if (_curchar != '=') {
1471 if (_curchar == ';') {
1480 if (_curchar != '=') {
1481 parse_err(SYNERR, "expected `=`, found '%c'\n", _curchar);
1489 if (_curchar == ';') {
1498 if (_curchar != '=') {
1499 parse_err(SYNERR, "expected `=`, found '%c'\n", _curchar);
1507 if (_curchar == ';') {
1516 if (_curchar != '=') {
1517 parse_err(SYNERR, "expected `=`, found '%c'\n", _curchar);
1525 if (_curchar == ';') {
1534 if (_curchar != '=') {
1535 parse_err(SYNERR, "expected `=`, found '%c'\n", _curchar);
1543 if (_curchar == ';') {
1552 if (_curchar != '(') {
1553 parse_err(SYNERR, "expected `(`, found '%c'\n", _curchar);
1559 while (_curchar != ')') {
1562 parse_err(SYNERR, "expected identifier for nop instruction, found '%c'\n", _curchar);
1570 if (_curchar == ',') {
1577 if (_curchar == ';') {
1587 if ( (_curchar != '%')
1588 || ( next_char(), (_curchar != '}')) ) {
1589 parse_err(SYNERR, "expected '%%}', found \"%c\"\n", _curchar);
1609 if (_curchar == ';')
1611 } while(_curchar != '%');
1614 if (_curchar != '}') {
1632 if (_curchar != '(') {
1648 parse_err(SYNERR, "keyword identifier expected at \"%c\"\n", _curchar);
1653 if (_curchar != '=') {
1660 parse_err(SYNERR, "keyword identifier expected at \"%c\"\n", _curchar);
1671 while (_curchar == '|') {
1676 parse_err(SYNERR, "keyword identifier expected at \"%c\"\n", _curchar);
1695 } while (_curchar == ',');
1697 if (_curchar != ')') {
1698 parse_err(SYNERR, "\")\" expected at \"%c\"\n", _curchar);
1703 if (_curchar == ';')
1713 if (_curchar != '(') {
1722 parse_err(SYNERR, "keyword identifier expected at \"%c\"\n", _curchar);
1731 } while (_curchar == ',');
1733 if (_curchar != ')') {
1734 parse_err(SYNERR, "\")\" expected at \"%c\"\n", _curchar);
1739 if (_curchar == ';')
1758 parse_err(SYNERR, "keyword identifier expected at \"%c\"\n", _curchar);
1769 if (_curchar != '(') {
1776 if ( (_curchar != '%')
1777 || ( next_char(), (_curchar != '{')) ) {
1786 parse_err(SYNERR, "keyword identifier expected at \"%c\"\n", _curchar);
1793 if (_curchar != '(') {
1798 if( !isdigit(_curchar) ) {
1799 parse_err(SYNERR, "number expected for \"%c\" in latency definition\n", _curchar);
1804 if (_curchar != ')') {
1809 if (_curchar != ';') {
1822 if (_curchar != ';') {
1835 if (_curchar != ';') {
1849 if (_curchar != ';') {
1865 if (_curchar != '(') {
1866 parse_err(SYNERR, "\"(\" expected at \"%c\"\n", _curchar);
1874 if (_curchar != ')') {
1875 parse_err(SYNERR, "\")\" expected at \"%c\"\n", _curchar);
1880 if (_curchar != ';') {
1892 if (_curchar != ';') {
1904 if (_curchar != ';') {
1916 if (_curchar != ';') {
1928 if (_curchar != ';') {
1946 if (_curchar != ':') {
1947 parse_err(SYNERR, "\":\" expected at \"%c\"\n", _curchar);
1953 parse_err(SYNERR, "pipeline stage identifier expected at \"%c\"\n", _curchar);
1958 if (_curchar != '(') {
1959 parse_err(SYNERR, "\"(\" expected at \"%c\"\n", _curchar);
1966 parse_err(SYNERR, "\"read\" or \"write\" expected at \"%c\"\n", _curchar);
1973 parse_err(SYNERR, "\"read\" or \"write\" expected at \"%c\"\n", _curchar);
1978 if (_curchar != ')') {
1979 parse_err(SYNERR, "\")\" expected at \"%c\"\n", _curchar);
1985 if (_curchar == '+') {
1987 if (_curchar < '0' || _curchar > '9') {
1988 parse_err(SYNERR, "<number> expected at \"%c\"\n", _curchar);
1991 while (_curchar >= '0' && _curchar <= '9') {
1993 more_instrs += _curchar - '0';
2002 if (_curchar == '%')
2005 if (_curchar != ';') {
2006 parse_err(SYNERR, "\";\" expected at \"%c\"\n", _curchar);
2017 if (_curchar != ':') {
2018 parse_err(SYNERR, "\":\" expected at \"%c\"\n", _curchar);
2024 parse_err(SYNERR, "pipeline stage identifier expected at \"%c\"\n", _curchar);
2029 if (_curchar == '(') {
2034 if (_curchar != ')') {
2035 parse_err(SYNERR, "\")\" expected at \"%c\"\n", _curchar);
2048 if (_curchar == '%')
2051 if (_curchar != ';') {
2052 parse_err(SYNERR, "\";\" expected at \"%c\"\n", _curchar);
2061 } while(_curchar != '%');
2064 if (_curchar != '}') {
2082 if (_curchar == '%' && *(_ptr+1) == '{') {
2085 while (_curchar != '%' && *(_ptr+1) != '}') {
2120 if (_curchar != '(') {
2137 if (_curchar != '(') {
2152 if (_curchar != ')') {
2164 if (_curchar != ')') {
2170 if (_curchar != ';') {
2207 if (_curchar == '(') {
2220 if (_curchar != ',') {
2237 if (_curchar != ',') {
2251 if (_curchar != ',') {
2265 if (_curchar != ',') {
2279 if (_curchar != ')') {
2288 if (_curchar != ';') {
2323 if (_curchar == '(') {
2326 while (_curchar != ')') {
2341 if (_curchar == ',') {
2347 } else if (_curchar == '%') {
2359 if (_curchar != ';') {
2388 if (_curchar == '(') {
2391 while (_curchar != ')') {
2410 if (_curchar == ',') {
2420 if (_curchar != ';') {
2441 if (_curchar == '(') {
2447 else if (_curchar == ')') {
2508 if (_curchar != '(') {
2525 if( _curchar != ')' ) {
2533 if( _curchar != ';' ) {
2561 if (_curchar != '(') {
2571 while( _curchar != ')' ) {
2577 if( _curchar != '.' ) {
2591 if( isdigit(_curchar) ) {
2595 if( _curchar != '.' ) {
2615 if( _curchar == ',' ) {
2619 else if( _curchar != ')' ) {
2628 if (_curchar != ';') {
2653 if (_curchar != '(') {
2676 if (_curchar != '(') {
2687 while( _curchar != ')' ) {
2693 if( _curchar != '.' ) {
2711 assert( _curchar == ')', "While loop should have advanced to ')'.");
2716 if( _curchar != ')' ) {
2725 if( _curchar != ';' ) {
2748 if (_curchar != ';') {
2822 while ((_curchar != '%') && (*(_ptr+1) != '}')) {
2827 while ((_curchar != '$') && ((_curchar != '%') || (*(_ptr+1) != '}')) ) {
2829 if( (_curchar == '/') && ((*(_ptr+1) == '/') || (*(_ptr+1) == '*')) ) {
2845 if (_curchar == '$') {
2859 if (_curchar == '(') {
2870 if (_curchar == '(') constant_parse(inst);
2912 if (_curchar != '(') {
2914 if ((_curchar == '%') && (*(_ptr+1) == '{')) {
2933 while (_curchar != ')') {
2951 if ( _curchar == '(' ) {
2955 while (_curchar != ')') {
2974 if (_curchar == ',' ) {
2979 else if (_curchar == ')') {
2992 if (_curchar == ',') {
2996 if (_curchar != ')') {
3007 if ( _curchar == ',' ) {
3012 else if ( _curchar != ')' ) {
3019 // if ( _curchar != ',' && _curchar != ')' ) {
3025 if (_curchar != ')') {
3032 if ( _curchar != ';' ) {
3114 if (_curchar == '(') {
3119 else if (_curchar == ')') {
3129 while ((_curchar != '$') && (_curchar != '(') && (_curchar != ')')) {
3140 if (_curchar == '$') {
3173 parse_err(SYNERR, "size of opcode expected at %c\n", _curchar);
3180 if (_curchar != ';') {
3209 if (_curchar != '(') { // Check for parenthesized operand list
3215 if (_curchar != ')') {
3218 parse_err(SYNERR, "primary hex opcode expected at %c\n", _curchar);
3222 if (_curchar == ',') {
3227 parse_err(SYNERR, "secondary hex opcode expected at %c\n", _curchar);
3231 if (_curchar == ',') {
3236 parse_err(SYNERR,"tertiary hex opcode expected at %c\n", _curchar);
3243 if (_curchar != ')') {
3251 if (_curchar != ';') {
3278 if (_curchar != '(') {
3290 if (_curchar != ')') {
3300 if ( _curchar != ';' ) {
3310 if ( _curchar == ';' ) {
3343 if (_curchar != '%') {
3348 if (_curchar != '{') {
3376 } while( _curchar != '%' );
3378 if ( _curchar != '}' ) {
3405 if (_curchar != '%') {
3410 if (_curchar != '{') {
3444 } while( _curchar != '%' );
3446 if ( _curchar != '}' ) {
3469 if (_curchar != '(') {
3475 if ( _curchar != '0' && _curchar != '$' ) {
3485 if (format != NULL && _curchar == ',') {
3488 if (_curchar != '"') {
3494 while ((_curchar != '"') && (_curchar != '%') && (_curchar != '\n')) {
3495 if (_curchar == '\\') next_char(); // superquote
3496 if (_curchar == '\n') parse_err(SYNERR, "newline in string"); // unimplemented!
3499 if (_curchar != '"') {
3511 if (_curchar != ')') {
3517 if ( _curchar != ';' ) {
3540 if ( _curchar == ';' ) { // Semicolon is valid terminator
3564 if ( _curchar == ';' ) { // Semicolon is valid terminator
3568 else if ( _curchar == '%' && *(_ptr+1) == '{') {
3573 if (_curchar == '$') {
3580 if ( _curchar == '"' ) {
3582 if( _curchar == '"' ) { // Handle empty format string case
3592 if ( _curchar == '%' || _curchar == '\n' ) {
3593 if ( _curchar != '"' ) {
3602 while ((_curchar != '$') && (_curchar != '"') && (_curchar != '%') && (_curchar != '\n')) {
3603 if (_curchar == '\\') {
3605 if ((_curchar == '$') || (_curchar == '%'))
3607 *(_ptr-1) = _curchar;
3609 if (_curchar == '\n') parse_err(SYNERR, "newline in string"); // unimplemented!
3621 if ( _curchar == '$' ) {
3625 *_ptr = _curchar; // and replace Nil with original character
3634 if ( _curchar == '"') {
3637 if ( _curchar != '"') {
3648 if ( _curchar != '%' ) {
3656 if ( _curchar != '%' || *(_ptr+1) != '}' ) {
3681 while ( (_curchar != '%') && (*(_ptr+1) != '}') ) {
3687 while ((_curchar != '$') && ((_curchar != '%') || (*(_ptr+1) != '}')) ) {
3689 if( (_curchar == '/') && ((*(_ptr+1) == '/') || (*(_ptr+1) == '*')) ) {
3708 if ( _curchar == '$' ) {
3717 if ( _curchar == '"' ) {
3719 if( _curchar == '"' ) { // Handle empty format string case
3729 if ( _curchar == '%' || _curchar == '\n' ) {
3737 while ((_curchar != '$') && (_curchar != '"') && (_curchar != '%') && (_curchar != '\n')) {
3738 if (_curchar == '\\') next_char(); // superquote
3739 if (_curchar == '\n') parse_err(SYNERR, "newline in string"); // unimplemented!
3751 if ( _curchar == '$' ) {
3755 *_ptr = _curchar; // and replace Nil with original character
3764 if ( _curchar == '"') {
3767 if ( _curchar != '"') {
3787 if ( _curchar != '%' || *(_ptr+1) != '}' ) {
3807 if (_curchar != '(') {
3816 if (_curchar != ';') {
3835 if ((_curchar != '%')
3836 || (next_char(), (_curchar != '{')) ) { // If not open block
3844 parse_err(SYNERR, "identifier expected at %c\n", _curchar);
3860 parse_err(SYNERR, "identifier expected at %c\n", _curchar);
3869 if (_curchar == '%') { // Need a constructor for the operand
3872 parse_err(SYNERR, "Invalid code block for operand constructor\n", _curchar);
3878 else if (_curchar != ';') { // If no constructor, need a ;
3890 if (_curchar != '(') { // Check for parenthesized operand list
3897 if (_curchar == ')') break;
3901 parse_err(SYNERR, "identifier expected at %c\n", _curchar);
3915 } while(_curchar == ',');
3916 if (_curchar != ')') {
3921 if (_curchar != ';') {
3933 } while(_curchar != '%');
3935 if (_curchar != '}') {
3990 if (_curchar != ';') {
4136 if (_curchar == '%') { // Encoding is a C++ expression
4138 if (_curchar != '{') {
4147 while(((_curchar != '%') || (*next != '}')) && (_curchar != '\0')) {
4151 if (_curchar == '\0') {
4157 _curchar = *_ptr; // Maintain invariant
4182 while (paren > 0 || !strchr(stop_chars, _curchar)) {
4183 if (_curchar == '(') { // Down level of nesting
4187 else if (_curchar == ')') { // Up one level of nesting
4197 else if (_curchar == '"' || _curchar == '\'') {
4198 int qchar = _curchar;
4201 if (_curchar == qchar) { next_char(); break; }
4202 if (_curchar == '\\') next_char(); // superquote
4203 if (_curchar == '\n' || _curchar == '\0') {
4209 else if (_curchar == '%' && (_ptr[1] == '{' || _ptr[1] == '}')) {
4214 else if (_curchar == '\0') {
4232 assert(strchr(stop_chars, _curchar), "non-null return must be at stop-char");
4238 // Sets _curchar to '(' so that get_paren_expr will search for a matching ')'
4241 if (_curchar != '(') // Escape if not valid starting position
4245 if (_curchar == ')')
4298 _curchar = c; // Save the first character of next token
4335 *_ptr = _curchar; // and replace Nil with original character
4346 if (_curchar == '(') {
4371 if ( _curchar == '$' ) {
4375 if ( _curchar == '$' ) {
4380 if ( _curchar == '$' ) {
4385 if( _curchar == '$' ) {
4407 if( _curchar != '$' ) return NULL;
4413 if ( _curchar == '$' ) {
4418 if ( _curchar == '$' ) {
4423 if( _curchar == '$' ) {
4434 *_ptr = _curchar; // and replace Nil with original character
4447 parse_err(SYNERR, "missing %s identifier at %c\n", nameDescription, _curchar);
4486 _curchar = c; // Save the first character of next token
4489 *end = _curchar; // Restore buffer to original condition
4544 if (_curchar == ')') break;
4549 parse_err(SYNERR, "optype identifier expected at %c\n", _curchar);
4586 } while(_curchar == ',');
4588 if (_curchar != ')') parse_err(SYNERR, "missing ')'\n");
4608 if (_curchar == ')') break;
4613 parse_err(SYNERR, "effect type identifier expected at %c\n", _curchar);
4659 } while(_curchar == ',');
4661 if (_curchar != ')') parse_err(SYNERR, "missing ')'\n");
4674 if (_curchar == '"') {
4678 if (_curchar == '\n') {
4682 if (_curchar == '"') {
4706 if (_curchar != '\n') {
4735 int error_char = _curchar;
4738 _curchar = '\n';
4760 if (_curchar == '\n') { next_line(); return; }
4766 parse_err(SYNERR, "'%c' must be at beginning of line\n", _curchar);
4778 if (_curchar != '\n' && _curchar != '\0') {
4779 parse_err(SYNERR, "garbage char '%c' at end of line\n", _curchar);
4808 char* ident = (_curchar == '\n') ? NULL : get_ident_no_preproc();
4834 _curchar = *--_ptr;
4835 if( _curchar != '#' ) {
4837 assert(_curchar == '#', "no space allowed after # in #define or #undef");
4854 if (_curchar > ' ') return;
4855 if (_curchar == '\n') {
4860 else if (_curchar == '#' ||
4861 (_curchar == '/' && (*next == '/' || *next == '*'))) {
4918 if( _curline != NULL ) // at end of file _curchar isn't valid
4919 _curchar = *_ptr; // reset _curchar to maintain invariant
4924 return (_curchar);
4929 if (_curchar == '\n') parse_err(WARN, "must call next_line!");
4930 _curchar = *++_ptr;
4931 // if ( _curchar == '\n' ) {
4938 if ( _curchar != '\n' ) {
4939 _curchar = *++_ptr;
4943 _curchar = *_ptr; // maintain invariant
4950 _curchar = ' ';