public IEnumerable <PortWirePair> GetNet(string trimmedStatement)
        {
            var connections = GetNetPartFrom(trimmedStatement);
            var request     = new PortsTokenizeRequest(connections);

            while (_portsTokenizer.HasNext(request))
            {
                var portToken = _portsTokenizer.NextToken(request);
                var wireToken = _portsTokenizer.NextToken(request);
                if (portToken == null || wireToken == null)
                {
                    yield break;
                }
                yield return(new PortWirePair(portToken, wireToken));
            }
        }
Esempio n. 2
0
        public IEnumerable <Port> GetPorts(string trimmedStatement)
        {
            var request = new PortsTokenizeRequest(trimmedStatement)
            {
                IsPortList = true
            };

            while (_portsTokenizer.HasNext(request))
            {
                var portToken = _portsTokenizer.NextToken(request);
                if (portToken == null)
                {
                    yield break;
                }
                yield return(new Port(portToken));
            }
        }