Posted by Norman Peelman on 05/29/06 06:05
"Chung Leong" <chernyshevsky@hotmail.com> wrote in message
news:1148863466.147820.125560@y43g2000cwc.googlegroups.com...
> 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?
>
I got it...
Norm
Navigation:
[Reply to this message]
|