diff options
Diffstat (limited to 'paludis/repositories/e/dep_parser.cc')
-rw-r--r-- | paludis/repositories/e/dep_parser.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc index 147974f5f..afe6c63d5 100644 --- a/paludis/repositories/e/dep_parser.cc +++ b/paludis/repositories/e/dep_parser.cc @@ -219,6 +219,13 @@ namespace throw EDepParseError(s, "Any dep specs not allowed here"); } + void exactly_one_not_allowed_handler(const std::string & s) PALUDIS_ATTRIBUTE((noreturn)); + + void exactly_one_not_allowed_handler(const std::string & s) + { + throw EDepParseError(s, "Exactly one dep specs not allowed here"); + } + void arrows_not_allowed_handler(const std::string & s, const std::string & f, const std::string & t) PALUDIS_ATTRIBUTE((noreturn)); void arrows_not_allowed_handler(const std::string & s, const std::string & f, const std::string & t) @@ -414,6 +421,7 @@ paludis::erepository::parse_depend(const std::string & s, n::on_any() = std::bind(&any_all_handler<DependencySpecTree, AnyDepSpec>, std::ref(stack)), n::on_arrow() = std::bind(&arrows_not_allowed_handler, s, _1, _2), n::on_error() = std::bind(&error_handler, s, _1), + n::on_exactly_one() = std::bind(&exactly_one_not_allowed_handler, s), n::on_label() = std::bind(&dependency_label_handler<DependencySpecTree>, std::ref(stack), ParseStackTypes<DependencySpecTree>::AnnotationsGoHere(std::bind( @@ -457,6 +465,7 @@ paludis::erepository::parse_provide(const std::string & s, n::on_any() = std::bind(&any_not_allowed_handler, s), n::on_arrow() = std::bind(&arrows_not_allowed_handler, s, _1, _2), n::on_error() = std::bind(&error_handler, s, _1), + n::on_exactly_one() = std::bind(&exactly_one_not_allowed_handler, s), n::on_label() = std::bind(&labels_not_allowed_handler, s, _1), n::on_pop() = std::bind(&pop_handler<ProvideSpecTree>, std::ref(stack), ParseStackTypes<ProvideSpecTree>::AnnotationsGoHere(std::bind( @@ -498,6 +507,7 @@ paludis::erepository::parse_fetchable_uri(const std::string & s, ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::bind( &set_thing_to_annotate, std::ref(thing_to_annotate), _1)), s, _1, _2, std::cref(eapi)), n::on_error() = std::bind(&error_handler, s, _1), + n::on_exactly_one() = std::bind(&exactly_one_not_allowed_handler, s), n::on_label() = std::bind(&fetchable_label_handler<FetchableURISpecTree>, std::ref(stack), ParseStackTypes<FetchableURISpecTree>::AnnotationsGoHere(std::bind( &set_thing_to_annotate, std::ref(thing_to_annotate), _1)), _1, std::cref(eapi)), @@ -539,6 +549,7 @@ paludis::erepository::parse_simple_uri(const std::string & s, n::on_any() = std::bind(&any_not_allowed_handler, s), n::on_arrow() = std::bind(&arrows_not_allowed_handler, s, _1, _2), n::on_error() = std::bind(&error_handler, s, _1), + n::on_exactly_one() = std::bind(&exactly_one_not_allowed_handler, s), n::on_label() = std::bind(&labels_not_allowed_handler, s, _1), n::on_pop() = std::bind(&pop_handler<SimpleURISpecTree>, std::ref(stack), ParseStackTypes<SimpleURISpecTree>::AnnotationsGoHere(std::bind( @@ -578,6 +589,7 @@ paludis::erepository::parse_license(const std::string & s, n::on_any() = std::bind(&any_all_handler<LicenseSpecTree, AnyDepSpec>, std::ref(stack)), n::on_arrow() = std::bind(&arrows_not_allowed_handler, s, _1, _2), n::on_error() = std::bind(&error_handler, s, _1), + n::on_exactly_one() = std::bind(&exactly_one_not_allowed_handler, s), n::on_label() = std::bind(&labels_not_allowed_handler, s, _1), n::on_pop() = std::bind(&pop_handler<LicenseSpecTree>, std::ref(stack), ParseStackTypes<LicenseSpecTree>::AnnotationsGoHere(std::bind( @@ -617,6 +629,7 @@ paludis::erepository::parse_plain_text(const std::string & s, n::on_any() = std::bind(&any_not_allowed_handler, s), n::on_arrow() = std::bind(&arrows_not_allowed_handler, s, _1, _2), n::on_error() = std::bind(&error_handler, s, _1), + n::on_exactly_one() = std::bind(&exactly_one_not_allowed_handler, s), n::on_label() = std::bind(&labels_not_allowed_handler, s, _1), n::on_pop() = std::bind(&pop_handler<PlainTextSpecTree>, std::ref(stack), ParseStackTypes<PlainTextSpecTree>::AnnotationsGoHere(std::bind( @@ -656,6 +669,7 @@ paludis::erepository::parse_myoptions(const std::string & s, n::on_any() = std::bind(&any_not_allowed_handler, s), n::on_arrow() = std::bind(&arrows_not_allowed_handler, s, _1, _2), n::on_error() = std::bind(&error_handler, s, _1), + n::on_exactly_one() = std::bind(&exactly_one_not_allowed_handler, s), n::on_label() = std::bind(&plain_text_label_handler<PlainTextSpecTree>, std::ref(stack), ParseStackTypes<PlainTextSpecTree>::AnnotationsGoHere(std::bind( &set_thing_to_annotate, std::ref(thing_to_annotate), _1)), _1), |