Example #1
0
def p_primary_flit(p):
    'primary : FLIT'
    p[0] = ast.LitExp(float(p[1]), ast.LitExp.FLOAT, p.lineno(1))
Example #2
0
def p_primary_slit(p):
    'primary : SLIT'
    p[0] = ast.LitExp(p[1], ast.LitExp.STRING, p.lineno(1))
Example #3
0
def p_primary_ilit(p):
    'primary : ILIT'
    p[0] = ast.LitExp(int(p[1]), ast.LitExp.INT, p.lineno(1))