Syntax analysis and language processing system
First Claim
Patent Images
1. A syntax analyzing method in a language processing system comprising the steps of:
- (a) receiving a sequence of symbols;
(b) analyzing lexicons of the sequence of symbols;
(c) storing indentation information of each lexicon in a memory;
(d) analyzing syntax of the sequence of symbols, in accordance with a result achieved in step (b) to determine a presence of a syntax error; and
(e) upon detection of a syntax error in step (d), completing the steps of,(i) generating at least one proposed sequence of symbols corresponding to a portion of the sequence of symbols which include the syntax error in accordance with indentation information stored in the memory, and(ii) selecting one of the at least one proposed sequence of symbols in accordance with an indentation rule table.
1 Assignment
0 Petitions
Accused Products
Abstract
A system for analyzing syntax in a language processing system includes a memory which stores preselected indentation rules associated with a source code level language. A lexical analyzer reads a sequence of input symbols from the source code, and divides them into tokens, which tokens form sequences of symbols having a collective meaning. A syntax analyzer receives information from the tokens and compares the same to indentation rules stored in the memory. Source code correction, suggested source code correction, or warnings indicative of improper identation are selectively generated in accordance with an output of the syntax analyzer.
52 Citations
14 Claims
-
1. A syntax analyzing method in a language processing system comprising the steps of:
-
(a) receiving a sequence of symbols; (b) analyzing lexicons of the sequence of symbols; (c) storing indentation information of each lexicon in a memory; (d) analyzing syntax of the sequence of symbols, in accordance with a result achieved in step (b) to determine a presence of a syntax error; and (e) upon detection of a syntax error in step (d), completing the steps of, (i) generating at least one proposed sequence of symbols corresponding to a portion of the sequence of symbols which include the syntax error in accordance with indentation information stored in the memory, and (ii) selecting one of the at least one proposed sequence of symbols in accordance with an indentation rule table. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A syntax analyzing method used in a language processing system comprising the steps of:
-
(a) receiving a sequence of symbols; (b) analyzing lexicons of the sequence of symbols; (c) storing, in a memory, indentation information for each lexicon; (d) determining whether the sequence of symbols conforms to an indentation rule stored in an indentation rule table; (e) testing the sequence of symbols in accordance with the indentation rule; and (f) communicating a message in the event that the sequence of symbols does not conform to the indentation rule in accordance with step (e). - View Dependent Claims (7)
-
-
8. A syntax analyzing apparatus used in a language processing system comprising:
-
means for receiving a sequence of symbols; indentation rule table means for storing indentation rule data; means for generating lexicons of the sequence of symbols; means for storing indentation information of each lexicon in a memory; syntax analyzing means for comparing lexicons of the sequence of symbols with the indentation rule data, which means includes means for generating a syntax error signal in the event that a syntax error is determined in the sequence of symbols as a result of a comparison completed therein; means for selectively generating at least one proposed sequence of symbols for a portion of the sequence of symbols under direction of the syntax error signal; and selecting means for selecting one of the proposed sequences of symbols in accordance with the indentation rule table means under direction of the syntax error signal. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A syntax analyzing apparatus for use in a language processing system comprising:
-
means for storing indentation rule data; means for receiving a sequence of symbols; means for generating lexicons from the sequence of symbols; means for storing indentation information corresponding to each lexicon; means for determining whether the sequence of symbols corresponds to the indentation rule data; and means for communicating a message representative of a state wherein the sequence of symbols does not correspond to the indentation rule data.
-
Specification