Here is function main taken from sax.SaxCount.java --one of
the samples in the open source xerces XML parser.

When placed in a buffer in either java or c++-mode --hitting
C-M-f on the '{' of method main
moves corectly to the close brace;
in jde-mode this hits an error:
public static void main(String argv[]) {

        // is there anything to do?
        if (argv.length == 0) {
            printUsage();
            System.exit(1);
        }

        // vars
        String  parserName = DEFAULT_PARSER_NAME;
        boolean validate = false;

        // check parameters
        for (int i = 0; i < argv.length; i++) {
            String arg = argv[i];

            // options
            if (arg.startsWith("-")) {
                if (arg.equals("-p")) {
                    if (i == argv.length - 1) {
                        System.err.println("error: missing parser name");
                        System.exit(1);
                    }
                    parserName = argv[++i];
                    continue;
                }

                if (arg.equals("-w")) {
                    warmup = true;
                    continue;
                }

                if (arg.equals("-v")) {
                    validate = true;
                    continue;
                }

                if (arg.equals("-h")) {
                    printUsage();
                    System.exit(1);
                }
            }

            // print uri
            print(parserName, arg, validate);
        }

    } // main(String[])
--backtrace attached:
Signaling: (scan-error "Unbalanced parentheses" 40 1266)
  scan-sexps(40 1)
  forward-sexp(1)
* call-interactively(forward-sexp)

-- 
Best Regards,
--raman
------------------------------------------------------------

IBM Research: Human Language Technologies
Phone:        1 (408) 927 2608
Fax:        1 (408) 927 3012
Email:        [EMAIL PROTECTED]
WWW:          http://cs.cornell.edu/home/raman
PGP:          http://cs.cornell.edu/home/raman/raman.asc 
Snail:        IBM Almaden Research Center,
              650 Harry Road
              San Jose 95120

Reply via email to