Using XML as a common parser architecture to separate parser from compiler
OwnerMuralidhar Krishnaprasad, Zhen Liu +1inventors
InventorsMuralidhar Krishnaprasad, Zhen Liu, Karuna Muthiah
Life of this patent
Estimating the term…
Abstract
A method and apparatus for compiling queries is provided. A first query in a first syntax of a query language is received. Based on the first query, a second query in a second syntax of the query language is generated. The first syntax and the second syntax are each among a plurality of syntaxes that are defined for the query language. The second query is parsed to generate parsed information. Based on the parsed information, the second query is compiled by a compiler that does not support compiling of queries in the first syntax.
Claims23
A method for compiling queries, comprising the computer-implemented steps of:
- receiving a first query in a first syntax of a query language;
- based on said first query, generating a second query in a second syntax of said query language;.
- wherein said first syntax and said second syntax are each among a plurality of syntaxes that are defined for said query language;
- parsing said second query to generate parsed information;
- and
- compiling said second query based on said parsed information, wherein said step of compiling is performed by a compiler that does not support compiling of queries in said first syntax.
A method for compiling queries, comprising the computer-implemented steps of:
- receiving a query that conforms to a first syntax of a plurality of syntaxes defined for a query language;
- determining whether said first syntax is a particular syntax of said plurality of syntaxes;
- if said first syntax is not said particular syntax, then converting said query into said particular syntax of said plurality of syntaxes defined for said query language;
- parsing said query that conforms to said particular syntax to generate parsed information;
- and
- compiling said query based on said parsed information, wherein said step of compiling is performed by a compiler that is capable of compiling only queries that conform to said particular syntax.
A database server that uses extensible Markup Language (XML) as common parser architecture, comprising:
- a XQueryX converter comprising a first logic that:
- receives a query that conforms to a first syntax defined for a XML Query Language;
- determines whether said first syntax is a XQueryX syntax defined for said XML Query Language;
- and
- if said first syntax is not said XQueryX syntax, then converts said query into said XQueryX syntax;
- a XML parser which is capable of parsing queries in said XQueryX syntax, wherein:
- said XML parser is communicatively coupled to said XQueryX converter;
- and
- said XML parser comprises a second logic that:
- receives said query in said XQueryX syntax, and passes said query to generate parsed information;
- and
- a XML compiler which is capable of compiling input that conforms to XML,
- wherein:
- said XML compiler is operatively coupled to said XML parser;
- and
- said XML compiler comprises a third logic that compiles said parsed information.
Dependencies are inferred from the claim text.