[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 05/22] tools/utils: update Bison parser directives
Update per Bison's obsolete warnings. Testing indicates these are simple and safe. Signed-off-by: Elliott Mitchell <ehem+xen@xxxxxxx> --- Someone check for acceptable Bison versions? I'm testing with Flex 2.6.4 and Bison 3.7.5. --- tools/libs/util/libxlu_cfg_y.y | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/libs/util/libxlu_cfg_y.y b/tools/libs/util/libxlu_cfg_y.y index 020fc63eb3..e53d8ed337 100644 --- a/tools/libs/util/libxlu_cfg_y.y +++ b/tools/libs/util/libxlu_cfg_y.y @@ -28,9 +28,9 @@ } %locations -%pure-parser +%define api.pure %defines -%error-verbose +%define parse.error verbose %name-prefix "xlu__cfg_yy" %parse-param { CfgParseContext *ctx } %lex-param { ctx_scanner } @@ -48,7 +48,7 @@ file: stmts | stmts assignment -stmts: /* empty */ +stmts: %empty | stmts stmt stmt: assignment endstmt @@ -67,13 +67,12 @@ value: atom { $$= xlu__cfg_string_mk(ctx,$1,&@1); } atom: STRING { $$= $1; } | NUMBER { $$= $1; } -valuelist: /* empty */ { $$= xlu__cfg_list_mk(ctx,NULL,&yylloc); } +valuelist: %empty { $$= xlu__cfg_list_mk(ctx,NULL,&yylloc); } | values { $$= $1; } | values ',' nlok { $$= $1; } values: value nlok { $$= xlu__cfg_list_mk(ctx,$1,&@1); } | values ',' nlok value nlok { xlu__cfg_list_append(ctx,$1,$4); $$= $1; } -nlok: - /* nothing */ +nlok: %empty | nlok NEWLINE -- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | ehem+sigmsg@xxxxxxx PGP 87145445 | ) / \_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |