help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redirection question


From: Nikos Balkanas
Subject: Re: Redirection question
Date: Tue, 8 Jan 2002 12:35:03 +0200

Happy 2002!

Your problem seems simple enough. ECHO will echo what you need. ECHO is also
the default action.
Which means that a lexer like this:

...
%%
%%
...

will print all input to its output. And is equivalent to:

...
%%

.            { ECHO; }
\n           { ECHO; }
%%

Most likely the input 'dm 100 13f\n' is processed from a different pattern
that 'dm 0\n'. The first pattern most likely eats up newlines. Try flex -d
to get a trace of your program actions. If you cannot find it post or send
me the code. I bet there is a:

\n        {}

lurking somewhere.

Nikos
----- Original Message -----
From: ROLAND <address@hidden>
To: <address@hidden>
Sent: Monday, January 07, 2002 4:12 PM
Subject: Redirection question


> First let me wish you all a very good 2002!
>
> I have asked a question like this before, and got a
> reply which helped me a lot, but not completely...
> I need to run a program and redirect both the input as
> well as the output to a file.
> Normally I use 'program <input >output', but this
> didn't work, since the input was not redirected to the
> output.
> Now I'm using ECHO in my Lexical Analyzer, and the
> command above does work, except for 1 specific rule...
> The program uses a command called 'dm', and when I run
> 'dm 0\n' the output looks okay, but when I run 'dm 100
> 13f\n' the output is wrong, because the '\n' is not
> echoed to the output!
> Does anybody know how I can ECHO everything, without
> losing ANY funtionality in my program?
> Or is it possible to make this redirecting work
> without the use of ECHO?
>
> Roland
>
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
>
> _______________________________________________
> Help-flex mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-flex
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]