He wants to find links in a document which uses javascript. Based on his 
site, I'm assuming he's working on some kind of shoppping bot, and some 
merchants do, in fact, use javascript to link from one document to another, 
and not just the standard href stuff. they do this weird thing with onclick 
and some other stuff, check out:
http://www.lucy.com/ObjectBuilder/ObjectBuilder.iwx?processname=ProductDirectory_Body&Section_Id=788&req_type=2&page_no=

as an example

>From: Justin Case <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>CC: [EMAIL PROTECTED]
>Subject: Re: Javascript interpreter?
>Date: Tue, 28 Nov 2000 08:44:12 -0700
>
>Julian Monteiro wrote:
> > I'm trying do make a Robot which interpretate Javascript pages.
>
>HTML is a STRUCTURAL language. It describes the STRUCTURE of a document. A 
>robot
>can analyze and validate the structure to see if it conforms to the rules 
>of the
>language. It can also extract "meaning" (e.g. a link) from the document 
>because
>the structure defines what the parts "mean".
>
>JavaScript (and Java) are PROCEDURAL languages. They can make branching
>decisions and execute loops. A robot could validate the syntax of the 
>language,
>but to find out what it "means" (e.g. to extract links for a spider) the 
>robot
>would have to execute or emulate the instructions. In other words, a badly 
>coded
>web page could put your robot into an infinite loop.
>
>Also, for your robot to fully examine the "meaning" of the program, it 
>would
>have to follow BOTH SIDES of each branch in the logic, to see where it 
>leads.
>This quickly creates a nearly infinite group of permutations in all but the
>simplest programs.
>
>Anyone intending to develop (or ask someone else to develop) a JavaScript
>"interpretater" needs to consider these issues and realize that reliably
>extracting the "meaning" from program source code is a computationally
>prohibitive task.
>
>To put it another way, a compiler can identify syntax errors in a program. 
>So
>could a robot. But to find logic errors (or the outcome of correct logic) 
>you
>have to actually run the code.
>
>So what is it you want this "interpretater" to produce?

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

Reply via email to