Project 3: TDD # Posted: Thursday, Mar 19
Due Thursday, Apr 2
The following assignment is due Thursday, Apr 2.
Note: The Subversion repository is not posted yet. I will remove this note once it is.
srcML is an XML format for source code. It wraps the text parts of your code with XML elements, and makes it easy to identify lexical and syntactic of code. It has its own C/C++/Java/C# parser, and handles code fragments (partial code) and code that will not compile. It is fast, efficient, and robust, thus making it scalable to very large systems, i.e., the entire Linux kernel. It is used by many software engineering researchers and by industry. Since it was created, the srcML project has received a total of $1 million in grant (NSF, Industry) funding.
The CLI program srcml allows the conversion of source code to the srcML format. In that program the function request_srcml()
is unfinished. The problem is determining the language (programming language) and the value of the attribute filename. The rules for determining these are:
get_language_from_filename()
already does this mapping.std::cin
), then the local_filename will have the value “-”. In that case, the option_filename and entry_filename will have to be used. Note that if the entry_filename is not valid (i.e, has the value “data”) for a non source code archive, then the option_filename must be used. If the option_filename has the value "", then the resulting filename is blank, and the language is based on the option_language.std::cin
) and a language cannot be determined, output the error message “Using stdin requires a declared language”std::cerr
), and the function should return the boolean value false
request_srcml()
and in the test program request_srcml_t.cpp
.Makefile
SE TDD Example # Posted: Tuesday, Mar 10
Posted in solitary Subversion repository
Posted in solitary Subversion repository. Available from the link of this news item.