Method and apparatus for interfacing a javascript interpreter with library of host objects implemented in java
First Claim
1. A method, comprising:
- detecting one or more script language instructions in a document;
generating a platform-independent programming language representation of the one or more script language instructions, wherein the platform-independent programming language representation of the one or more script language instructions is different from the script language; and
interpreting and executing each of one or more instructions of the platform-independent programming language representation, wherein said interpreting and executing comprises;
interfacing with an object library comprising a plurality of program objects; and
accessing one or more of the plurality of program objects, wherein the one or more accessed program objects are used to implement the one or more instructions of the platform-independent programming language representation;
wherein said interpreting and executing produces results in accordance with the original one or more script language instructions.
2 Assignments
0 Petitions
Accused Products
Abstract
A JavaScript interpreter may be interfaced with a JavaScript library of host objects implemented in Java. A JavaScript program may be accessed and parsed, an intermediate representation of the program may be generated, and the intermediate representation may be executed by interfacing with the library of host objects. In one embodiment, the JavaScript program is embedded in HTML documents in a Web browser. The browser is programmed to intercept the JavaScript code and pass execution control to an interpreter engine implemented in Java. The interpreter engine may access the program'"'"'s library of host objects through an interface to the library and execute the intermediate representation to produce the desired results as programmed in the original JavaScript source program. The implementation of the interface enables the implementation of the interpreter engine to be independent from the implementation of the library of host objects and independent from the implementation of the browser.
-
Citations
35 Claims
-
1. A method, comprising:
-
detecting one or more script language instructions in a document;
generating a platform-independent programming language representation of the one or more script language instructions, wherein the platform-independent programming language representation of the one or more script language instructions is different from the script language; and
interpreting and executing each of one or more instructions of the platform-independent programming language representation, wherein said interpreting and executing comprises;
interfacing with an object library comprising a plurality of program objects; and
accessing one or more of the plurality of program objects, wherein the one or more accessed program objects are used to implement the one or more instructions of the platform-independent programming language representation;
wherein said interpreting and executing produces results in accordance with the original one or more script language instructions. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A system, comprising:
-
a processor;
a memory coupled to said processor and operable to store program instructions; and
an object library comprising a plurality of program objects;
wherein the program instructions are executable by the processor to execute a script comprising one or more script language instructions;
wherein, in said executing the script, the program instructions are further executable by the processor to;
generate a platform-independent programming language representation of the script, wherein the platform-independent programming language representation of the one or more script language instructions is different from the script language; and
interpret and execute each of one or more instructions of the platform-independent programming language representation;
wherein, in said interpreting and executing, the program instructions are further executable by the processor to;
interface with the object library to access one or more of the plurality of program objects, wherein the one or more accessed program objects are used to implement the one or more instructions of the platform-independent programming language representation; and
wherein said interpreting and executing produces results in accordance with the original one or more script language instructions. - View Dependent Claims (15, 16, 17, 18)
-
-
19. A system, comprising:
-
a device, comprising;
a processor;
a memory coupled to said processor and operable to store program instructions implementing a first process and a second process;
an object library comprising a plurality of program objects and accessible to processes executing within the device through an object library interface;
wherein the first process is executable within the device to;
detect one or more script language instructions in a document; and
pass execution to the second process in response to said detecting;
wherein the second process is executable within the device to;
generate a platform-independent programming language representation of the detected one or more script language instructions, wherein the platform-independent programming language representation of the one or more script language instructions is different from the script language; and
interpret and execute each of one or more instructions of the platform-independent programming language representation;
wherein, in said interpreting and executing, the second process is further executable to access one or more of the plurality of program objects in the object library through the object library interface to implement the one or more instructions of the platform-independent programming language representation;
wherein said interpreting and executing produces results in accordance with the original one or more script language instructions. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26)
-
-
27. A system, comprising:
-
an object library comprising a plurality of platform-independent programming language objects;
an object library interface configured to provide access to the plurality of platform-independent programming language objects in the object library to processes within the system;
a first process configured to interpret and execute each of one or more instructions of a platform-independent programming language representation of a sequence of script language instructions, wherein the platform-independent programming language representation of the one or more script language instructions is different from the script language;
wherein, in said interpreting and executing, the first process is further configured to access one or more of the plurality of platform-independent programming objects in the object library through the object library interface to implement the one or more instructions of the platform-independent programming language representation;
wherein said interpreting and executing produces results in accordance with the sequence of script language instructions. - View Dependent Claims (28, 29, 30)
-
-
31. A carrier medium comprising program instructions, wherein the program instructions are computer-executable to implement:
-
detecting one or more script language instructions in a document;
generating a platform-independent programming language representation of the one or more script language instructions, wherein the platform-independent programming language representation of the one or more script language instructions is different from the script language; and
interpreting and executing each of one or more instructions of the platform-independent programming language representation, wherein said interpreting and executing comprises;
interfacing with an object library comprising a plurality of program objects; and
accessing one or more of the plurality of program objects, wherein the one or more accessed program objects are used to implement the one or more instructions of the platform-independent programming language representation;
wherein said interpreting and executing produces results in accordance with the original one or more script language instructions. - View Dependent Claims (32, 33, 34, 35)
-
Specification