Index: lemon/arg_parser.cc
===================================================================
--- lemon/arg_parser.cc	(revision 210)
+++ lemon/arg_parser.cc	(revision 214)
@@ -240,9 +240,9 @@
   }
 
-  void ArgParser::show(std::ostream &os,Opts::iterator i)
+  void ArgParser::show(std::ostream &os,Opts::const_iterator i) const
   {
     os << "-" << i->first;
     if(i->second.has_syn)
-      for(Opts::iterator j=_opts.begin();j!=_opts.end();++j)
+      for(Opts::const_iterator j=_opts.begin();j!=_opts.end();++j)
         if(j->second.syn&&j->second.help==i->first)
           os << "|-" << j->first;
@@ -262,7 +262,7 @@
   }
 
-  void ArgParser::show(std::ostream &os,Groups::iterator i)
-  {
-    GroupData::Opts::iterator o=i->second.opts.begin();
+  void ArgParser::show(std::ostream &os,Groups::const_iterator i) const
+  {
+    GroupData::Opts::const_iterator o=i->second.opts.begin();
     while(o!=i->second.opts.end()) {
       show(os,_opts.find(*o));
@@ -272,5 +272,5 @@
   }
 
-  void ArgParser::showHelp(Opts::iterator i)
+  void ArgParser::showHelp(Opts::const_iterator i) const
   {
     if(i->second.help.size()==0||i->second.syn) return;
@@ -280,5 +280,6 @@
     std::cerr << "     " << i->second.help << std::endl;
   }
-  void ArgParser::showHelp(std::vector<ArgParser::OtherArg>::iterator i)
+  void ArgParser::showHelp(std::vector<ArgParser::OtherArg>::const_iterator i)
+    const
   {
     if(i->help.size()==0) return;
@@ -287,5 +288,5 @@
   }
 
-  void ArgParser::shortHelp()
+  void ArgParser::shortHelp() const
   {
     const unsigned int LINE_LEN=77;
@@ -293,5 +294,5 @@
     std::cerr << "Usage:\n  " << _command_name;
     int pos=_command_name.size()+2;
-    for(Groups::iterator g=_groups.begin();g!=_groups.end();++g) {
+    for(Groups::const_iterator g=_groups.begin();g!=_groups.end();++g) {
       std::ostringstream cstr;
       cstr << ' ';
@@ -306,5 +307,5 @@
       pos+=cstr.str().size();
     }
-    for(Opts::iterator i=_opts.begin();i!=_opts.end();++i)
+    for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i)
       if(!i->second.ingroup&&!i->second.syn) {
         std::ostringstream cstr;
@@ -320,5 +321,5 @@
         pos+=cstr.str().size();
       }
-    for(std::vector<OtherArg>::iterator i=_others_help.begin();
+    for(std::vector<OtherArg>::const_iterator i=_others_help.begin();
         i!=_others_help.end();++i)
       {
@@ -336,16 +337,16 @@
   }
 
-  void ArgParser::showHelp()
+  void ArgParser::showHelp() const
   {
     shortHelp();
     std::cerr << "Where:\n";
-    for(std::vector<OtherArg>::iterator i=_others_help.begin();
+    for(std::vector<OtherArg>::const_iterator i=_others_help.begin();
         i!=_others_help.end();++i) showHelp(i);
-    for(Opts::iterator i=_opts.begin();i!=_opts.end();++i) showHelp(i);
+    for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i) showHelp(i);
     exit(1);
   }
 
 
-  void ArgParser::unknownOpt(std::string arg)
+  void ArgParser::unknownOpt(std::string arg) const
   {
     std::cerr << "\nUnknown option: " << arg << "\n";
@@ -355,5 +356,5 @@
   }
 
-  void ArgParser::requiresValue(std::string arg, OptType t)
+  void ArgParser::requiresValue(std::string arg, OptType t) const
   {
     std::cerr << "Argument '" << arg << "' requires a";
@@ -376,8 +377,8 @@
 
 
-  void ArgParser::checkMandatories()
+  void ArgParser::checkMandatories() const
   {
     bool ok=true;
-    for(Opts::iterator i=_opts.begin();i!=_opts.end();++i)
+    for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i)
       if(i->second.mandatory&&!i->second.set)
         {
@@ -388,9 +389,9 @@
           showHelp(i);
         }
-    for(Groups::iterator i=_groups.begin();i!=_groups.end();++i)
+    for(Groups::const_iterator i=_groups.begin();i!=_groups.end();++i)
       if(i->second.mandatory||i->second.only_one)
         {
           int set=0;
-          for(GroupData::Opts::iterator o=i->second.opts.begin();
+          for(GroupData::Opts::const_iterator o=i->second.opts.begin();
               o!=i->second.opts.end();++o)
             if(_opts.find(*o)->second.set) ++set;
@@ -399,5 +400,5 @@
               ": At least one of the following arguments is mandatory.\n";
             ok=false;
-            for(GroupData::Opts::iterator o=i->second.opts.begin();
+            for(GroupData::Opts::const_iterator o=i->second.opts.begin();
                 o!=i->second.opts.end();++o)
               showHelp(_opts.find(*o));
@@ -407,5 +408,5 @@
               ": At most one of the following arguments can be given.\n";
             ok=false;
-            for(GroupData::Opts::iterator o=i->second.opts.begin();
+            for(GroupData::Opts::const_iterator o=i->second.opts.begin();
                 o!=i->second.opts.end();++o)
               showHelp(_opts.find(*o));
