Complex Layout Problem
dsc at swcp.com
Fri Oct 31 19:03:12 EST 2003
On Thursday, October 30, 2003, at 12:53 PM, Bojsza wrote:
> Example: The user enters sAddr 10.10.2.3 dAddr 184.108.40.206 and wants
> this combination OR sAddr 220.127.116.11 AND NOT dAddr 18.104.22.168
> This builds the expression
> (sAddr 10.10.2.3 AND dAddr 22.214.171.124) OR (sAddr 126.96.36.199 NOT dAddr
You might try an RPN calculator that build expressions rather than
evaluate them. You can design it in such a way that only valid
expressions can be built. You can even make sensitive to the type of
data (based on the operator that created it) and dim buttons not
applicable. This can be expanded to other IP packet and TCP packet
header fields as well as other relational operators.
You might alternately try allowing a user to type in an expression.
This runs into a parsing problem, of course.
Some of the online search engines greatly limit the kinds of
expressions using some fields for values. This might be too
restrictive for you.
(You didn't ask, I know... Users like to have the option of seeing the
relational operator and maybe the long name of the field. Like this:
"source IP address = 10.10.2.3 and TTL < 23" A quarter century ago I
created a method for "factoring" logical expressions so one could do
things like this: "source or destination IP address = 10,10.2.3,
10.10.2.51 or 10.10.3.1")
More information about the Use-livecode