in reply to Parsing a tree instead of a string?

According to Ovid who has looked into the different logic programming modules on CPAN it doesn't seem like any of them do the job that well. Otherwise I'd recommend you to look into logic programming. Ovid has written some nodes about it, perhaps you want to look at Bringing Logic Programming to Perl. One of Prolog 's problem domains is grammar parsing, so building trees and matching against them is a job it does well. Perhaps you can even utilize an external Prolog program in your Perl program?

ihb

See perltoc if you don't know which perldoc to read!
Read argumentation in its context!

  • Comment on Re: Parsing a tree instead of a string?

Replies are listed 'Best First'.
Re^2: Parsing a tree instead of a string?
by nothingmuch (Priest) on Jan 23, 2005 at 09:55 UTC
    This, and as Corion mentioned to me on the CB, lisp's pattern matching, seems like the way to go.

    It also seems like the most interesting approach too, but the problem is that it might take long to learn everything. Oh well, this is just a hobby project, and since I can't devote too much time to it anyway, it's taking long already. ;-)

    -nuffin
    zz zZ Z Z #!perl