JSAX (joint simple API (application program interface) for XML (extensible markup language)) parser and parsing method based on syntactic analysis of backtracking automaton
A backtracking automaton and parser technology, applied in the web field, can solve the problem of low efficiency of parser, and achieve the effect of efficient parsing, improving efficiency, and simplifying design and implementation.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0084] The present invention is based on the JSAX parser of backtracking automaton syntax analysis, see figure 2 , including a lexical analyzer, a grammatical analyzer and an event handler. The lexical analyzer is responsible for reading the content of the XML document and outputting the read tokens to the grammatical analyzer. The grammatical analyzer identifies the language in the input token stream according to the requirements of the XML specification Structure, pass the corresponding event information to the event processor, the event processor accepts all the events reported by the parser, and processes the found data, and realizes the parsing of the XML document, where the syntax analyzer is constructed based on the automaton, automatic The structure of the backtracking automaton in the machine is a five-tuple, and the structure is M=(S, ∑, δ, q 0 , F), also includes a state stack to save part of the history of the operation, the syntax analyzer of the present inventio...
Embodiment 2
[0143] The JSAX parser and parsing method based on backtracking automaton syntax analysis are the same as in Embodiment 1, and the present invention will be described in detail from the perspective of the composition of the parser.
[0144] The JSAX parser based on the backtracking automaton syntax analysis of the present invention mainly includes several parts of a lexical analyzer, a syntax analyzer and an event processor.
[0145] Design and implementation of JSAX parser lexical analyzer based on backtracking automaton syntax analysis:
[0146] Due to the advantages of easy construction and high analysis efficiency of FA, FA is widely used in the design of lexical analyzers. The JSAX parser of the present invention is a SAX interface-based XML document parser implemented in Java, and the JSAX parser also performs lexical analysis by constructing FA.
[0147] Refer to attached Figure 4 , the lexical analyzer is responsible for reading the content of the XML document. The ...
Embodiment 3
[0185] The constitution and grammatical rules of the JSAX parser based on backtracking automata grammatical analysis are the same as in Embodiment 1-2, and the JSAX parsing method based on backtracking automata grammatical analysis is the same as in Embodiment 1-2.
[0186] The specific improvements to the backtracking automaton will be described in detail in conjunction with the accompanying drawings.
[0187] Syntax analyzer of the present invention is based on backtracking automata, and backtracking automaton is defined as: a definite backtracking automaton DTA is made up of five tuples, M=(S, ∑, δ, q 0 , F), where,
[0188] M represents the constructed backtracking automaton;
[0189] S={S 0 , S 1 ,...,S n} is a non-empty set of states;
[0190] ∑ is the input character set;
[0191] q 0 ∈S is the initial state;
[0192] is a non-empty set of terminal states;
[0193] δ is a mapping on S×∑→S∪{trace}.
[0194] The backtracking automaton is composed of an input t...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com