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