Say hypothetically, I wanted to create a tool that counted the number of methods in a Java program. The tool would parse the Java code looking for methods and count them.
But what if I had a C++ program and I wanted to count the number of methods in that program. I cannot use the tool I have developed since the syntax for a C++ method and a Java method are different.
My question is, would it be possible to define the syntax for a Java method using XML?
Then develop a tool (that uses the XML) to count the number of methods in a program.
Then the tool could be used for many languages - all that needs to change is the XML representation of a method.
Is this possible or can anyone see how it could be done?
Thanks.
But what if I had a C++ program and I wanted to count the number of methods in that program. I cannot use the tool I have developed since the syntax for a C++ method and a Java method are different.
My question is, would it be possible to define the syntax for a Java method using XML?
Then develop a tool (that uses the XML) to count the number of methods in a program.
Then the tool could be used for many languages - all that needs to change is the XML representation of a method.
Is this possible or can anyone see how it could be done?
Thanks.