public void Free(ILexeme lexeme)
 {
     var parseEngineLexeme = lexeme as ParseEngineLexeme;
     if(parseEngineLexeme == null)
         throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} from ParseEngineLexeme.");
     _queue.Enqueue(parseEngineLexeme);
 }
 public void Free(ILexeme lexeme)
 {
     var stringLiteralLexeme = lexeme as StringLiteralLexeme;
     if (stringLiteralLexeme == null)
         throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} from StringLiteralLexemeFactory.");
     _queue.Enqueue(stringLiteralLexeme);
 }
Example #3
0
 public void Free(ILexeme lexeme)
 {
     var dfaLexeme = lexeme as DfaLexeme;
     if (dfaLexeme == null)
         throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} with DfaLexemeFactory");
     _queue.Enqueue(dfaLexeme);
 }
        public void Free(ILexeme lexeme)
        {
            var terminalLexeme = lexeme as TerminalLexeme;
            if (terminalLexeme == null)
                throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} from TerminalLexemeFactory");

            _queue.Enqueue(terminalLexeme);
        }
Example #5
0
 public void Free(ILexeme lexeme)
 {
     if (!(lexeme is StringLiteralLexeme stringLiteralLexeme))
     {
         throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} from StringLiteralLexemeFactory.");
     }
     _queue.Enqueue(stringLiteralLexeme);
 }
Example #6
0
 public void Free(ILexeme lexeme)
 {
     if (!(lexeme is DfaLexeme dfaLexeme))
     {
         throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} with DfaLexemeFactory");
     }
     _queue.Enqueue(dfaLexeme);
 }
 public void Free(ILexeme lexeme)
 {
     if (!(lexeme is ParseEngineLexeme parseEngineLexeme))
     {
         throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} from ParseEngineLexeme.");
     }
     _queue.Enqueue(parseEngineLexeme);
 }
Example #8
0
        public void Free(ILexeme lexeme)
        {
            if (!(lexeme is TerminalLexeme terminalLexeme))
            {
                throw new Exception($"Unable to free lexeme of type { lexeme.GetType()} from TerminalLexemeFactory");
            }

            _queue.Enqueue(terminalLexeme);
        }
Example #9
0
        public void Free(ILexeme lexeme)
        {
            var parseEngineLexeme = lexeme as ParseEngineLexeme;

            if (parseEngineLexeme == null)
            {
                throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} from ParseEngineLexeme.");
            }
            _queue.Enqueue(parseEngineLexeme);
        }
Example #10
0
        public void Free(ILexeme lexeme)
        {
            var dfaLexeme = lexeme as DfaLexeme;

            if (dfaLexeme == null)
            {
                throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} with DfaLexemeFactory");
            }
            _queue.Enqueue(dfaLexeme);
        }
        public void Free(ILexeme lexeme)
        {
            var stringLiteralLexeme = lexeme as StringLiteralLexeme;

            if (stringLiteralLexeme == null)
            {
                throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} from StringLiteralLexemeFactory.");
            }
            _queue.Enqueue(stringLiteralLexeme);
        }
Example #12
0
        public void Free(ILexeme lexeme)
        {
            var terminalLexeme = lexeme as TerminalLexeme;

            if (terminalLexeme == null)
            {
                throw new Exception($"Unable to free lexeme of type {lexeme.GetType()} from TerminalLexemeFactory");
            }

            _queue.Enqueue(terminalLexeme);
        }