Beispiel #1
0
def p_instruccion_select(t):
    '''
    query : SELECT dist lcol FROM lcol
    '''
    val = []
    val.append(
        Select.Select(t[2], t[3], t[5], None, None, None, t.lexer.lineno,
                      t.lexer.lexpos))
    t[0] = SelectLista.SelectLista(val, t.lexer.lineno, t.lexer.lexpos)
Beispiel #2
0
def p_instruccion_select7(t):
    '''
    query   : SELECT dist lcol FROM lcol lrows
    '''
    #            dist  tipo  lcol  lcol  linners where lrows
    val = []
    val.append(
        Select.Select(t[2], t[3], t[5], None, None, t[6], t.lexer.lineno,
                      t.lexer.lexpos))
    t[0] = SelectLista.SelectLista(val, t.lexer.lineno, t.lexer.lexpos)
Beispiel #3
0
def p_instruccion_select6(t):
    '''
    query : SELECT dist lcol 
    '''
    #            dist  tipo  lcol  lcol  linners where lrows
    t[0] = SelectLista.SelectLista(t[3], t.lexer.lineno, t.lexer.lexpos)
Beispiel #4
0
def p_lista_columas5(t):
    '''lcol : expre AS nombre
    '''
    t[0] = [SelectLista.Alias(t[3], t[1])]
Beispiel #5
0
def p_lista_columas4(t):
    '''lcol : expre nombre
    '''
    t[0] = [SelectLista.Alias(t[2], t[1])]
Beispiel #6
0
def p_lista_columas2(t):
    '''lcol : lcol COMA expre AS nombre
    '''
    t[1].append(SelectLista.Alias(t[5], t[3]))
    t[0] = t[1]