摘要 |
PURPOSE:To perform analysis of sentence structures with a single parser set for plural sentence structures by using a parser that adds a single sentence structure rule for each subject of analysis of sentence structure against a sentence structure rule that describes the grammar of a program language. CONSTITUTION:A sentence structure rule of S N1 is added to each sentence structure element N1 to undergo the sentence structure analysis. In this case, S means a special sentence structure symbol called a start symbol. Then an initial state is produced based on each added sentence structure rule and a state transition chart is produced based on said initial state for production of a parser. For the analysis procedure where the parser is applied to a structure editor, an initial state is first set for analysis of sentence structure. Then the state transition is carried out while the input source is read. Thus it is discriminated whether the state is shifted normally or not. If so, the input source is fetched and put into a proper place within an existing source. While a message is outputted for a detected error to urge a user to correct the source if the state transition ends in an abnormal state.
|