aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest-parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-11 16:14:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-11 16:14:55 +0200
commited158b59063cd238a12bb022b465ebf491b43ef6 (patch)
tree405b7bdf2c1e09ba5272fd16d9a7abdb53d0e50f /bpkg/manifest-parser.cxx
parent72648921ec28903615698a61aeff4799e1ca9a7d (diff)
Minor fixes to manifest parser
Diffstat (limited to 'bpkg/manifest-parser.cxx')
-rw-r--r--bpkg/manifest-parser.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/bpkg/manifest-parser.cxx b/bpkg/manifest-parser.cxx
index 374de3e..68fd073 100644
--- a/bpkg/manifest-parser.cxx
+++ b/bpkg/manifest-parser.cxx
@@ -11,12 +11,13 @@ using namespace std;
namespace bpkg
{
+ using parsing = manifest_parsing;
using name_value = manifest_parser::name_value_type;
name_value manifest_parser::
next ()
{
- if (s_ == eos)
+ if (s_ == end)
return name_value {"", "", l_, c_, l_, c_};
xchar c (skip_spaces ());
@@ -53,10 +54,10 @@ namespace bpkg
// This is ok as long as the name is empty.
//
if (!r.name.empty ())
- throw manifest_parsing (name_, c.line (), c.column (),
- "':' expected after name");
+ throw parsing (name_, c.line (), c.column (),
+ "':' expected after name");
- s_ = eos;
+ s_ = end;
// The "end" pair.
//
@@ -66,8 +67,7 @@ namespace bpkg
}
if (c != ':')
- throw manifest_parsing (name_, c.line (), c.column (),
- "':' expected after name");
+ throw parsing (name_, c.line (), c.column (), "':' expected after name");
skip_spaces ();
parse_value (r);
@@ -90,8 +90,8 @@ namespace bpkg
// special empty name/format version.
//
if (!r.name.empty ())
- throw manifest_parsing (name_, r.name_line, r.name_column,
- "format version pair expected");
+ throw parsing (name_, r.name_line, r.name_column,
+ "format version pair expected");
// The version value is only mandatory for the first manifest in
// a sequence.
@@ -99,8 +99,8 @@ namespace bpkg
if (r.value.empty ())
{
if (version_.empty ())
- throw manifest_parsing (name_, r.value_line, r.value_column,
- "format version value expected");
+ throw parsing (name_, r.value_line, r.value_column,
+ "format version value expected");
r.value = version_;
}
else
@@ -108,8 +108,8 @@ namespace bpkg
version_ = r.value; // Update with the latest.
if (version_ != "1")
- throw manifest_parsing (name_, r.value_line, r.value_column,
- "unsupported format version " + version_);
+ throw parsing (name_, r.value_line, r.value_column,
+ "unsupported format version " + version_);
}
s_ = body;