Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Logical expressions

by Zaxo (Archbishop)
on Jun 05, 2007 at 03:59 UTC ( [id://619290]=note: print w/replies, xml ) Need Help??


in reply to Logical expressions

Would a little boolean logic parser help? You could construct a Parse::RecDescent parser from standard BNL with actions to populate the hash.

What is the benefit of poking a hash full of this? Is it a parse tree to be executed, like perl constructs in its compile time? In that case it might be convenient to retain order by using arrays instead of hashes. Your (1,2,3) keys suggest you want to order them.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Logical expressions
by rsiedl (Friar) on Jun 06, 2007 at 02:17 UTC
    my thinking was to break the string down to run a series of tests on the articles it is examining.
    the idea behind the hash and ordering is i can work out which tests to run first and if the important ones fail first (AND|NOT), there is no need to continue running the rest of the tests.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://619290]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2024-04-18 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found