On 2006–03–06, at 23:55, James Reynolds wrote:

Over the weekend I tried to find the most elegant solution to tokenizing and parsing POV-Ray scene files, which uses a c-like scripting language. I came to the conclusion that there are many solutions out there, but in trying to understand them it seems easiest (and take as much time to implement) if I just wrote my own. (I've never studied lexical analysis, but I understand the basic concepts).

Does anyone have any opinions on tokenizing and parsing files?

There's more than one way to do it, of course. But a popular Perl module is Parse::RecDescent. You'll have to install it yourself, as it's not part of the Perl core distribution. If you have not done this before, see the perlmodinstall man page.

There's a tutorial for Parse::RecDescent at <http://www.perl.com/pub/ a/2001/06/13/recdecent.html>.
--
Dominic Dunlop

Reply via email to