Complex Layout Problem
Dar Scott
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 20.20.1.2 and wants
> this combination OR sAddr 30.20.34.12 AND NOT dAddr 12.10.2.3
>
> This builds the expression
>
> (sAddr 10.10.2.3 AND dAddr 20.20.1.2) OR (sAddr 30.20.34.12 NOT dAddr
> 12.10.2.3)
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")
Dar Scott
More information about the use-livecode
mailing list