SKETCH OF HOW RESEARCH MIGHT CONTINUE AND RESULTS BE PRESENTED

The JScript Language

A script written in JScript is processed for execution in three steps: scanning, parsing and code generation.

Scanning is what is known in C and C++ as preprocessing, to deal with what the ECMA Standard calls the lexical grammar. The input text is received by JSCRIPT.DLL as a sequence of essentially arbitrary (Unicode) characters. Each scan reads some number of these characters, in sequence, to produce a token in the syntactic grammar. Parsing takes the sequence of such tokens as its input to produce an intermediate evaluation of what the script is to do. Note that JSCRIPT does not scan the whole script and then parse the whole result. Scanning goes only as far as needed for each token when wanted for parsing: if a parse error is discovered, scanning the remainder of the script would be pointless and will have been avoided.

Code generation, however, is done as a separate step. The whole script is parsed, and then so-called P-code is generated for the whole script.