Automatic Syntax Error Recovery
tratt.net
Automatic Syntax Error Recovery
1–7 of 7 posts
Re: Automatic Syntax Error Recovery
#2Re: Automatic Syntax Error Recovery
#3Fascinating. Is this a separate thing that would be integrated into an IDE or would it make more sense as part of the compiler? Are there any plans to productize this for any language? Any plans to provide a semantic feedback mechanism so that language-specific semantics can be fed back to make the suggestions even better (beyond just the structure of code)?
As things stand it's most easily used in a batch setting (e.g. a compiler). I don't think it would take much, if any, work to use in an incremental parsing (for an IDE), but I haven't tried that yet!
Re: Automatic Syntax Error Recovery
#4Fascinating. Is this a separate thing that would be integrated into an IDE or would it make more sense as part of the compiler? Are there any plans to productize this for any language? Any plans to provide a semantic feedback mechanism so that language-specific semantics can be fed back to make the suggestions even better (beyond just the structure of code)?
> Is this a separate thing that would be integrated into an IDE or would it make more sense as part of the compiler? As things stand it's most easily used in a batch setting (e.g. a compiler). I don't think it would take much, if any, work to use in an incremental parsing (for an IDE), but I haven't tried that yet!
Re: Automatic Syntax Error Recovery
#5Re: Automatic Syntax Error Recovery
#6I'd much rather have a helpful compiler error than run something that has been "repaired" and may silently do the wrong thing.
This is what compilers do already, one such strategy is to unwind the state to before the error and skip over the erroneous part. This can be a bit problematic in certain situations, such as a syntax error in a variable definition and the following flood of 'undefined variable' errors.
The repair strategy in the article is trying to optimise the quality of the attempted repair in order to provide better error messages to the user.
Re: Automatic Syntax Error Recovery
#7Earlier quoted context omitted.
> Is this a separate thing that would be integrated into an IDE or would it make more sense as part of the compiler? As things stand it's most easily used in a batch setting (e.g. a compiler). I don't think it would take much, if any, work to use in an incremental parsing (for an IDE), but I haven't tried that yet!
I’d be interested in helping you integrate that into an IDE if you’re open to it.