Reply to Re: Butt ugly

Your name:

Reply:


Posted by Chung Leong on 05/29/06 03:44

Norman Peelman wrote:
> So, what would you want to happen? Should the parser go through each
> entire string looking for math equations first then string everything
> together after. I'm thinking that the problem is probably the loose type
> casting of the language. I'm thinking that under normal circumstances math
> is not normally done within a string.

I have been saying the same thing and you keep missing it: the concat
operator should have its own precedence, lower than that of addition
and subtraction. What it involves is changing the line in the parser
definition from

%left '+' '-' '.'

to

%left '.'
%left '+' '-'

Now when the parser encounters "two plus two makes" . 2 + 2, it'll see
that the plus sign has higher precedence than the period (it's lower in
the definition) and will thus process it first.

Got it?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация