Lines Matching refs:lp
71 #define sh_getlineno(lp) (lp->lastline)
244 static Shnode_t *makeparent(Lex_t *lp, int flag, Shnode_t *child)
250 par->fork.forkline = sh_getlineno(lp)-1;
282 static Shnode_t *getanode(Lex_t *lp, struct argnod *ap)
286 t->ar.arline = sh_getlineno(lp);
289 t->ar.arcomp = sh_arithcomp(lp->sh,ap->argval);
293 errormsg(SH_DICT,ERROR_warn(0),e_lexwarnvar,lp->sh->inlineno);
411 Shnode_t *sh_dolparen(Lex_t* lp)
415 int line = lp->sh->inlineno;
416 lp->sh->inlineno = error_info.line+lp->sh->st.firstline;
417 sh_lexopen(lp,lp->sh,1);
418 lp->comsub = 1;
419 switch(sh_lex(lp))
423 t = getanode(lp,lp->arg);
426 t = sh_cmd(lp,RPAREN,SH_NL|SH_EMPTY);
429 t = sh_cmd(lp,RBRACE,SH_NL|SH_EMPTY);
432 lp->comsub = 0;
448 lp->sh->inlineno = line;
1877 static Shnode_t *test_expr(Lex_t *lp,int sym)
1879 register Shnode_t *t = test_or(lp);
1880 if(lp->token!=sym)
1881 sh_syntax(lp);
1885 static Shnode_t *test_or(Lex_t *lp)
1887 register Shnode_t *t = test_and(lp);
1888 while(lp->token==ORFSYM)
1889 t = makelist(lp,TORF|TTEST,t,test_and(lp));
1893 static Shnode_t *test_and(Lex_t *lp)
1895 register Shnode_t *t = test_primary(lp);
1896 while(lp->token==ANDFSYM)
1897 t = makelist(lp,TAND|TTEST,t,test_primary(lp));
2055 Lex_t *lp = (Lex_t*)data;
2057 kiaentity(lp,name+1,-1,*name,0,-1,(*name=='p'?lp->unknown:lp->script),np->nvalue.i,nv_size(np),"");