[ovs-dev] [PATCH ovn v3 05/10] lex: New functions lex_lookahead() and lexer_match_id().
Ben Pfaff
blp at nicira.com
Wed Apr 29 00:05:22 UTC 2015
On Tue, Apr 28, 2015 at 03:34:31PM -0400, Russell Bryant wrote:
> On 04/24/2015 06:34 PM, Ben Pfaff wrote:
> > These functions will have their first users in upcoming commits.
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > ovn/lib/lex.c | 28 ++++++++++++++++++++++++++++
> > ovn/lib/lex.h | 2 ++
> > 2 files changed, 30 insertions(+)
> >
>
> > diff --git a/ovn/lib/lex.h b/ovn/lib/lex.h
> > index 29e922c..df4db2d 100644
> > --- a/ovn/lib/lex.h
> > +++ b/ovn/lib/lex.h
> > @@ -105,6 +105,8 @@ void lexer_init(struct lexer *, const char *input);
> > void lexer_destroy(struct lexer *);
> >
> > enum lex_type lexer_get(struct lexer *);
> > +enum lex_type lexer_lookahead(const struct lexer *);
> > bool lexer_match(struct lexer *, enum lex_type);
> > +bool lexer_match_id(struct lexer *, const char *id);
>
> I think you meant to remove "id" here.
I usually omit names in prototypes if its meaning or purpose is obvious
from the type (e.g. "struct lexer *lexer" is just redundant), and
include them if it seems potentially helpful. So I thought the 'id' was
worthwhile here.
> Acked-by: Russell Bryant <rbryant at redhat.com>
Thanks!
More information about the dev
mailing list