Example #1
0
        /// <summary>Return true if this NounBuilder and <paramref name="anotherElementModifier"/> are part of a nominal modifier.</summary>
        private bool IsPartOfNominalModifierWith(ElementBuilder anotherElementModifier)
        {
            NominalModifierBuilder commonAncestorNominalModifier = LowestCommonAncestor <NominalModifierBuilder>(anotherElementModifier);

            if (commonAncestorNominalModifier == null)
            {
                return(false);
            }
            else
            {
                return(ActsWithRoleInAncestor(ParentElementBuilder.ChildRole.Modifier, commonAncestorNominalModifier) &&
                       anotherElementModifier.ActsWithRoleInAncestor(ParentElementBuilder.ChildRole.Modifier, commonAncestorNominalModifier));
            }
        }
Example #2
0
 /// <summary>Add the valid ChildRoles for <paramref name="child"/> to <paramref name="listOfRoles"/></summary>
 private protected override void AddValidRolesForChildTo(List <ChildRole> listOfRoles, ElementBuilder child)
 {
     listOfRoles.Add(ChildRole.Head);
     listOfRoles.Add(ChildRole.Modifier);
 }
Example #3
0
 /// <summary>Add the valid ChildRoles for <paramref name="child"/> to <paramref name="listOfRoles"/></summary>
 private protected abstract void AddValidRolesForChildTo(List <ChildRole> listOfRoles, ElementBuilder child);
Example #4
0
 /// <summary>Add the valid ChildRoles for <paramref name="child"/> to <paramref name="listOfRoles"/></summary>
 private protected override void AddValidRolesForChildTo(List <ChildRole> listOfRoles, ElementBuilder child)
 {
     listOfRoles.Add(ChildRole.Head);
     listOfRoles.Add(ChildRole.Modifier);
     listOfRoles.Add(ChildRole.Complement);
     if (SpecifierBuilder == null || SpecifierBuilder == child)
     {
         listOfRoles.Add(ChildRole.Specifier);
     }
     if (CoordinatorBuilder == null || CoordinatorBuilder == child)
     {
         listOfRoles.Add(ChildRole.Coordinator);
     }
 }
Example #5
0
 /// <summary>Add the valid ChildRoles for <paramref name="child"/> to <paramref name="listOfRoles"/></summary>
 private protected override void AddValidRolesForChildTo(List <ChildRole> listOfRoles, ElementBuilder child)
 {
     listOfRoles.Add(ChildRole.Unassigned);
 }
Example #6
0
 /// <summary>Add the valid ChildRoles for <paramref name="child"/> to <paramref name="listOfRoles"/></summary>
 private protected override void AddValidRolesForChildTo(List <ChildRole> listOfRoles, ElementBuilder child)
 {
     listOfRoles.Add(ChildRole.Subject);
     listOfRoles.Add(ChildRole.Predicate);
 }
Example #7
0
 /// <summary>Return true if this is part of a compound syntax formation with <paramref name="anotherElementBuilder"/></summary>
 internal override bool IsCompoundedWith(ElementBuilder anotherElementBuilder)
 {
     return(IsDirectlyCompoundedWith(anotherElementBuilder) ||
            IsPartOfNominalModifierWith(anotherElementBuilder));
 }
 /// <summary>Add the valid ChildRoles for <paramref name="child"/> to <paramref name="listOfRoles"/></summary>
 private protected override void AddValidRolesForChildTo(List <ChildRole> listOfRoles, ElementBuilder child)
 {
     listOfRoles.Add(ChildRole.Subject);
     if (PredicateBuilder == null)
     {
         listOfRoles.Add(ChildRole.Predicate);
     }
     if (ComplementizerBuilder == null)
     {
         listOfRoles.Add(ChildRole.Complementizer);
     }
 }
 /// <summary>Add the valid ChildRoles for <paramref name="child"/> to <paramref name="listOfRoles"/></summary>
 private protected override void AddValidRolesForChildTo(List <ChildRole> listOfRoles, ElementBuilder child)
 {
     listOfRoles.Add(ChildRole.Coordinated);
     if (CoordinatorBuilder == null || CoordinatorBuilder == child)
     {
         listOfRoles.Add(ChildRole.Coordinator);
     }
 }