title: Parsing code with syntax errors
body: <p>Parsing techniques are well described in CS literature. But the algorithms I know of require that the source is syntactically correct. If a syntax error is encountered, parsing is immediately aborted.</p>
  
  <p>But IDE's (like Visual Studio) are typically able to provide meaningful code completion and other hints <em>while typing</em>, which mean the syntax is often not in a valid state. E.g. you type an opening parenthesis in a function call, and the IDE provide parameter hints for the function, even though the syntax is invalid until the closing parenthesis is typed.</p>
  
  <p>It seems to me this must rely on some kind of guessing or error-tolerant parser. Anyone know what techniques or algorithms are used for this?</p>