diff options
Diffstat (limited to 'TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.cpp')
-rw-r--r-- | TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.cpp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.cpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.cpp deleted file mode 100644 index 49e241fc475..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// file : CCF/CodeGenerationKit/CommandLineParser.cpp -// author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// cvs-id : $Id$ - -#include "CCF/CodeGenerationKit/CommandLineParser.hpp" -#include "CCF/CodeGenerationKit/CommandLineGrammar.hpp" - -#include <vector> -#include <string> -#include <iostream> - -using std::cerr; -using std::endl; - -bool parse (int argc, char* argv[], CommandLine& cl) throw () -{ - typedef - std::vector<std::string> - Argv; - - Argv v; - - for (int i = 0; i < argc; i++) - { - v.push_back (argv[i]); - } - - Argv::iterator first = v.begin (); - Argv::iterator last = v.end (); - - scanner<Argv::iterator, scanner_policies <> > scan(first, last); - - CLineGrammar g (cl); - - match<nil_t> hit = g.parse(scan); - - bool result = static_cast<std::size_t>(hit.length()) == v.size (); - - // some semantic analisys - if (!cl.separator) - { - CommandLine::Options::reverse_iterator r = cl.options.rbegin (); - - if (r != cl.options.rend () && - r->value_ != "" && - r->type_ == CommandLine::Option::COMPOSITE) - { - - cerr << "command line: assuming <" << r->value_ - << "> to be a value of option <" << r->name_ - << "> and not the first argument" << endl; - - cerr << "command line: write ... --" << r->name_ << " -- " - << r->value_ << " ... to indicate otherwise" << endl; - } - } - - return result; -} |