示例#1
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;
        }
示例#2
0
        /// <summary>
        /// Utility function, things common to constructors.
        /// </summary>
        void Initialize()
        {
            log = new Logger("StreamTokenizer");
            log.Verbosity = VerbosityLevel.Warn;
            backString = new CharBuffer(32);
            nextTokenSb = new CharBuffer(1024);

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

            expSb = new CharBuffer();
            tmpSb = new CharBuffer();
        }
示例#3
0
 /// <summary>
 /// Copy constructor.
 /// </summary>
 public StreamTokenizerSettings(StreamTokenizerSettings other)
 {
     Copy(other);
 }