Concurrent parsing and processing of serial languages
First Claim
1. A method for executing a first serial language code in a processor, comprising:
- parsing a first serial language code having an embedded second serial language code until a segment of the second serial language code is encountered, the second serial language code being executable to generate additional first serial language code;
storing parsing state information associated with the parsing of the first serial language code upon encountering the segment of the second serial language code in a memory of a computing device;
continuing to parse the first serial language code;
executing the encountered segment of the second serial language code to generate the additional first serial language code, wherein the encountered segment of the second serial language code is executed concurrent with the continued parsing of the first serial language code;
inserting the additional first serial language code at a point in the first serial language code identified by the stored parsing state information;
determining whether the additional first serial language code generated from the execution of the encountered segment of the second serial language code is well formed; and
re-initiating parsing of the first serial language code and the additional first serial language code from the point in the first serial language code identified by the stored parsing state information in response to determining that the additional first serial language code is not well formed.
1 Assignment
0 Petitions
Accused Products
Abstract
The aspects enable a processor to concurrently execute a first serial language code (e.g., HTML) embedding a second serial language code (e.g., JAVASCRIPT®) during a page load operation by a browser. A parser parses the first serial language code until a segment of the embedded second serial language code is encountered. The segment of embedded second serial language code is extracted for execution by an execution engine, which proceeds concurrently with speculative parsing of the first serial language code. Code generated by execution of second serial language code is evaluated to determine if it is well formed, and a partial rollback and re-parsing of the first serial language code is performed if the code is not well formed.
16 Citations
21 Claims
-
1. A method for executing a first serial language code in a processor, comprising:
-
parsing a first serial language code having an embedded second serial language code until a segment of the second serial language code is encountered, the second serial language code being executable to generate additional first serial language code; storing parsing state information associated with the parsing of the first serial language code upon encountering the segment of the second serial language code in a memory of a computing device; continuing to parse the first serial language code; executing the encountered segment of the second serial language code to generate the additional first serial language code, wherein the encountered segment of the second serial language code is executed concurrent with the continued parsing of the first serial language code; inserting the additional first serial language code at a point in the first serial language code identified by the stored parsing state information; determining whether the additional first serial language code generated from the execution of the encountered segment of the second serial language code is well formed; and re-initiating parsing of the first serial language code and the additional first serial language code from the point in the first serial language code identified by the stored parsing state information in response to determining that the additional first serial language code is not well formed. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computing device, comprising:
a processor configured with processor-executable instructions to perform operations comprising; parsing a first serial language code having an embedded second serial language code until a segment of the second serial language code is encountered, the second serial language code being executable to generate additional first serial language code; storing parsing state information associated with the parsing of the first serial language code upon encountering the segment of the second serial language code in a memory of the computing device; continuing to parse the first serial language code; executing the encountered segment of the second serial language code to generate the additional first serial language code, wherein the encountered segment of the second serial language code is executed concurrent with the continued parsing of the first serial language code; inserting the additional first serial language code at a point in the first serial language code identified by the stored parsing state information; determining whether the additional first serial language code generated from the execution of the encountered segment of the second serial language code is well formed; and re-initiating parsing of the first serial language code and the additional first serial language code from the point in the first serial language code identified by the stored parsing state information in response to determining that the additional first serial language code is not well formed. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
15. A non-transitory storage medium having stored thereon processor-executable software instructions configured to cause a processor to perform operations comprising:
-
parsing a first serial language code having an embedded second serial language code until a segment of the second serial language code is encountered, the second serial language code being executable to generate additional first serial language code; storing parsing state information associated with the parsing of the first serial language code upon encountering the segment of the second serial language code in a memory; continuing to parse the first serial language code; executing the encountered segment of the second serial language code to generate the additional first serial language code, wherein the encountered segment of the second serial language code is executed concurrent with the continued parsing of the first serial language code; inserting the additional first serial language code at a point in the first serial language code identified by the stored parsing state information; determining whether the additional first serial language code generated from the execution of the encountered segment of the second serial language code is well formed; and re-initiating parsing of the first serial language code and the additional first serial language code from the point in the first serial language code identified by the stored parsing state information in response to determining that the additional first serial language code is not well formed. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
Specification