Пример #1
0
        public void TestLexer( )
        {
            Tokenisator lex = new Tokenisator(new StringReader("a 12 12,3 45 -+*/+"));

            Token tok = Token.EOF;

            do
            {
                lex.NextToken();
                tok = lex.CurrentToken;
            } while (tok != Token.EOF);
        }
Пример #2
0
 private Symbol GetSymbolFromToken(Tokenisator stream) => new Symbol(stream.CurrentToken, stream.Value, stream.Identifier, stream.CurrentPosition);
Пример #3
0
 public void Lex(TextReader textReader)
 {
     reader = new Tokenisator(textReader);
     Next();
 }