Lines Matching refs:lex
111 struct lexstate lex;
239 lp->lex = savelex.lex; in lexfill()
267 lp->lex.intest = lp->lex.incase = lp->lex.skipword = lp->lexd.warn = 0; in sh_lexopen()
269 lp->lex.reservok = 1; in sh_lexopen()
329 if(lp->lex.incase) in sh_lex()
332 lp->assignok |= lp->lex.reservok; in sh_lex()
334 lp->comp_assign = lp->lex.reservok = 0; in sh_lex()
440 lp->lex.reservok = !lp->lex.intest; in sh_lex()
478 lp->lex.reservok = !lp->lex.intest; in sh_lex()
479 lp->lex.skipword = 0; in sh_lex()
483 lp->lex.last_quote = 0; in sh_lex()
492 if(lp->lex.incase<=TEST_RE) in sh_lex()
497 if(lp->lex.intest) in sh_lex()
507 if(lp->lex.testop2) in sh_lex()
508 lp->lex.testop2 = 0; in sh_lex()
512 lp->lex.skipword = 1; in sh_lex()
513 lp->aliasok = lp->lex.reservok; in sh_lex()
514 lp->lex.reservok = 0; in sh_lex()
519 lp->lex.reservok = !lp->lex.intest; in sh_lex()
523 lp->lex.incase = 0; in sh_lex()
526 lp->lex.testop1 = lp->lex.intest; in sh_lex()
570 lp->lex.reservok = 1; in sh_lex()
571 lp->lex.skipword = 0; in sh_lex()
606 lp->lex.incase = (c==BREAKCASESYM || c==FALLTHRUSYM); in sh_lex()
614 if(c==LPAREN && lp->comp_assign && !lp->lex.intest && !lp->lex.incase) in sh_lex()
672 if(!lp->lex.skipword) in sh_lex()
673 lp->lex.reservok *= 2; in sh_lex()
689 if(c=='~' && n==LPAREN && lp->lex.incase) in sh_lex()
690 lp->lex.incase = TEST_RE; in sh_lex()
746 if(lp->lexd.warn && lp->lex.last_quote && shp->inlineno > lp->lastline) in sh_lex()
747 errormsg(SH_DICT,ERROR_warn(0),e_lexlongquote,lp->lastline,lp->lex.last_quote); in sh_lex()
748 lp->lex.last_quote = 0; in sh_lex()
757 lp->lex.last_quote = '\''; in sh_lex()
789 if(lp->lexd.warn && lp->lex.last_quote && shp->inlineno > lp->lastline) in sh_lex()
790 errormsg(SH_DICT,ERROR_warn(0),e_lexlongquote,lp->lastline,lp->lex.last_quote); in sh_lex()
791 lp->lex.last_quote=0; in sh_lex()
802 lp->lex.last_quote = c; in sh_lex()
845 if(lp->lexd.warn && c==LBRACT && !lp->lex.intest && !lp->lexd.arith && oldmode(lp)!= ST_NESTED) in sh_lex()
1035 if(lp->lexd.level==inlevel+1 && lp->lex.incase>=TEST_RE && !lp->lex.intest) in sh_lex()
1079 lp->lex.reservok = 1; in sh_lex()
1080 lp->lex.skipword = 0; in sh_lex()
1123 if(lp->lex.reservok && !lp->lex.incase) in sh_lex()
1163 if(mode==ST_BEGIN && (lp->lex.reservok||lp->comsub)) in sh_lex()
1188 else if(lp->lex.reservok) in sh_lex()
1191 if(lp->lex.reservok && state[n]==S_BREAK && isfirst) in sh_lex()
1194 && !lp->lex.incase && !lp->lex.intest in sh_lex()
1195 && !lp->lex.skipword) in sh_lex()
1210 if(lp->lex.incase==TEST_RE) in sh_lex()
1212 lp->lex.incase++; in sh_lex()
1285 …else if(n>2 && state[0]=='{' && state[n-1]=='}' && !lp->lex.intest && !lp->lex.incase && (c=='<' |… in sh_lex()
1301 lp->lex.reservok = 1; in sh_lex()
1304 if(assignment || (lp->lex.intest&&!lp->lex.incase) || mode==ST_NONE) in sh_lex()
1336 else if(!lp->lex.skipword) in sh_lex()
1342 if(lp->lex.intest) in sh_lex()
1344 if(lp->lex.testop1) in sh_lex()
1346 lp->lex.testop1 = 0; in sh_lex()
1357 lp->lex.testop1 = 1; in sh_lex()
1362 lp->lex.testop2 = 1; in sh_lex()
1367 lp->lex.incase = 0; in sh_lex()
1372 lp->lex.testop2 = lp->lex.intest = 0; in sh_lex()
1373 lp->lex.reservok = 1; in sh_lex()
1382 if(lp->lex.testop2) in sh_lex()
1387 lp->lex.incase = 1; in sh_lex()
1389 lp->lex.incase = TEST_RE; in sh_lex()
1390 lp->lex.testop2 = 0; in sh_lex()
1401 if(lp->lex.reservok /* && !lp->lex.incase*/ && n<=2) in sh_lex()
1407 if(lp->lexd.warn && c=='{' && lp->lex.incase==2) in sh_lex()
1409 if(lp->lex.incase==1 && c==RBRACE) in sh_lex()
1410 lp->lex.incase = 0; in sh_lex()
1413 else if(!lp->lex.incase && c==LBRACT && state[1]==LBRACT) in sh_lex()
1415 lp->lex.intest = lp->lex.testop1 = 1; in sh_lex()
1416 lp->lex.testop2 = lp->lex.reservok = 0; in sh_lex()
1421 if(!lp->lex.skipword) in sh_lex()
1423 if(n>1 && lp->lex.reservok==1 && mode==ST_NAME && in sh_lex()
1426 if(lp->lex.incase) in sh_lex()
1428 if(lp->lex.incase >1) in sh_lex()
1429 lp->lex.incase = 1; in sh_lex()
1431 lp->lex.incase = 0; in sh_lex()
1437 lp->lex.skipword = 1; in sh_lex()
1438 lp->lex.incase = 2*(c==CASESYM); in sh_lex()
1441 lp->lex.skipword = 0; in sh_lex()
1443 lp->lex.reservok = 0; in sh_lex()
1455 if(!(wordflags&ARG_QUOTED) && (lp->lex.reservok||lp->aliasok)) in sh_lex()
1459 if(!lp->lex.incase && !assignment && fcpeek(0)!=LPAREN && in sh_lex()
1469 lp->lex.reservok = 1; in sh_lex()
1470 lp->assignok |= lp->lex.reservok; in sh_lex()
1474 lp->lex.reservok = 0; in sh_lex()
1476 lp->lex.skipword = lp->lexd.docword = 0; in sh_lex()
1490 save = lp->lex; in comsub()
1494 lp->lex.incase=0; in comsub()
1525 lp->lex.incase=1; in comsub()
1527 lp->lex.incase=0; in comsub()
1532 if(c==RBRACE && lp->lex.incase) in comsub()
1533 lp->lex.incase=0; in comsub()
1537 if(endtok==LBRACE && !lp->lex.incase) in comsub()
1551 if(endtok==LPAREN && !lp->lex.incase) in comsub()
1555 if(lp->lex.incase) in comsub()
1556 lp->lex.incase=0; in comsub()
1573 lp->lex.reservok = 0; in comsub()
1584 lp->lex.reservok = 1; in comsub()
1593 lp->lex = save; in comsub()
1930 if(lp->lex.intest && lp->arg && *lp->arg->argval) in fmttoken()