I have installed VMware on my Desktop. Then i installed Ubuntu 10.10 in VMware. I installed flex_2.5.35-9_i386.deb and m4_1.4.13-3_i386.deb packages for lex programs. I tried to run lex programs through terminal, there is no problem of compilation. But when i enter input it goes on accepting it. Never gone forward for processing. It shows blank after entering input. Is there some kind problem with version or packages.
1 Answer
By enter input you mean you run flex
in a terminal and then write the lexing rules by hand in the terminal?
In this case, you indicate the end of the input with an EOF (end of file) character, which is generated by typing Ctrl-d
. This also applies to any other terminal utilities that read input from stdin
.
Minimal example:
user@host:~ flex
%%
...add end of file with ctrl-d
and the output is written to lex.yy.c
in the same directory.