Thanks for all the comments, I fixed all of them. A few responses:
On Mon, Aug 15, 2016 at 03:26:05PM -0700, Justin Pettit wrote:
> > On Aug 14, 2016, at 3:24 PM, Ben Pfaff <[email protected]> wrote:
> > diff --git a/ovn/lib/lex.c b/ovn/lib/lex.c
> > index 95edeaf..a05edfa 100644
> > --- a/ovn/lib/lex.c
> > +++ b/ovn/lib/lex.c
> > ...
> > +bool
> > +lexer_force_match(struct lexer *lexer, enum lex_type t)
> > +{
> > + if (lexer_match(lexer, t)) {
> > + return true;
> > + } else {
> > + struct lex_token token = { .type = t };
> > + struct ds s = DS_EMPTY_INITIALIZER;
> > + lex_token_format(&token, &s);
> > +
> > + lexer_syntax_error(lexer, "expecting `%s'", ds_cstr(&s));
>
> Not a big deal at all, but using different left and right quotes looks
> a little odd to me in an error message.
There are several other uses of this form in the tree:
blp@sigabrt:~/nicira/ovs(0)$ git ls-files | grep '\.[ch]$' | xargs grep
'".*`'
lib/bundle.c: return xasprintf("%s: missing slave delimiter,
expected `slaves' "
lib/bundle.c: "got `%s'", s, slave_delim);
lib/bundle.c: return xasprintf("%s: unknown fields `%s'", s, fields);
lib/bundle.c: return xasprintf("%s: unknown algorithm `%s'", s,
algorithm);
lib/bundle.c: return xasprintf("%s: unknown slave_type `%s'", s,
slave_type);
lib/dpif-netlink.c: VLOG_WARN_RL(&rl, "dp%d: port `%s' has unsupported
type %u",
lib/dpif-netlink.c: VLOG_WARN_RL(&error_rl, "%s: cannot create port
`%s' because it has "
lib/dpif-netlink.c: "unsupported type `%s'",
lib/learn.c: return xasprintf("%s: missing `->' following value",
full_s);
lib/learn.c: return xasprintf("%s: table id 255 not valid
for `learn' "
lib/multipath.c: return xasprintf("%s: unknown fields `%s'", s_,
fields);
lib/multipath.c: return xasprintf("%s: unknown algorithm `%s'", s_,
algorithm);
lib/nx-match.c: ovs_fatal(0, "%s: unknown field `%.*s'", full_s,
name_len, s);
lib/nx-match.c: return xasprintf("%s: missing `->' following
source", full_s);
lib/nx-match.c: return xasprintf("%s: unknown field `%.*s'", *sp,
name_len, s);
lib/ofp-actions.c: return xstrdup("bad hex digit in
`controller' "
lib/ofp-actions.c: "action `userdata'");
lib/ofp-actions.c: return xasprintf("%s: missing `->' following
source", full_arg);
lib/ofp-actions.c: return xasprintf("%s: missing `->'", arg);
lib/ofp-actions.c: return xasprintf("%s: missing field name
following `->'", arg);
lib/ofp-actions.c: return xstrdup("bad hex digit in `note'
argument");
lib/ofp-actions.c: error = xasprintf("invalid argument to \"ct\"
action: `%s'", key);
ovn/lib/actions.c: lexer_syntax_error(ctx->lexer, "expecting `=' or
`<->'");
ovn/lib/expr.c: "positively, e.g. `%s' or
`%s == 1' but not "
ovn/lib/expr.c: "`!%s' or `%s == 0'.",
ovn/lib/expr.c: "equality (taking enclosing `!'
operators into "
ovn/lib/expr.c: "Explicit `!= 0' is required for
inequality "
ovn/lib/expr.c: "form `x < field < y' or `x >
field > y', with "
ovn/lib/expr.c: "each `<' optionally replaced by
`<=' or `>' by "
ovn/lib/expr.c: "`>=').");
ovn/lib/expr.c: *errorp = xasprintf("Error parsing expression `%s'
encountered as "
ovn/lib/expr.c: *errorp = xasprintf("Recursive expansion of
symbol `%s'.",
ovn/lib/lex.c: lex_error(token, "`$' must be followed by a valid
identifier.");
ovn/lib/lex.c: lex_error(token, "`/*' without matching
`*/'.");
ovn/lib/lex.c: "`/' is only valid as part of `//' or
`/*'.");
ovn/lib/lex.c: lex_error(token, "`&' is only valid as part of
`&&'.");
ovn/lib/lex.c: lex_error(token, "`|' is only valid as part of
`||'.");
ovn/lib/lex.c: lex_error(token, "`.' is only valid as part of
`..' or a number.");
ovn/lib/lex.c: lex_error(token, "`-' is only valid as part of
`--'.");
ovn/lib/lex.c: lex_error(token, "Invalid character `%c' in
input.", *p);
ovn/lib/lex.c: lexer_syntax_error(lexer, "expecting `%s'",
ds_cstr(&s));
ovn/lib/lex.c: ds_put_format(&s, " at `%.*s'",
ovsdb/ovsdb-client.c: ovs_fatal(0, "no default database for `%s'
command, please "
ovsdb/ovsdb-server.c: VLOG_DBG_RL(&rl, "Table `%s' has no `%s'
column",
ovsdb/ovsdb-server.c: VLOG_DBG("Table `%s' column `%s' has type
%s, not expected "
ovsdb/ovsdb-server.c: VLOG_INFO_RL(&rl, "Table `%s' has missing or
invalid `target' column",
tests/test-ovn.c: ovs_fatal(0, "%s: relational operator expected
at `%.*s'",
utilities/ovs-ofctl.c: ovs_fatal(0, "unknown packet-in
format `%s'", optarg);
utilities/ovs-ofctl.c: ovs_fatal(0, "incorrect value
`%s' for --color", optarg);
utilities/ovs-ofctl.c: ovs_fatal(0, "%s: couldn't find port `%s'",
vconn_name, port_name);
If you'd like to standardize quotes, I'm OK with that. It's probably
something good to put into CodingStyle.
> Acked-by: Justin Pettit <[email protected]>
Thanks, I applied the series up to this point.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev