all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs indentation bug
@ 2003-10-15  1:04 Ronaldo Menezes
  0 siblings, 0 replies; only message in thread
From: Ronaldo Menezes @ 2003-10-15  1:04 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

A student of mine came to me with the attached Java code complaining 
that emacs could not indent it correctly.
Although the code is correct (it compiles, if the other classes were 
available) the regular expression used
in emacs doesn't seem to like some strings with colons. Just try to 
"indent-region" the attached code
and you'll see what I mean.

Ronaldo Menezes
Assistant Professor, Computer Sciences
Florida Institute of Technology


[-- Attachment #2: Problem_TestDriver.java --]
[-- Type: text/plain, Size: 3625 bytes --]

/*****************************************
 *   Karen Oertner
 *   Lab 06
 *   Implementation of a link list
 *   which has pointers to the 
 *   next node inserted, the next node 
 *   in ascending order, and the 
 *   next node in decending order.
 ******************************************/

public class TestDriver {
    
    public static void main(String[] args) {
        String s = "";
        LinkList ll = new LinkList();
        //add items to the list at the tail
        System.out.println("================================\nAdd items to tail ");
        ll.add("BBBBBB");
        ll.add("AAAAA");
        ll.add("TEST");
        ll.add("Karen");
        ll.add("Greg");
        ll.add("aaaaa");
        
        //print the lists
        System.out.println("\nThe linked list in inserted order: ");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): "); 
									ll.printLLAscend();
        
        //test the insert function - add items to the head of the list
        System.out.println("\n\n=============================\nInsert Function at beginning");
        ll.insert("Susan");
        ll.insert("Sara");
        
        //print the lists
        System.out.println("\nThe linked list in inserted order:");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): ");
        ll.printLLAscend();
                                                                                                                                        
        //test the delete element function
        System.out.println("\n==============================\nDelete Element function (case sensitive): ");
        System.out.println(ll.delete("AAAAA"));
        System.out.println(ll.delete("Sara"));
        System.out.println(ll.delete("Gregs"));
        
        //print the lists
        System.out.println("\nThe linked list in inserted order: ");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): ");
        ll.printLLAscend();
        
        //test the delete all elements function
        System.out.println("\n==============================\nDelete All Elements function: ");
        ll.deleteAll();
        //print the lists
	
        System.out.println("\nThe linked list in inserted order: ");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): ");
        ll.printLLAscend();
        
        //prove the delete function by adding new items to the list
        System.out.println("\n\n=============================\nRebuild list");
        ll.insert("Sally");
        ll.insert("David");
        ll.add("Zero");
        ll.add("Alpha");

        //print the lists
        System.out.println("\nThe linked list in inserted order: ");
        ll.printLLNext();
        System.out.println("\n\nThe linked list in decending order (case sentitive): ");
        ll.printLLDecend();
        System.out.println("\n\nThe linked list in ascending order (case sentitive): ");
        ll.printLLAscend();

    }

}

[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-15  1:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-15  1:04 emacs indentation bug Ronaldo Menezes

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.