Beispiel #1
0
        /// <summary>
        /// Utility function, things common to constructors.
        /// </summary>
        private void Initialize()
        {
            backString  = new CharBuffer(32);
            nextTokenSb = new CharBuffer(1024);

            InitializeStream();
            settings = new StreamTokenizerSettings();
            settings.SetDefaults();

            expSb = new CharBuffer();
            tmpSb = new CharBuffer();
        }
Beispiel #2
0
        /// <summary>
        /// Sets this object to be the same as the specified object.
        /// Note that some settings which are entirely embodied by the character
        /// type table.
        /// </summary>
        public void Copy(StreamTokenizerSettings other)
        {
            charTypes = new byte[StreamTokenizer.NCHARS + 1];  // plus an EOF entry
            Array.Copy(other.charTypes, 0, charTypes, 0, charTypes.Length);

            grabWhitespace     = other.grabWhitespace;
            grabEol            = other.grabEol;
            slashSlashComments = other.slashSlashComments;
            slashStarComments  = other.slashStarComments;
            grabComments       = other.grabComments;
            doUntermCheck      = other.doUntermCheck;

            parseHexNumbers = other.parseHexNumbers;
        }
Beispiel #3
0
 /// <summary>
 /// Copy constructor.
 /// </summary>
 public StreamTokenizerSettings(StreamTokenizerSettings other)
 {
     Copy(other);
 }