Re: Re: Writing a parser

From: Date: Wed, 10 Jul 2002 08:31:06 +0000
Subject: Re: Re: Writing a parser
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7621@lists.php.net to get a copy of this message
le 9/07/02 21:35, Brent Cook à busterb@mail.utexas.edu a écrit : > The bad news is that it's about 150 lines to do this, since I just used > strtok() and went to town. Maybe regular expressions would be more > efficient (but possibly less clear). Five dollars to the first person to > do it in less than 100 lines ;) Hi Brent, I don't think regular expressions would help here. IMHO, your choice to use strtok or just split and then walk through the array is the best choice. I made a Google query parser one day for Oracle Text and this is the way I did it too. It seems to be efficient. Bertrand Mansion Mamasam

« previous php.pear.dev (#7621) next »