예제 #1
0
 public TokenStream lex()
 {
     while (!characterStream.isEndOfStream())
     {
         addToken();
     }
     return(tokenStream);
 }
예제 #2
0
        private SyntaxNode parseIdentifier()
        {
            SyntaxNode node = readNode();

            while (!currentCharacterStream.isEndOfStream())
            {
                SyntaxNode operatorNode = SyntaxNode.createMultiplierNode();
                operatorNode.right = node;
                operatorNode.left  = readNode();
                node = operatorNode;
            }
            return(node);
        }