Пример #1
0
        public override IDerivation Visit(PlaceHolderPhrase aPlaceHolderPhrase, DerivationContext aContext)
        {
            CyclesDetectContext context = aContext as CyclesDetectContext;

            aPlaceHolderPhrase.Parent = context.Parent;
            CyclesDetectContext newContext = new CyclesDetectContext(aContext as CyclesDetectContext);

            newContext.Parent = aPlaceHolderPhrase;
            return(base.Visit(aPlaceHolderPhrase, newContext));
        }
Пример #2
0
        public virtual IDerivation Visit(PlaceHolderPhrase aPlaceHolderPhrase, DerivationContext aContext)
        {
            ListDerivation lList = new ListDerivation(true, aContext);
            TextDerivation lText = new TextDerivation(aPlaceHolderPhrase.Name); //Symbol.Create(mGrammar, Name, true);

            lList.Add(lText);
            //add this point to special list for futher replacement
            PlaceHolders.Add(aPlaceHolderPhrase.Name, lText);
            return(lList);
        }
Пример #3
0
 public virtual IDerivation Visit(PlaceHolderPhrase aPlaceHolderPhrase, DerivationContext aContext)
 {
     return(null);
 }