Ejemplo n.º 1
0
static int
nexpr(enum token n)
{
	if (n == UNOT)
		return !nexpr(t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL));
	return primary(n);
}
Ejemplo n.º 2
0
static int
nexpr(enum token n)
{
	if (n == UNOT)
		return !nexpr(t_lex(*++t_wp));
	return primary(n);
}
Ejemplo n.º 3
0
static int
nexpr(enum token n, struct exists_data *ed)
{

    if (n == UNOT)
        return !nexpr(t_lex(*++(ed->t_wp), ed), ed);
    return primary(n, ed);
}
Ejemplo n.º 4
0
static int
nexpr(shinstance *psh, enum token n)
{

	if (n == UNOT)
		return !nexpr(psh, t_lex(psh, *++psh->t_wp));
	return primary(psh, n);
}
Ejemplo n.º 5
0
static int
nexpr(enum token n)
{
	if (n == UNOT) {
		int res = nexpr(t_lex(*++t_wp));
		return res != -42 ? !res : res;
	}
	return primary(n);
}
Ejemplo n.º 6
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;
}
Ejemplo n.º 7
0
Archivo: test.c Proyecto: alimon/dash
static int
nexpr(enum token n)
{
    if (n != UNOT)
        return primary(n);

    n = t_lex(t_wp + 1);
    if (n != EOI)
        t_wp++;
    return !nexpr(n);
}
Ejemplo n.º 8
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;
}
Ejemplo n.º 9
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;
}
Ejemplo n.º 10
0
Archivo: test.c Proyecto: alimon/dash
static int
aexpr(enum token n)
{
    int res = 1;

    for (;;) {
        if (!nexpr(n))
            res = 0;
        n = t_lex(t_wp + 1);
        if (n != BAND)
            break;
        n = t_lex(t_wp += 2);
    }
    return res;
}
Ejemplo n.º 11
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;
}
Ejemplo n.º 12
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;
}