X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/f122444873a1ec499d25ffec5765dcc48dc7b928..3209eb1c4c5de8dd812e65da27df00c548f476fe:/tests/glr-regression.at diff --git a/tests/glr-regression.at b/tests/glr-regression.at index 711ab7ec..71f6e6d5 100644 --- a/tests/glr-regression.at +++ b/tests/glr-regression.at @@ -1,6 +1,6 @@ # Checking GLR Parsing: Regression Tests -*- Autotest -*- -# Copyright (C) 2002-2003, 2005-2007, 2009-2013 Free Software +# Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software # Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -67,7 +67,7 @@ static YYSTYPE exprMerge (YYSTYPE x0, YYSTYPE x1) return 0; } -const char *input = YY_NULL; +const char *input = YY_NULLPTR; int main (int argc, const char* argv[]) @@ -304,7 +304,7 @@ MergeRule (int x0, int x1) } ]AT_YYERROR_DEFINE[ -FILE *input = YY_NULL; +FILE *input = YY_NULLPTR; int P[] = { P1, P2 }; int O[] = { O1, O2 }; @@ -1749,3 +1749,33 @@ Cleanup: popping token 'a' () ]) AT_CLEANUP + + +## ----------------------------------------------------------------- ## +## Predicates. ## +## ## +## http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00004.html ## +## ----------------------------------------------------------------- ## + +AT_SETUP([Predicates]) + +# FIXME: We need genuine test cases with uses of %?. + +AT_DATA_GRAMMAR([input.y], +[[%glr-parser +%expect-rr 1 +%% +// Exercise "%?{...}" and "%? {...}". +widget: + %? {new_syntax} "widget" id new_args { $$ = f($3, $4); } +| %?{!new_syntax} "widget" id old_args { $$ = f($3, $4); } +; +id:; +new_args:; +old_args:; +%% +]]) + +AT_BISON_CHECK([[input.y]]) + +AT_CLEANUP