Scott David Daniels <[EMAIL PROTECTED]> wrote:
>
>What kind of shenanigans must a parser go through to translate:
> <x**2 with(x)><<x**3 with(x)>
>
>this is the comparison of two functions, but it looks like a left-
>shift on a function until the second with is encountered. Then
>you need to backtrack to the shift and convert it to a pair of
>less-thans before you can successfully translate it.
C++ solves this exact problem quite reasonably by having a greedy
tokenizer. Thus, that would always be a left shift operator. To make it
less than and a function, insert a space:
<x**2 with(x)>< <x**3 with(x)>
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list