Open Computing ``Hands-On'' Tutorial: January 1994: Figures
Figure 1. Workspace does not match
the left-hand side:
bob@here the workspace
nothing matches
Rleft.side new.stuff this is a comment
Figure 2. How ``x'' and ``y'' become
``a''.
x the workspace
exact match, so: TRUE
Rx y first rule rewritten
y workspace to be this
exact match, so TRUE
Ry z second rule
Figure 3. How ``x'' and ``y'' become
``a'', another view:
x becomes y becomes z becomes a
y becomes z becomes a
z becomes a
Figure 4. An operator in the left-hand
side.
R$+ $@match
lhs rhs
Figure 5. Tokenizing an address with user
and host portions:
gw@wash.dc.gov
tokenized into
"gw" "@" "wash" "." "dc" "." "gov" in the workspace
Figure 6. A good versus a bad address:
gw@wash.dc.gov $+ matches
@wash.dc.gov $+ also matches an incomplete address
Figure 7. How $+@$+
matches the workspace:
workspace pattern
"gw" "$+" match one or more
"@" "@" exact match
"wash" "$+" matches one
"." or more
"dc"
"."
"gov"
Figure 8. Why $+@$+
doesn't match @wash.dc.gov
:
workspace pattern
"@" "$+" match one
"wash" or more
"."
"dc"
"."
"gov"
"@" match exactly (fails!)
"$+"
Figure 9. The flow of an address
through the rules:
user@host.domain does not match the rule:
R@ $@one
so try the next rule:
R@$+ $@two
which doesn't match so try the next rule, which does:
R$+@$+ $@three
Copyright © 1995 The McGraw-Hill Companies, Inc. All Rights Reserved.
Edited by Becca Thomas / Online Editor / UnixWorld Online /
beccat@wcmh.com
Last Modified: Thursday, 30-Nov-95 16:53:19 PST