Ejemplo n.º 1
0
 public int GetTokenIndex(int lexerState)
 {
     if (m_scannerInfo == null)
     {
         throw new InvalidOperationException("This lexeme is not initialized");
     }
     return(m_scannerInfo.GetTokenIndex(m_stateIndex, lexerState));
 }
Ejemplo n.º 2
0
Archivo: Scanner.cs Proyecto: zgf/VBF
        private bool IsLastTokenSkippable()
        {
            int acceptTokenIndex = m_scannerInfo.GetTokenIndex(m_lastState);

            if (acceptTokenIndex < 0 && RecoverErrors)
            {
                //eat one char to continue
                m_lexemeValueBuilder.Append((char)m_source.ReadChar());

                if (ErrorList != null)
                {
                    ErrorList.AddError(LexicalErrorId, new SourceSpan(m_lastTokenStart, m_source.Location), m_lexemeValueBuilder.ToString());
                }

                return(true);
            }

            return(acceptTokenIndex >= 0 && m_tokenAttributes[acceptTokenIndex] == c_skip);
        }
Ejemplo n.º 3
0
Archivo: Lexeme.cs Proyecto: zgf/VBF
 public int GetTokenIndex(int lexerState)
 {
     return(m_scannerInfo.GetTokenIndex(m_stateIndex, lexerState));
 }