In article <[EMAIL PROTECTED]>,
        Rick Klement <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] wrote:
>> 
>> If anyone has a working tpr05a solution using Parse::RecDescent
>> or other CPAN module can you please post it to the list, as I
>> am also interested in comparing that solution to the others.
> 
--snip--
> 
> Also, instead of using Parse::RecDescent, I did my own recursive
> descent parser, and submitted it in the "Artistic" section at 141.36 (though
> as the comment says, it's really a 137).
> 
> 
> #!perl -p
> sub o{print$"x$|++,shift}
> sub f{s/^-*\d+//?o$&:e(s/.//)+s/.//}
> sub t{f;o$&x1,f while s+^[*/]++}
> sub e{t;o$&x1,t while s/^[+-]//}
> e y/  //d
> 
> 
> This would have scored in the middle of the pack, instead of the
> actual depressing position I finished in.
> 

Notice that my 103 solution is something like that, just written very
compactly. I submitted all basic inbetween steps, so you can actually
see it evolve in the post-mortem.

After giving up on overload I had deluded myself into thinking it needs 
a real parser. Oh well. I console myself that I at least had the shortest
clean recursive descent and the shortest overload solution.

Reply via email to