graveyard/tools/org/apache/axis/tools/common/InputCppSourceCode.java
/** 
	 * Rules to recognise fields and methods...
		 *
		 * Fields must contain a semicolon
	 * Methods may or may not contain a semicolon
	 * Prototypes must contain a semicolon
	 * Fields may or may not contain a brace (array initialisers do)
	 * Methods must contain a brace
	 * Prototypes must not contain a brace
	 * Fields may or may not contain a bracket (casts do)
	 * Methods must contain a bracket
	 * Prototypes must contain a bracket
	 *
	 * It's a method if it contains a bracket and then a brace
	 * before the first semicolon (if there is a semicolon). 
	 * It's a prototype if it's not a method and it contains brackets before a semicolon.
	 * It's a field if it's not a method or a prototype and it contains a semicolon.
	 * If it's not a field, a method or a prototype and we haven't recognised it
	 * previously then it's an error.
	 */
Rules to recognise fields and methods
Fields must contain a semicolon
Methods may or may not contain a semicolon
Prototypes must contain a semicolon
Fields may or may not contain a brace (array initialisers do)
Methods must contain a brace
Prototypes must not contain a brace
Fields may or may not contain a bracket (casts do)
Methods must contain a bracket
Prototypes must contain a bracket

It's a method if it contains a bracket and then a brace
before the first semicolon (if there is a semicolon).
It's a prototype if it's not a method and it contains brackets before a semicolon.
It's a field if it's not a method or a prototype and it contains a semicolon.
If it's not a field, a method or a prototype and we haven't recognised it
previously then it's an error.
Rules to recognise fields and methods Fields must contain a semicolon Methods may or may not contain a semicolon Prototypes must contain a semicolon Fields may or may not contain a brace ( array initialisers do ) Methods must contain a brace Prototypes must not contain a brace Fields may or may not contain a bracket ( casts do ) Methods must contain a bracket Prototypes must contain a bracket It ' s a method if it contains a bracket and then a brace before the first semicolon ( if there is a semicolon ) . It ' s a prototype if it ' s not a method and it contains brackets before a semicolon . It ' s a field if it ' s not a method or a prototype and it contains a semicolon . If it ' s not a field a method or a prototype and we haven ' t recognised it previously then it ' s an error .
private static boolean isMethod(String s) throws ParsingException {
		int semicolon = Utils.indexOf(s, ';');
		int brace = Utils.indexOf(s, '{');
		int bracket = Utils.indexOf(s, '(');
		return (
			-1 != bracket
				&& -1 != brace
				&& bracket < brace
				&& (-1 == semicolon || brace < semicolon));
	}
private static boolean isMethod ( String s ) throws ParsingException { int semicolon = Utils . indexOf ( s , ';' ) ; int brace = Utils . indexOf ( s , '{' ) ; int bracket = Utils . indexOf ( s , '(' ) ; return ( - 1 != bracket && - 1 != brace && bracket < brace && ( - 1 == semicolon || brace < semicolon ) ) ; }
Rules to recognise fields and methods...
 Fields must contain a semicolon
 Methods may or may not contain a semicolon
 Prototypes must contain a semicolon
 Fields may or may not contain a brace (array initialisers do)
 Methods must contain a brace
 Prototypes must not contain a brace
 Fields may or may not contain a bracket (casts do)
 Methods must contain a bracket
 Prototypes must contain a bracket
Rules to recognise fields and methods ... Fields must contain a semicolon Methods may or may not contain a semicolon Prototypes must contain a semicolon Fields may or may not contain a brace ( array initialisers do ) Methods must contain a brace Prototypes must not contain a brace Fields may or may not contain a bracket ( casts do ) Methods must contain a bracket Prototypes must contain a bracket