Beispiel #1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public NcCodeParser(NcCodeScanner scanner)
        {
            NcCodeToken tk;

            _Scanner = scanner;
            _Tokens  = new List <NcCodeToken>();
            while ((tk = scanner.GetToken()) != null)
            {
                _Tokens.Add(tk);
            }

            _Position    = 0;
            _Token       = _Position < _Tokens.Count ? _Tokens[_Position] : null;
            _LastCmdType = NcCodeCmdType.None;
        }
Beispiel #2
0
 public NcCodeTokenException(string message, NcCodeScanner scanner) :
     base(scanner.CurrentPositionDesc + message)
 {
     this.LineIndex = scanner.LineIndex;
     this.Position  = scanner.Position;
 }