×

Generation of error messages and error recovery for an LL(1) parser

  • US 5,487,147 A
  • Filed: 09/05/1991
  • Issued: 01/23/1996
  • Est. Priority Date: 09/05/1991
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method for dynamically producing a set of synchronizing symbols, said method comprising the steps of:

  • creating a copy of a parsing stack, said parsing stack being produced by a parser operating consistently with a set of grammar rules to create said stack;

    adding a bottom of stack indicator to the set of synchronizing symbols;

    scanning said stack to determine if the symbol at the top of the stack is the bottom of stack indicator and terminate synchronizing symbol accumulation if it is, otherwise, continue processing by;

    determining if the symbol at the top of the stack is a nonterminal symbol in said grammar and, if so, adding First set symbols associated with said top of stack symbol to said set of synchronizing symbols and replacing said nonterminal symbol on said stack in accordance with a designated grammar rule for it, and continuing processing at said scanning step, but if said top of stack symbol is not a nonterminal symbol, continue processing by;

    determining if said top of stack symbol is a terminal symbol in said grammar and, if so, adding said terminal symbol to said set of synchronizing symbols and removing said terminal symbol from said stack and continuing processing at said scanning step, but if said top of stack symbol is neither a terminal symbol nor a nonterminal symbol, continue processing by;

    removing said neither terminal nor nonterminal symbol from said stack and continue processing at said scan step.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×