Exemple #1
0
        public override void EnterParameterListParameterValue(TnsNamesParser.ParameterListParameterValueContext context)
        {
            var    parameterContext = (TnsNamesParser.ParameterContext)context.Parent;
            string keyword          = parameterContext.keyword().GetText();

            _levelStack.Push(keyword);


            bool isRootLevel = parameterContext.Parent is TnsNamesParser.Configuration_fileContext;

            // TNS name node
            if (isRootLevel && !string.Equals(keyword, "IFILE", StringComparison.OrdinalIgnoreCase))
            {
                _currentTnsNameInfo        = new TnsNameNode(keyword.ToUpperInvariant(), parameterContext);
                _currentTnsNameAddressList = new List <DatabaseAddressNode>();
            }
            // Address node
            else if (string.Equals(keyword, "ADDRESS", StringComparison.OrdinalIgnoreCase))
            {
                _currentDatabaseAddress = new DatabaseAddressNode(parameterContext);
                _currentTnsNameAddressList.Add(_currentDatabaseAddress);
            }

            base.EnterParameterListParameterValue(context);
        }
Exemple #2
0
        public override void ExitParameterListParameterValue(TnsNamesParser.ParameterListParameterValueContext context)
        {
            _levelStack.Pop();

            base.ExitParameterListParameterValue(context);
        }
 /// <summary>
 /// Exit a parse tree produced by the <c>parameterListParameterValue</c>
 /// labeled alternative in <see cref="TnsNamesParser.parameterValue"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitParameterListParameterValue([NotNull] TnsNamesParser.ParameterListParameterValueContext context)
 {
 }