Your grammar's start non-terminal is called "linea", and for good reason: it defines exactly one line (una línea). Bison parsers recognize precisely the start non-terminal followed by an end-of-file, so if your input contains more than one line, the parser will report a syntax error when it encounters something other than an EOF after the first line.
If you want to recognize multiple lines, you need to write a grammar which matches multiple lines:
programa : linea
| programa linea