Hi,

In message "[ruby-talk:14503] Re: How to do it the Ruby-way 3"
    on 01/05/02, Pixel <pixel / mandrakesoft.com> writes:

|> |what about not discarding the space and using them? :)
|> 
|> I did and failed.  Probably I haven't gone further enough.
|
|nowadays spaces seldom have a syntactic meaning (except for indentation),
|tokenizing usually get rid of spaces very fastly :p

I agree with you.  In Ruby, it is accomplished partly, for example,

  foo[1]  -> foo[1]
  foo [1] -> foo([1])

But function argument is far more complex.  I'd like to 

  foo(1)         -> foo(1)
  foo (1)        -> foo((1))
  foo(1).to_i    -> foo(1).to_i
  foo (1).to_i   -> foo((1).to_i)
  foo (1),2      -> foo((1),2)
  foo(1), 2      -> error!

  foo(1,2)       -> foo(1,2)
  foo (1,2)      -> foo(1,2) with warning
  foo(1,2).to_i  -> foo(1,2).to_i
  foo (1,2).to_i -> error!
  foo (1,2),2    -> error!
  foo(1,2), 2    -> error!

But yacc refused to parse (mostly due to limitation of my ability).
Help from yacc/bison guru is strongly welcome.

							matz.