diff options
author | Ben Pfaff <blp@ovn.org> | 2017-01-19 19:55:41 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-01-20 14:10:32 -0800 |
commit | f1393f6f3469c25d22a7633c7b1fe0e8be94ed3d (patch) | |
tree | ebb4415b9627c21b08121dce93712ddd02079989 /include | |
parent | 8a41ad8e994c77f48cb321932a262e1f7cf84e19 (diff) | |
download | openvswitch-f1393f6f3469c25d22a7633c7b1fe0e8be94ed3d.tar.gz |
lex: Make lexer_force_match() work for LEX_T_END.
Without this change, lexer_force_match(lex, LEX_T_END) mostly works, except
that in the failure case it emits an error that says "expecting `$'",
which is a surprising error message.
Arguably, lexer_force_end() could be removed entirely, but I don't see a
real problem with the existing arrangement.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mickey Spiegel <mickeys.dev@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/ovn/lex.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ovn/lex.h b/include/ovn/lex.h index 0876d1beb..afa4a23ca 100644 --- a/include/ovn/lex.h +++ b/include/ovn/lex.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Nicira, Inc. + * Copyright (c) 2015, 2016, 2017 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -139,7 +139,7 @@ bool lexer_is_int(const struct lexer *); bool lexer_get_int(struct lexer *, int *value); bool lexer_force_int(struct lexer *, int *value); -void lexer_force_end(struct lexer *); +bool lexer_force_end(struct lexer *); void lexer_error(struct lexer *, const char *message, ...) OVS_PRINTF_FORMAT(2, 3); |