The Labs \ Source Viewer \ SSCLI \ System.Text.RegularExpressions \ RegexTree

  1. //------------------------------------------------------------------------------
  2. // <copyright file="RegexTree.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. // RegexTree is just a wrapper for a node tree with some
  16. // global information attached.
  17. namespace System.Text.RegularExpressions
  18. {
  19.    
  20.     using System.Collections;
  21.    
  22.     internal sealed class RegexTree
  23.     {
  24.         internal RegexTree(RegexNode root, Hashtable caps, object[] capnumlist, int captop, Hashtable capnames, string[] capslist, RegexOptions opts)
  25.         {
  26.             _root = root;
  27.             _caps = caps;
  28.             _capnumlist = capnumlist;
  29.             _capnames = capnames;
  30.             _capslist = capslist;
  31.             _captop = captop;
  32.             _options = opts;
  33.         }
  34.        
  35.         internal RegexNode _root;
  36.         internal Hashtable _caps;
  37.         internal object[] _capnumlist;
  38.         internal Hashtable _capnames;
  39.         internal string[] _capslist;
  40.         internal RegexOptions _options;
  41.         internal int _captop;
  42.        
  43.         #if DBG
  44.         internal void Dump()
  45.         {
  46.             _root.Dump();
  47.         }
  48.        
  49.         internal bool Debug {
  50.             get { return (_options & RegexOptions.Debug) != 0; }
  51.         }
  52.         #endif
  53.     }
  54. }

Developer Fusion