Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Icon > Re: scanning en...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 179 of 189
Post > Topic >>

Re: scanning environments

by Steve Wampler <swampler@[EMAIL PROTECTED] > Apr 8, 2008 at 08:03 AM

Thomas Crone wrote:
> Instead I made a GetTag procedure that found the ">", and returned
> an endFlag, TagName, and Attributes back to the Line ? environment.

That sounds pretty reasonable.

> When does Icon go back from an "inner" environment to the outer?
> I presume at least at the end of the "block" the inner serch started in?

No, it should go back at the end of the scanning expression itself.
(Unless the implementation has changed drastically!!)

> For example,
> 
> Line ? {
>    ...
>    {
>       tag ? {
>          ...
>       }
>       # are there any cases where we would be back to Line ? here?
In all cases you would be back inside the Line ? scanning environment
here.

>    }
>    # here we would be definitely back to the Line ? environment?
Yes, but only because it's already back.

> }

You can think of (LHS ? RHS) as operating as follows:

(1) Evaluate LHS to get a (string) value.
(2) push existing &subject, &pos unto a stack
(3) Assign (string) value of LHS to &subject, and 1 to &pos
(4) Evaluate RHS, producing an outcome (a value or failure)
(5) Restore &subject, &pos from stack
(6) Re****t the outcome of the evaluation of the RHS

There's no need to consider surrounding context. Once

     LHS ? RHS

has been evaluated, you're back in whatever scanning environment existed
previously.



-- 
Steve Wampler -- swampler@[EMAIL PROTECTED]
 gods that smiled on your birth are now laughing out loud.
 




 4 Posts in Topic:
scanning environments
Thomas Crone <tomnjan@  2008-04-01 19:06:46 
Re: scanning environments
Steve Wampler <swample  2008-04-02 08:51:34 
Re: scanning environments
Thomas Crone <tomnjan@  2008-04-07 22:27:40 
Re: scanning environments
Steve Wampler <swample  2008-04-08 08:03:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 17:09:59 CDT 2008.