internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
 {
     return(CreateRuleRefToDictation(elementFactory, parent));
 }
 internal void CreateChildrenElements(IElementFactory elementFactory, IItem parent, IRule rule, IdentifierCollection ruleIds)
 {
     foreach (GrammarBuilderBase item in Items)
     {
         IElement element = item.CreateElement(elementFactory, parent, rule, ruleIds);
         if (element != null)
         {
             element.PostParse(parent);
             elementFactory.AddElement(parent, element);
         }
     }
 }
Exemple #3
0
        internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
        {
            IRuleRef garbage = elementFactory.Garbage;

            elementFactory.InitSpecialRuleRef(parent, garbage);
            return(garbage);
        }
Exemple #4
0
 internal abstract IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds);
        internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
        {
            IOneOf oneOf = elementFactory.CreateOneOf(parent, rule);

            foreach (GrammarBuilderBase item2 in base.Items)
            {
                ItemElement itemElement = item2 as ItemElement;
                if (itemElement == null)
                {
                    itemElement = new ItemElement(item2);
                }
                IItem item = (IItem)itemElement.CreateElement(elementFactory, oneOf, rule, ruleIds);
                item.PostParse(oneOf);
                elementFactory.AddItem(oneOf, item);
            }
            return(oneOf);
        }
        internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
        {
            Uri srgsUri = new Uri(_uri, UriKind.RelativeOrAbsolute);

            return(elementFactory.CreateRuleRef(parent, srgsUri, null, null));
        }
Exemple #7
0
 internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
 {
     if (_rule == null)
     {
         IGrammar grammar = elementFactory.Grammar;
         _ruleName = ruleIds.CreateNewIdentifier(Name);
         _rule     = grammar.CreateRule(_ruleName, RulePublic.False, RuleDynamic.NotSet, false);
         CreateChildrenElements(elementFactory, _rule, ruleIds);
         _rule.PostParse(grammar);
     }
     return(_rule);
 }
Exemple #8
0
        internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
        {
            IItem item = parent as IItem;

            if (item != null)
            {
                CreateChildrenElements(elementFactory, item, rule, ruleIds);
            }
            else if (parent == rule)
            {
                CreateChildrenElements(elementFactory, rule, ruleIds);
            }
            IPropertyTag propertyTag = elementFactory.CreatePropertyTag(parent);

            propertyTag.NameValue(parent, null, _value);
            return(propertyTag);
        }
 internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
 {
     return(elementFactory.CreateRuleRef(parent, new Uri("#" + Rule.RuleName, UriKind.Relative), _semanticKey, null));
 }
Exemple #10
0
 internal override IElement CreateElement(IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds)
 {
     _ruleRef.Rule.CreateElement(elementFactory, parent, rule, ruleIds);
     return(_ruleRef.CreateElement(elementFactory, parent, rule, ruleIds));
 }