diff options
| author | Akim Demaille <akim.demaille@gmail.com> | 2020-01-30 18:09:25 +0100 |
|---|---|---|
| committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-01-31 09:52:40 +0100 |
| commit | 37d0f7d3b3e9d87c4cc2ad1ca5bc26d77f49df38 (patch) | |
| tree | e8fee00a06e8a132ed4cc2f2e8bd196a4d8545bb /sapi/phpdbg/phpdbg_parser.y | |
| parent | b915d68852625b5d67443013f8282764b9cf89f3 (diff) | |
| download | php-git-37d0f7d3b3e9d87c4cc2ad1ca5bc26d77f49df38.tar.gz | |
Use "%empty" in the parsers, instead of comments
The annotation %empty is properly enforced: warnings when it's
missing, and errors when it's inappropriate. Support for %empty was
introduced in Bison 3.0.
Pass -Wempty-rule to Bison.
Closes GH-5134
Diffstat (limited to 'sapi/phpdbg/phpdbg_parser.y')
| -rw-r--r-- | sapi/phpdbg/phpdbg_parser.y | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y index 3031ce5a80..1384abe6fb 100644 --- a/sapi/phpdbg/phpdbg_parser.y +++ b/sapi/phpdbg/phpdbg_parser.y @@ -1,3 +1,4 @@ +%require "3.0" %{ /* @@ -65,7 +66,7 @@ typedef void* yyscan_t; input : command { $$ = $1; } | input T_SEPARATOR command { phpdbg_stack_separate($1.top); $$ = $3; } - | /* empty */ + | %empty ; command @@ -143,7 +144,7 @@ parameter req_id : T_REQ_ID { PHPDBG_G(req_id) = $1.num; } - | /* empty */ + | %empty ; full_expression |
