Table of Contents

Class ExistsAssignRule<TSemanticElement>

Namespace
NMF.AnyText.Model
Assembly
NMF.AnyText.Core.dll

Denotes a rule that catches whether a given rule matched

public abstract class ExistsAssignRule<TSemanticElement> : QuoteRule

Type Parameters

TSemanticElement
Inheritance
ExistsAssignRule<TSemanticElement>
Derived
Inherited Members

Properties

Feature

Gets the name of the feature that is assigned

protected abstract string Feature { get; }

Property Value

string

Methods

CanSynthesize(object, ParseContext, SynthesisPlan)

Determines whether the current rule can synthesize rule applications for the given semantic element

public override bool CanSynthesize(object semanticElement, ParseContext context, SynthesisPlan synthesisPlan)

Parameters

semanticElement object

the semantic element

context ParseContext

the context in which the rule is synthesized

synthesisPlan SynthesisPlan

the plan of the synthesis

Returns

bool

true, if a rule application can be synthesized, otherwise false

GetValue(TSemanticElement, ParseContext)

Gets the value of the given property

protected abstract bool GetValue(TSemanticElement semanticElement, ParseContext context)

Parameters

semanticElement TSemanticElement

the context element

context ParseContext

the parsing context

Returns

bool

the property value

OnActivate(RuleApplication, ParseContext)

Gets called when a rule application is activated

protected override void OnActivate(RuleApplication application, ParseContext context)

Parameters

application RuleApplication

the rule application that is activated

context ParseContext

the context in which the rule application is activated

OnDeactivate(RuleApplication, ParseContext)

Gets called when a rule application is deactivated

protected override void OnDeactivate(RuleApplication application, ParseContext context)

Parameters

application RuleApplication

the rule application that is deactivated

context ParseContext

the context in which the rule application is deactivated

SetValue(TSemanticElement, bool, ParseContext)

Assigns the value to the given semantic element

protected abstract void SetValue(TSemanticElement semanticElement, bool value, ParseContext context)

Parameters

semanticElement TSemanticElement

the semantic element

value bool

the value to assign

context ParseContext

the parse context

Synthesize(object, ParsePosition, ParseContext)

Synthesizes a rule application for the given semantic element

public override RuleApplication Synthesize(object semanticElement, ParsePosition position, ParseContext context)

Parameters

semanticElement object
position ParsePosition

the parse position at which the element should be synthesized

context ParseContext

the parse context

Returns

RuleApplication

a rule application