+ super
+ value += 1
+ end
+end
+
+# Option with one parameter (mandatory by default)
+abstract class OptionParameter
+ super Option
+
+ # Convert `str` to a value of type `VALUE`.
+ protected fun convert(str: String): VALUE is abstract
+
+ # Is the parameter mandatory?
+ var parameter_mandatory = true is writable
+
+ redef fun read_param(opts, it)
+ do
+ super
+
+ var ok = it.is_ok
+ if ok and not parameter_mandatory and not it.item.is_empty and it.item.chars.first == '-' then
+ # The next item may looks like a known command
+ # Only check if `not parameter_mandatory`
+ for opt in opts.options do
+ if opt.names.has(it.item) then
+ # The next item is a known command
+ ok = false
+ break
+ end
+ end
+ end
+
+ if ok then