Ejemplo n.º 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));
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 8
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);
     if (PredicateBuilder == null)
     {
         listOfRoles.Add(ChildRole.Predicate);
     }
     if (ComplementizerBuilder == null)
     {
         listOfRoles.Add(ChildRole.Complementizer);
     }
 }
Ejemplo n.º 9
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.Coordinated);
     if (CoordinatorBuilder == null || CoordinatorBuilder == child)
     {
         listOfRoles.Add(ChildRole.Coordinator);
     }
 }