Esempio n. 1
0
static arith_t aexpr(enum token n)
{
	arith_t res;

	res = nexpr(n);
	if (t_lex(*++t_wp) == BAND)
		return aexpr(t_lex(*++t_wp)) && res;
	t_wp--;
	return res;
}
Esempio n. 2
0
static int
oexpr(enum token n)
{
	int res;

	res = aexpr(n);
	if (t_lex(*++t_wp) == BOR)
		return oexpr(t_lex(*++t_wp)) || res;
	t_wp--;
	return res;
}
Esempio n. 3
0
static arith_t oexpr(enum token n)
{
	arith_t res;

	res = aexpr(n);
	if (t_lex(*++t_wp) == BOR) {
		return oexpr(t_lex(*++t_wp)) || res;
	}
	t_wp--;
	return res;
}
Esempio n. 4
0
static int
aexpr(shinstance *psh, enum token n)
{
	int res;

	res = nexpr(psh, n);
	if (t_lex(psh, *++psh->t_wp) == BAND)
		return aexpr(psh, t_lex(psh, *++psh->t_wp)) && res;
	psh->t_wp--;
	return res;
}
Esempio n. 5
0
static int
oexpr(shinstance *psh, enum token n)
{
	int res;

	res = aexpr(psh, n);
	if (t_lex(psh, *++psh->t_wp) == BOR)
		return oexpr(psh, t_lex(psh, *++psh->t_wp)) || res;
	psh->t_wp--;
	return res;
}
Esempio n. 6
0
static int
aexpr(enum token n)
{
	int res;

	res = nexpr(n);
	if (t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL) == BAND)
		return aexpr(t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL)) &&
		    res;
	t_wp--;
	nargc++;
	return res;
}
Esempio n. 7
0
static int
oexpr(enum token n)
{
	int res;

	res = aexpr(n);
	if (t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL) == BOR)
		return oexpr(t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL)) ||
		    res;
	t_wp--;
	nargc++;
	return res;
}
Esempio n. 8
0
File: test.c Progetto: alimon/dash
static int
oexpr(enum token n)
{
    int res = 0;

    for (;;) {
        res |= aexpr(n);
        n = t_lex(t_wp + 1);
        if (n != BOR)
            break;
        n = t_lex(t_wp += 2);
    }
    return res;
}
Esempio n. 9
0
static int
aexpr(enum token n)
{
	int res;

	res = nexpr(n);
	if (res == -42 || *t_wp == NULL)
		return res;
	if (t_lex(*++t_wp) == BAND) {
		int res2 = aexpr(t_lex(*++t_wp));
		return res2 != -42 ? res2 && res : res2;
	}
	t_wp--;
	return res;
}
Esempio n. 10
0
static int
oexpr(enum token n)
{
	int res;

	res = aexpr(n);
	if (res == -42 || *t_wp == NULL)
		return res;
	if (t_lex(*++t_wp) == BOR) {
		int res2 = oexpr(t_lex(*++t_wp));
		return res2 != -42 ? res2 || res : res2;
	}
	t_wp--;
	return res;
}
Esempio n. 11
0
static int
aexpr(enum token n, struct exists_data *ed)
{
    int res;

    res = nexpr(n, ed);
    if (*(ed->t_wp) == NULL)
        return res;
    if (t_lex(*++(ed->t_wp), ed) == BAND) {
        ed->t_wp_op = NULL;
        return aexpr(t_lex(*++(ed->t_wp), ed), ed) && res;
    }
    (ed->t_wp)--;
    return res;
}
Esempio n. 12
0
static int
oexpr(enum token n, struct exists_data *ed)
{
    int res;

    res = aexpr(n, ed);
    if (*(ed->t_wp) == NULL)
        return res;
    if (t_lex(*++(ed->t_wp), ed) == BOR) {
        ed->t_wp_op = NULL;
        return oexpr(t_lex(*++(ed->t_wp), ed), ed) || res;
    }
    (ed->t_wp)--;
    return res;
}