Table of Contents

Class AnyMetaGrammar.ReferenceOppositeReferenceRule

Namespace
NMF.AnyText.AnyMeta
Assembly
NMF.AnyText.AnyMeta.dll

Rule to assign the contents of the inner rule to Opposite

public class AnyMetaGrammar.ReferenceOppositeReferenceRule : AssignModelReferenceRule<IReference, IReference>
Inheritance
AnyMetaGrammar.ReferenceOppositeReferenceRule
Inherited Members

Properties

Feature

Gets the name of the feature that is assigned

protected override string Feature { get; }

Property Value

string

ResolveDelayLevel

Gets the delay level

protected override byte ResolveDelayLevel { get; }

Property Value

byte

Remarks

Reference are resolved in layers, one after the other.

TokenType

Gets the token type of tokens created for this rule

public override string TokenType { get; }

Property Value

string

Methods

GetValue(IReference, ParseContext)

Gets the value of the given property

protected override IReference GetValue(IReference semanticElement, ParseContext context)

Parameters

semanticElement IReference

the context element

context ParseContext

the parsing context

Returns

IReference

the property value

Initialize(GrammarContext)

Initializes the current grammar rule

public override void Initialize(GrammarContext context)

Parameters

context GrammarContext

the grammar context in which the rule is initialized

Remarks

Do not modify the contents of this method as it will be overridden as the contents of the Metamodel file change.

SetValue(IReference, IReference, ParseContext)

Assigns the value to the given semantic element

protected override void SetValue(IReference semanticElement, IReference propertyValue, ParseContext context)

Parameters

semanticElement IReference

the context element

propertyValue IReference

the value to assign

context ParseContext

the parsing context

TryResolveReference(IReference, string, ParseContext, out IReference)

Resolves the given input

protected override bool TryResolveReference(IReference contextElement, string input, ParseContext context, out IReference resolved)

Parameters

contextElement IReference

the element in the context of which the string is resolved

input string

the textual reference

context ParseContext

the context in which the element is resolved

resolved IReference

the resolved reference or the default

Returns

bool

true, if the reference could be resolved, otherwise false