Re: Help improve program for parsing simple rules

2009-04-20 Thread pruebauno
On Apr 17, 5:32 pm, Paul McGuire wrote: > On Apr 17, 2:40 pm, prueba...@latinmail.com wrote: > > > > > On Apr 17, 11:26 am, Paul McGuire wrote: > > > > On Apr 16, 10:57 am, prueba...@latinmail.com wrote: > > > > > Another interesting task for those that are looking for some > > > > interesting pr

Re: Help improve program for parsing simple rules

2009-04-17 Thread Paul McGuire
On Apr 17, 2:40 pm, prueba...@latinmail.com wrote: > On Apr 17, 11:26 am, Paul McGuire wrote: > > > > > > > On Apr 16, 10:57 am, prueba...@latinmail.com wrote: > > > > Another interesting task for those that are looking for some > > > interesting problem: > > > I inherited some rule system that ch

Re: Help improve program for parsing simple rules

2009-04-17 Thread Aaron Brady
On Apr 17, 2:01 pm, Paul McGuire wrote: > On Apr 17, 1:26 pm, Aaron Brady wrote: > > > Hi, not to offend; I don't know your background.   > > Courtesy on Usenet!!!  I'm going to go buy a lottery ticket! > > Not to worry, I'm a big boy.  People have even called my baby ugly, > and I manage to keep

Re: Help improve program for parsing simple rules

2009-04-17 Thread pruebauno
On Apr 17, 11:26 am, Paul McGuire wrote: > On Apr 16, 10:57 am, prueba...@latinmail.com wrote: > > > Another interesting task for those that are looking for some > > interesting problem: > > I inherited some rule system that checks for programmers program > > outputs that to be ported: given some

Re: Help improve program for parsing simple rules

2009-04-17 Thread Paul McGuire
On Apr 17, 1:26 pm, Aaron Brady wrote: > Hi, not to offend; I don't know your background.   Courtesy on Usenet!!! I'm going to go buy a lottery ticket! Not to worry, I'm a big boy. People have even called my baby ugly, and I manage to keep my blood pressure under control. > One thing I like >

Re: Help improve program for parsing simple rules

2009-04-17 Thread Aaron Brady
On Apr 17, 12:15 pm, Paul McGuire wrote: > On Apr 17, 10:43 am, John Machin wrote: snip > not only does this handle > "0.00 LE A LE 4.00", but it could also evaluate "0.00 LE A LE 4.00 LE > E > D".  (I see that I should actually do some short-circuiting here - > if ret is false after calling fn(v

Re: Help improve program for parsing simple rules

2009-04-17 Thread Aaron Brady
On Apr 17, 7:37 am, prueba...@latinmail.com wrote: > On Apr 16, 3:59 pm, Aaron Brady wrote: > > > > > On Apr 16, 10:57 am, prueba...@latinmail.com wrote: > > > > Another interesting task for those that are looking for some > > > interesting problem: > > > I inherited some rule system that checks f

Re: Help improve program for parsing simple rules

2009-04-17 Thread Paul McGuire
On Apr 17, 10:43 am, John Machin wrote: > > I don't see how it can handle the chained relop in the last two > testcases e. g. '0.00 LE A LE 4.00' -- unless relops are chained by > default in your parser. > John - First of all, to respect precedence of operations, higher level precedences are par

Re: Help improve program for parsing simple rules

2009-04-17 Thread John Machin
On Apr 18, 1:26 am, Paul McGuire wrote: > On Apr 16, 10:57 am, prueba...@latinmail.com wrote: > > > Another interesting task for those that are looking for some > > interesting problem: > > I inherited some rule system that checks for programmers program > > outputs that to be ported: given some s

Re: Help improve program for parsing simple rules

2009-04-17 Thread Paul McGuire
On Apr 16, 10:57 am, prueba...@latinmail.com wrote: > Another interesting task for those that are looking for some > interesting problem: > I inherited some rule system that checks for programmers program > outputs that to be ported: given some simple rules and the values it > has to determine if t

Re: Help improve program for parsing simple rules

2009-04-17 Thread pruebauno
On Apr 16, 9:29 pm, John Machin wrote: > On Apr 17, 1:57 am, prueba...@latinmail.com wrote: > > > COMP_REPLACERS={'LT':'<', 'GT':'>', 'LE':'<=', 'GE':'>=', '=':'==', > > '=>':'=>', '=<':'=<'} > > What do the '=>' and '=<' represent? Why are you replacing each by > itself? because of this: groups=

Re: Help improve program for parsing simple rules

2009-04-17 Thread pruebauno
On Apr 16, 3:59 pm, Aaron Brady wrote: > On Apr 16, 10:57 am, prueba...@latinmail.com wrote: > > > Another interesting task for those that are looking for some > > interesting problem: > > I inherited some rule system that checks for programmers program > > outputs that to be ported: given some si

Re: Help improve program for parsing simple rules

2009-04-16 Thread John Machin
On Apr 17, 1:57 am, prueba...@latinmail.com wrote: > COMP_REPLACERS={'LT':'<', 'GT':'>', 'LE':'<=', 'GE':'>=', '=':'==', > '=>':'=>', '=<':'=<'} What do the '=>' and '=<' represent? Why are you replacing each by itself? -- http://mail.python.org/mailman/listinfo/python-list

Re: Help improve program for parsing simple rules

2009-04-16 Thread Aaron Brady
On Apr 16, 10:57 am, prueba...@latinmail.com wrote: > Another interesting task for those that are looking for some > interesting problem: > I inherited some rule system that checks for programmers program > outputs that to be ported: given some simple rules and the values it > has to determine if t

Help improve program for parsing simple rules

2009-04-16 Thread pruebauno
Another interesting task for those that are looking for some interesting problem: I inherited some rule system that checks for programmers program outputs that to be ported: given some simple rules and the values it has to determine if the program is still working correctly and give the details of