Ejemplo n.º 1
0
        internal override void AddArc(Arc start, Arc end)
        {
            start = ParseElementCollection.TrimStart(start, _backend);
            end   = ParseElementCollection.TrimEnd(end, _backend);
            State start2 = end.Start;
            State end2   = start.End;

            if ((start.IsEpsilonTransition & start.IsPropertylessTransition) && end2 != null && end2.InArcs.IsEmpty)
            {
                start.End = null;
                _backend.MoveOutputTransitionsAndDeleteState(end2, _startState);
            }
            else
            {
                start.Start = _startState;
            }
            if ((end.IsEpsilonTransition & end.IsPropertylessTransition) && start2 != null && start2.OutArcs.IsEmpty)
            {
                end.Start = null;
                _backend.MoveInputTransitionsAndDeleteState(start2, _endState);
            }
            else
            {
                end.End = _endState;
            }
        }
Ejemplo n.º 2
0
 void IElement.PostParse(IElement parentElement)
 {
     if (_startArc.End.OutArcs.IsEmpty)
     {
         XmlParser.ThrowSrgsException(SRID.EmptyOneOf);
     }
     _startArc = ParseElementCollection.TrimStart(_startArc, _backend);
     _endArc   = ParseElementCollection.TrimEnd(_endArc, _backend);
     PostParse((ParseElementCollection)parentElement);
 }