Exemplo n.º 1
0
def p_selectStmt_2(t):
    """selectStmt : R_SELECT selectParams fromCl whereCl groupByCl limitCl orderByCl"""
    t[0] = instruction2.Select(
        t[2],
        t[3],
        t[4],
        t[5][0],
        t[5][1],
        t[6],
        t[7],
        False,
        t.slice[1].lineno,
        t.slice[1].lexpos,
    )
    repGrammar.append(t.slice)
Exemplo n.º 2
0
def p_selectStmt_1(t):
    """selectStmt : R_SELECT R_DISTINCT selectParams fromCl whereCl groupByCl limitCl orderByCl"""
    t[0] = instruction2.Select(
        t[3].params,
        t[4],
        t[5],
        t[6][0],
        t[6][1],
        t[7],
        t[8],
        True,
        t.slice[1].lineno,
        t.slice[1].lexpos,
    )
    repGrammar.append(t.slice)