Esempio n. 1
0
            public void Display()
            {
                LexemToken curr = head;

                while (curr != null)
                {
                    Console.Write(curr.lexem + ", ");
                    Console.Write(curr.token + ", ");
                    Console.WriteLine(curr.cLine);
                    Console.WriteLine("---------------------------------------------------");
                    curr = curr.Next;
                }
            }
Esempio n. 2
0
            public void Add(string lexem, Token token, int cLine)
            {
                LexemToken node = new LexemToken(lexem, token, cLine);

                if (head == null)
                {
                    head = node;
                }
                else
                {
                    tail.Next = node;
                }
                tail = node;
            }