Ilya Zakharevich on Mon, 17 Sep 2001 12:41:23 -0400 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Space removal from the user input |
On Mon, Sep 17, 2001 at 01:30:21PM +0200, Bill Allombert wrote: > > > b) When processing multiline-input from readline, \n is removed too > > > agressively. Example: type > > > > > > print(1) ^V ^J print(2) ENTER > > > > > > (here ^V and ^J are control-chars). I see: > > > > > > ? print(1) > > > print(2) > > > *** unused characters: print(1)print(2) > > > > > > i.e., \n in the input is removed, resulting in a "wrong error". > > > > > > Should not filtre() replace '\n' with ';' when in f_READL mode? > > It should not. The GP grammar include a special self-destructing "end of line token" that is > very different from ';',because it ends functions definitions. > > ? f(x)=print(x) > print(2) > > You mean really > { > f(x)=print(x) > print(2) > } > and not > { > f(x)=print(x);print(2) > } I meant exaclty the second thing. I think that the Multi-line input via ReadLine's embedded '\n' should be equivalent to having the input in {}, and the newlines replaced by ';'. Ilya