Version

OnGlobalAmbiguityDetected Method (CustomLanguage)

Gets called when a global ambiguity is detected while parsing a document.
Syntax
'Declaration
 
Protected Friend Overrides Sub OnGlobalAmbiguityDetected( _
   ByVal context As GlobalAmbiguityContext _
) 
protected internal override void OnGlobalAmbiguityDetected( 
   GlobalAmbiguityContext context
)

Parameters

context
An object containing the relevant information about the global ambiguity.
Remarks

A global ambiguity occurs when the same span of text in a document can be interpreted in two or more different ways based on the grammar rules for the language and the context in which text occurs. The specified context contains two alternate parses for the text (if there are more than two alternate parses, this method will be called multiple times). A derived implementation of this method can determine which of the two alternate parse sub-trees should be used in the final tree by setting PreferredSubTreeRoot on the specified context.

A grammar creator can override this method in a derived language to get notified of global ambiguities and know which rules need to be re-written or mark with priority.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, 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