Invention Grant
US09110676B2 Method and system for syntax error repair in programming languages
有权
编程语言中语法错误修复的方法和系统
- Patent Title: Method and system for syntax error repair in programming languages
- Patent Title (中): 编程语言中语法错误修复的方法和系统
-
Application No.: US13678125Application Date: 2012-11-15
-
Publication No.: US09110676B2Publication Date: 2015-08-18
- Inventor: Stephen Curtis Johnson
- Applicant: The MathWorks, Inc.
- Applicant Address: US MA Natick
- Assignee: The MathWorks, Inc.
- Current Assignee: The MathWorks, Inc.
- Current Assignee Address: US MA Natick
- Agency: Cesari amd McKenna, LLP
- Agent Michael R. Reinemann
- Main IPC: G06F9/45
- IPC: G06F9/45

Abstract:
The described embodiments present techniques for recovering from syntax errors. These techniques correct potential errors while preserving the shape of the parse tree, and the specific implementation of the techniques can be automatically generated from the grammar. These techniques may operate by looking back at states associated with previously-received tokens to determine pair matching status, when a synchronizing symbol is received. The techniques can respond to the pair matching status determination by potentially adding a synthesized token or by deleting a token that has already been received. The techniques may use a structure referred to herein as a tuple to assist with the evaluation of the pair matching status. Some of the techniques utilize indentation information to evaluate the pair matching status, while other techniques ignore such information. The described embodiments also include a technique for automatically generating the tuples from a set of grammar rules associated with the parser.
Public/Granted literature
- US20130074054A1 METHOD AND SYSTEM FOR SYNTAX ERROR REPAIR IN PROFRAMMING LANGUAGES Public/Granted day:2013-03-21
Information query