Пример #1
0
        /// <summary>
        /// The $scope section defines the scope of which the variables belong in.
        /// </summary>
        /// <param name="Words"></param>
        private void OnScope(string[] Words)
        {
            VCDScope sc = VCDScope.Parse(Words);

            CurrentVCDScope.Push(sc);
            CurrentScope = CurrentScope.AddNewScope(sc.Name);
        }
Пример #2
0
        public static VCDScope Parse(string[] Words)
        {
            VCDScope sc = new VCDScope();

            switch (Words[1])
            {
            case "begin": sc.scType = ScopeType.begin; break;

            case "fork": sc.scType = ScopeType.fork; break;

            case "function": sc.scType = ScopeType.function; break;

            case "module": sc.scType = ScopeType.begin; break;

            case "task": sc.scType = ScopeType.begin; break;

            default: throw new Exception("Scope Type is incorrect");
            }
            sc.name = Words[2];
            return(sc);
        }