Multiphase single pass interpreter

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S142000, C717S143000

Reexamination Certificate

active

06715141

ABSTRACT:

TECHNICAL FIELD OF THE INVENTION
The present invention relates generally to computer programming language interpreter and particularly, to system and method for multiphase single pass interpreter.
BACKGROUND OF THE INVENTION
An interpreter typically carries out a series of commands in a program or a script one command at a time by requesting services from an operating system. In general, script languages which are interpreted by interpreters are easier and faster to code than the more structured and compiled languages such as C. The script, however, takes longer time to execute than a compiled program because each instruction requires interpretation before the basic machine instruction processing can begin.
Particularly, most interpreters use the two pass method of interpreting. On the first pass, the existing interpreters convert the entire program or code into a simplistic micro-code that performs conditional and unconditional jumps. The micro-code is generally known as p-code. On the second pass, these prior art interpreters execute the precompiled p-code. Therefore, it is highly desirable to have an interpreter that would maintain all the advantages of the interpreter but at the same time reduce the long run-time duration that is typically associated existing prior art program interpreters.
SUMMARY OF THE INVENTION
The present invention is directed to a scripting language interpreter that changes its mode of execution in a single pass as lines of code are read and interpreted. The interpreter of the present invention scans a program file while in scan phase, also referred hereinafter as a linear mode, parsing and writing out what is scanned. Also in the scan phase, if the interpreter encounters dynamic variables that need to be resolved, the interpreter resolves them with their corresponding literal content. When a predetermined symbol that signals the beginning of a script is encountered, for example, a DynaScript® start tag, the interpreter changes its mode of execution to full parse phase. In full parse phase, the interpreter tokenizes and parses lines of code in their entirety, executing the lines of code as they are parsed. The interpreter remains in full parse phase until a script stop token is detected. Upon detecting the script stop token, the interpreter switches its mode back to the scan phase.
While in full parse phase, the interpreter of the present invention may switch its mode to a p-code generation and execution phase. The p-code generation and execution phase is activated when the interpreter detects an existence of a conditional logic block while operating in the full parse phase. In p-code generation phase, the interpreter generates lines of p-code associated with the conditional logic block. After the conditional logic block is translated into lines of p-code, the interpreter switches its mode to p-code execution phase, wherein the interpreter executes the generated p-code. The generated p-code is executed using macro instructions that include basic conditional and unconditional jumps or branching instructions. After the interpreter completes processing the conditional logic block, the interpreter switches its mode back to the full parse phase and continues its processing according to the method described hereinabove with reference to the full parse phase.
The interpreter remains in full parse phase until a script stop token is detected. Upon detecting the script stop token, the interpreter switches its mode back to the scan phase and continues its processing according to the method described hereinabove with reference to the scan phase. When an end of file or end of source buffer is detected the interpreter enters the termination phase. Briefly, DynaScript® is an interpreter implementing an object type declaration syntax prefix and is described in greater detail in co-pending U.S. patent application Ser. No. 09/583,672 entitled OBJECT TYPE-DECLARATION PREFIX SYNTAX, filed on May 31, 2000.
The interpreter of the present invention includes a lexan or lexical analyzer that analyzes each character and generates tokens based on the characters analyzed. A parser performs semantic validation to determine if the generated tokens are semantically correct. A p-code generator generates the p-code based on the parsed tokens. Each p-code generated is inserted into a p-code execution list The generated p-code is then executed by resetting the pointer to the beginning of the p-code execution list and executing the p-code one line at a time. In scan phase the scanner scans the lines of script and replaces DynaScript variables with their corresponding dynamic content. This novel interpreting technique is significantly faster to run and uses less memory.


REFERENCES:
patent: 4905138 (1990-02-01), Bourne
patent: 5657438 (1997-08-01), Wygodny et al.
patent: 6065024 (2000-05-01), Renshaw
patent: 6106571 (2000-08-01), Maxwell
patent: 6112237 (2000-08-01), Donaldson et al.
patent: 6188400 (2001-02-01), House et al.
patent: 6292936 (2001-09-01), Wang
patent: 6311325 (2001-10-01), Levine et al.
patent: 6336213 (2002-01-01), Beadle et al.
patent: 6353925 (2002-03-01), Stata et al.
patent: 6470349 (2002-10-01), Heninger et al.
Aho, Alfred V., Sethi, Ravi, Ullman, Jeffrey D., “Compilers Principles, Techniques, and Tools”, 1986, Addison-Wesley, p. 10.*
Boussinot, Frederic and Hazard, Laurent, “Reactive Scripts”, p. 270-277, 1996 IEEE, retrieved from the IEEE database Dec. 5, 2002.*
Gosling, James and McGilton, Henry, “The Java Language Environment, A White Paper”, May 1996, retrieved from http://java.sun.com/docs/white/langenv/index on Dec. 5, 2002.*
Mittra, Swapnajit, “VIP: A Verilog Interpreter for Preprocessing”, 1996 IEEE, retrieved from the IEEE database Dec. 5, 2002.*
“PowerDynamo(TM) User's Guide, Part II, Reference, Chapter 9. The DynaScript Language”, retrieved by Google search, Dec. 5, 2002. Http://www.ems.com.cn/Site/doc/00000068.*
“Chapter 2 The DynaScript Language”, 1999 Sybase, retrieved by a Google search Dec. 5, 2002, http://ok/seokang.ac.kr/onestop/doc/dynamoref/pdreferencep8.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Multiphase single pass interpreter does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Multiphase single pass interpreter, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Multiphase single pass interpreter will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3233817

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.