XML parser
First Claim
1. A method of generating a parser of a source code file that references a syntactic dictionary for the source code, comprising the steps of:
- (a) converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the source code of the file; and
(b) constructing the parser from said expressions.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of generating a parser of a source code file that references a syntactic dictionary, a method of compressing the file, and apparatuses that use the methods. The syntactic dictionary is converted into a corresponding plurality of expressions, of a context-free grammar, that are a grammar of the source code. The parser is constructed from the expressions. The source code is compressed using the parser. Preferably, the grammar of the source code file is a D-grammar and the expressions are regular expressions. Preferably, the parser is a deterministic pushdown transducer. An important case of the present invention is that in which the source code is XML code and the syntactic dictionary is the document type declaration of the XML code. Apparatuses that use a parser of the present invention include compressors, decompressors, validators, converters, editors, network devices and end-user/hand-held devices.
135 Citations
84 Claims
-
1. A method of generating a parser of a source code file that references a syntactic dictionary for the source code, comprising the steps of:
-
(a) converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the source code of the file; and
(b) constructing the parser from said expressions. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer readable storage medium having computer readable code embodied on said computer readable storage medium, the computer readable code for generating a parser of a source code file that references a syntactic dictionary for the source code, the computer readable code comprising:
-
(a) program code for converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the source code of the file; and
(b) program code for constructing the parser from said expressions.
-
-
10. A method of compressing a file that includes source code and that references a syntactic dictionary for the source code, the syntactic dictionary including at least one attribute definition, the method comprising the steps of:
-
(a) converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the source code of the file;
(b) constructing a parser of the source code from said expressions; and
(c) compressing the source code using said parser. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
-
-
22. A method of transmitting, from a transmitter to a receiver, a file that includes source code and that references a syntactic dictionary for the source code, the method comprising the steps of:
-
(a) at the transmitter and at the receiver;
(i) converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the source code of the file, and (ii) constructing a parser of the source code from said expressions;
(b) at the transmitter, processing the source code using said parser that is constructed at the transmitter; and
(c) at the receiver, recovering the source code from output of said processing, using said parser that is constructed at the receiver. - View Dependent Claims (23)
-
-
24. A method of compressing a file that includes source code and that references a syntactic dictionary for the source code, the source code including both structure and contents, the method comprising the steps of:
-
(a) converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the source code of the file;
(b) constructing a parser of the source code from said expressions; and
(c) compressing the source code using said parser;
wherein said compressing of the source code encodes both the structure and the content in a single common stream.
-
-
25. A computer readable storage medium having computer readable code embodied on said computer readable storage medium, the computer readable code for compressing a file that includes source code and that references a syntactic dictionary for the source code, the computer readable code comprising:
-
(a) program code for converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the source code of the file;
(b) program code for constructing a parser of the source code from said regular expressions; and
(c) program code for compressing the source code using said parser. - View Dependent Claims (26)
-
-
27. A computer readable storage medium having computer readable code embodied on said computer readable storage medium, the computer readable code for compressing a file that includes source code and that references a syntactic dictionary for the source code, the source code including both structure and contents, the computer readable code comprising:
-
(a) program code for converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the source code of the file;
(b) program code for constructing a parser of the source code from said expressions; and
(c) program code for compressing the source code using said parser;
wherein said compressing of the source code encodes both the structure and the content in a single common stream.
-
-
28. An apparatus for parsing a source code file that references a syntactic dictionary for the source code, comprising:
-
(a) a dictionary converter for converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the source code of the file;
(b) a parser generator for creating at least one parse table for the source code from said expressions; and
(c) a parser for parsing the source code according to said at least one parse table. - View Dependent Claims (29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42)
-
-
43. A method of generating a parser of an XML file that includes XML code and that references a syntactic dictionary for the XML code, comprising the steps of:
-
(a) converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the XML code of the file; and
(b) constructing the parser from said expressions. - View Dependent Claims (44, 45, 46, 47, 48, 49, 50)
-
-
51. A computer readable storage medium having computer readable code embodied on said computer readable storage medium, the computer readable code for generating a parser of a XML file, the XML file including XML code and referencing a syntactic dictionary for the XML code, the computer readable storage medium comprising:
-
(a) program code for converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the XML code of the file; and
(b) program code for constructing the parser from said expressions.
-
-
52. A method of compressing a XML file that includes XML code and that references a syntactic dictionary for the XML code, the syntactic dictionary including at least one attribute definition, the method comprising the steps of:
-
(a) converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the XML code of the file;
(b) constructing a parser of the XML code from said regular expressions; and
(c) compressing the XML code using said parser. - View Dependent Claims (53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63)
-
-
64. A method of transmitting, from a transmitter to a receiver, a XML file that includes XML code and that references a syntactic dictionary for the XML code, the method comprising the steps of:
-
(a) at the transmitter and at the receiver;
(i) converting the syntactic dictionary into a corresponding plurality of expressions of a context-free gram-mar, said expressions being a grammar of the source code of the file, and (ii) constructing a parser of the XML code from said expressions;
(b) at the transmitter, processing the source code using said parser that is constructed at the transmitter; and
(c) at the receiver, recovering the source code from output of said processing, using said parser that is constructed at the receiver. - View Dependent Claims (65)
-
-
66. A method of compressing a XML file that includes XML code and that references a syntactic dictionary for the XML code, the XML code including both structure and contents, the method comprising the steps of:
-
(a) converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the XML code of the file;
(b) constructing a parser of the XML code from said expressions; and
(c) compressing the XML code using said parser;
wherein said compressing of the XML code encodes both the structure and the content in a single common stream.
-
-
67. A computer readable storage medium having computer readable code embodied on said computer readable storage medium, the computer readable code for compressing a XML file, the XML file including XML code and referencing a syntactic dictionary for the XML code, the computer readable code comprising:
-
(a) program code for converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the XML code of the file;
(b) program code for constructing a parser of the XML code from said expressions; and
(c) program code for compressing the XML code using said parser. - View Dependent Claims (68)
-
-
69. A computer readable storage medium having computer readable code embodied on said computer readable storage medium, the computer readable code for compressing a XML file, the XML file including XML code and referencing a syntactic dictionary for the XML code, the XML code including both structure and contents, the computer readable code comprising:
-
(a) program code for converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the XML code of the file;
(b) program code for constructing a parser of the XML code from said expressions; and
(c) program code for compressing the XML code using said parser;
wherein said compressing of the source code encodes both the structure and the content in a single common stream.
-
-
70. An apparatus for parsing an XML file that includes XML code and that references a syntactic dictionary for the XML code, comprising:
-
(a) a dictionary converter for converting the syntactic dictionary into a corresponding plurality of expressions of a context-free grammar, said expressions being a grammar of the XML code of the file;
(b) a parser generator for creating at least one parse table for the XML code from said expressions; and
(c) a parser for parsing the XML code according to said at least one parse table. - View Dependent Claims (71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84)
-
Specification