Lines Matching refs:cp

2019   char *cp;  in handleswitch()  local
2022 cp = strchr(g_argv[i],'='); in handleswitch()
2023 assert( cp!=0 ); in handleswitch()
2024 *cp = 0; in handleswitch()
2028 *cp = '='; in handleswitch()
2036 cp++; in handleswitch()
2048 dv = strtod(cp,&end); in handleswitch()
2060 lv = strtol(cp,&end,0); in handleswitch()
2071 sv = cp; in handleswitch()
2962 char *cp, *nextcp; in Parse() local
3009 for(cp=filebuf; (c= *cp)!=0; ){ in Parse()
3011 if( ISSPACE(c) ){ cp++; continue; } /* Skip all white space */ in Parse()
3012 if( c=='/' && cp[1]=='/' ){ /* Skip C++ style comments */ in Parse()
3013 cp+=2; in Parse()
3014 while( (c= *cp)!=0 && c!='\n' ) cp++; in Parse()
3017 if( c=='/' && cp[1]=='*' ){ /* Skip C style comments */ in Parse()
3018 cp+=2; in Parse()
3019 if( (*cp)=='/' ) cp++; in Parse()
3020 while( (c= *cp)!=0 && (c!='/' || cp[-1]!='*') ){ in Parse()
3022 cp++; in Parse()
3024 if( c ) cp++; in Parse()
3027 ps.tokenstart = cp; /* Mark the beginning of the token */ in Parse()
3030 cp++; in Parse()
3031 while( (c= *cp)!=0 && c!='\"' ){ in Parse()
3033 cp++; in Parse()
3040 nextcp = cp; in Parse()
3042 nextcp = cp+1; in Parse()
3046 cp++; in Parse()
3047 for(level=1; (c= *cp)!=0 && (level>1 || c!='}'); cp++){ in Parse()
3051 else if( c=='/' && cp[1]=='*' ){ /* Skip comments */ in Parse()
3053 cp = &cp[2]; in Parse()
3055 while( (c= *cp)!=0 && (c!='/' || prevc!='*') ){ in Parse()
3058 cp++; in Parse()
3060 }else if( c=='/' && cp[1]=='/' ){ /* Skip C++ style comments too */ in Parse()
3061 cp = &cp[2]; in Parse()
3062 while( (c= *cp)!=0 && c!='\n' ) cp++; in Parse()
3068 for(cp++; (c= *cp)!=0 && (c!=startchar || prevc=='\\'); cp++){ in Parse()
3080 nextcp = cp; in Parse()
3082 nextcp = cp+1; in Parse()
3085 while( (c= *cp)!=0 && (ISALNUM(c) || c=='_') ) cp++; in Parse()
3086 nextcp = cp; in Parse()
3087 }else if( c==':' && cp[1]==':' && cp[2]=='=' ){ /* The operator "::=" */ in Parse()
3088 cp += 3; in Parse()
3089 nextcp = cp; in Parse()
3090 }else if( (c=='/' || c=='|') && ISALPHA(cp[1]) ){ in Parse()
3091 cp += 2; in Parse()
3092 while( (c = *cp)!=0 && (ISALNUM(c) || c=='_') ) cp++; in Parse()
3093 nextcp = cp; in Parse()
3095 cp++; in Parse()
3096 nextcp = cp; in Parse()
3098 c = *cp; in Parse()
3099 *cp = 0; /* Null terminate the token */ in Parse()
3101 *cp = (char)c; /* Restore the buffer */ in Parse()
3102 cp = nextcp; in Parse()
3182 char *cp; in file_makename() local
3187 cp = strrchr(filename, '/'); in file_makename()
3188 if( cp ) filename = cp + 1; in file_makename()
3205 cp = strrchr(name,'.'); in file_makename()
3206 if( cp ) *cp = 0; in file_makename()
3526 char *path,*cp; in pathsearch() local
3530 cp = strrchr(argv0,'\\'); in pathsearch()
3532 cp = strrchr(argv0,'/'); in pathsearch()
3534 if( cp ){ in pathsearch()
3535 c = *cp; in pathsearch()
3536 *cp = 0; in pathsearch()
3539 *cp = c; in pathsearch()
3548 cp = strchr(pathbuf,':'); in pathsearch()
3549 if( cp==0 ) cp = &pathbuf[lemonStrlen(pathbuf)]; in pathsearch()
3550 c = *cp; in pathsearch()
3551 *cp = 0; in pathsearch()
3553 *cp = c; in pathsearch()
3555 else pathbuf = &cp[1]; in pathsearch()
3646 char *cp; in tplt_open() local
3666 cp = strrchr(lemp->filename,'.'); in tplt_open()
3667 if( cp ){ in tplt_open()
3668 lemon_sprintf(buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename); in tplt_open()
3735 char *cp = 0; in emit_destructor_code() local
3738 cp = lemp->tokendest; in emit_destructor_code()
3739 if( cp==0 ) return; in emit_destructor_code()
3742 cp = sp->destructor; in emit_destructor_code()
3749 cp = lemp->vardest; in emit_destructor_code()
3750 if( cp==0 ) return; in emit_destructor_code()
3755 for(; *cp; cp++){ in emit_destructor_code()
3756 if( *cp=='$' && cp[1]=='$' ){ in emit_destructor_code()
3758 cp++; in emit_destructor_code()
3761 if( *cp=='\n' ) (*lineno)++; in emit_destructor_code()
3762 fputc(*cp,out); in emit_destructor_code()
3847 char *cp, *xp; in translate_code() local
3923 for(cp=(char *)rp->code; *cp; cp++){ in translate_code()
3924 if( cp==zSkip ){ in translate_code()
3926 cp += lemonStrlen(zOvwrt)-1; in translate_code()
3930 if( ISALPHA(*cp) && (cp==rp->code || (!ISALNUM(cp[-1]) && cp[-1]!='_')) ){ in translate_code()
3932 for(xp= &cp[1]; ISALNUM(*xp) || *xp=='_'; xp++); in translate_code()
3935 if( rp->lhsalias && strcmp(cp,rp->lhsalias)==0 ){ in translate_code()
3937 cp = xp; in translate_code()
3941 if( rp->rhsalias[i] && strcmp(cp,rp->rhsalias[i])==0 ){ in translate_code()
3947 }else if( cp!=rp->code && cp[-1]=='@' ){ in translate_code()
3961 cp = xp; in translate_code()
3969 append_str(cp, 1, 0, 0); in translate_code()
3973 cp = append_str(0,0,0,0); in translate_code()
3974 if( cp && cp[0] ) rp->code = Strsafe(cp); in translate_code()
4030 cp = append_str(0,0,0,0); in translate_code()
4031 if( cp && cp[0] ){ in translate_code()
4032 rp->codeSuffix = Strsafe(cp); in translate_code()
4049 const char *cp; in emit_code() local
4054 for(cp=rp->codePrefix; *cp; cp++){ if( *cp=='\n' ) (*lineno)++; } in emit_code()
4064 for(cp=rp->code; *cp; cp++){ if( *cp=='\n' ) (*lineno)++; } in emit_code()
4075 for(cp=rp->codeSuffix; *cp; cp++){ if( *cp=='\n' ) (*lineno)++; } in emit_code()
4140 char *cp; in print_stack_union() local
4149 cp = sp->datatype; in print_stack_union()
4150 if( cp==0 ) cp = lemp->vartype; in print_stack_union()
4152 while( ISSPACE(*cp) ) cp++; in print_stack_union()
4153 while( *cp ) stddt[j++] = *cp++; in print_stack_union()