Version

PreventBacktracking Property

Gets or sets the value indicating whether nodes associated with the NonTerminalSymbol can be backtracked by the error handling routine.
Syntax
'Declaration
 
Public Property PreventBacktracking As Boolean
public bool PreventBacktracking {get; set;}
Exceptions
ExceptionDescription
System.InvalidOperationExceptionOccurs when the IsMutable value of the owning Grammar is False.
Remarks

In some cases, if the user forgets to type certain things, the parser can incorrectly parse the text after the missing symbols in the wrong way. So one of the strategies used to handle errors is to try to undo the creation of a few small nodes for the tree, insert some things which could be missing, and re-parse the tokens again in a different way. However, for some non-terminals, it doesn't make sense to undo their creation and try to parse their tokens in a different way because their tokens can only be parsed in one way. To prevent the error handler from undoing the creation of a node associated with a specific non-terminal symbol, set PreventBacktracking to True.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also