Re: Help improve program for parsing simple rules

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

Re: Help improve program for parsing simple rules

2009-04-17 Thread pruebauno
On Apr 16, 3:59 pm, Aaron Brady castiro...@gmail.com 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:

Re: Help improve program for parsing simple rules

2009-04-17 Thread pruebauno
On Apr 16, 9:29 pm, John Machin sjmac...@lexicon.net 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:

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 the

Re: Help improve program for parsing simple rules

2009-04-17 Thread John Machin
On Apr 18, 1:26 am, Paul McGuire pt...@austin.rr.com 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:

Re: Help improve program for parsing simple rules

2009-04-17 Thread Paul McGuire
On Apr 17, 10:43 am, John Machin sjmac...@lexicon.net 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

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 castiro...@gmail.com 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

Re: Help improve program for parsing simple rules

2009-04-17 Thread Aaron Brady
On Apr 17, 12:15 pm, Paul McGuire pt...@austin.rr.com wrote: On Apr 17, 10:43 am, John Machin sjmac...@lexicon.net 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

Re: Help improve program for parsing simple rules

2009-04-17 Thread Paul McGuire
On Apr 17, 1:26 pm, Aaron Brady castiro...@gmail.com 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.

Re: Help improve program for parsing simple rules

2009-04-17 Thread pruebauno
On Apr 17, 11:26 am, Paul McGuire pt...@austin.rr.com 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:

Re: Help improve program for parsing simple rules

2009-04-17 Thread Aaron Brady
On Apr 17, 2:01 pm, Paul McGuire pt...@austin.rr.com wrote: On Apr 17, 1:26 pm, Aaron Brady castiro...@gmail.com 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

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 pt...@austin.rr.com 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

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

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 the

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