I haven't seen any objections, so here is a patch. It removes "#define

YYERROR_VERBOSE" from contrib/cube and contrib/seg, and adjusts the expected
output accordingly. Hopefully this will consistently pass across multiple
bison versions.

Joe Conway
This commit is contained in:
Tom Lane 2002-09-22 20:08:51 +00:00
parent 0b620e33db
commit fce573ae16
4 changed files with 21 additions and 23 deletions

View File

@ -2,7 +2,6 @@
/* NdBox = [(lowerleft),(upperright)] */
/* [(xLL(1)...xLL(N)),(xUR(1)...xUR(n))] */
#define YYERROR_VERBOSE
#define YYPARSE_PARAM result /* need this to pass a pointer (void *) to yyparse */
#define YYSTYPE char *
#define YYDEBUG 1

View File

@ -258,46 +258,46 @@ SELECT '[(0,0,0,0),(1,0,0,0)]'::cube AS cube;
SELECT ''::cube AS cube;
ERROR: cube_in: can't parse an empty string
SELECT 'ABC'::cube AS cube;
ERROR: parse error, expecting `FLOAT' or `O_PAREN' or `O_BRACKET' at or before position 1, character ('A', \101), input: 'ABC'
ERROR: parse error at or before position 1, character ('A', \101), input: 'ABC'
SELECT '()'::cube AS cube;
ERROR: parse error, expecting `FLOAT' at or before position 2, character (')', \051), input: '()'
ERROR: parse error at or before position 2, character (')', \051), input: '()'
SELECT '[]'::cube AS cube;
ERROR: parse error, expecting `O_PAREN' at or before position 2, character (']', \135), input: '[]'
ERROR: parse error at or before position 2, character (']', \135), input: '[]'
SELECT '[()]'::cube AS cube;
ERROR: parse error, expecting `FLOAT' at or before position 3, character (')', \051), input: '[()]'
ERROR: parse error at or before position 3, character (')', \051), input: '[()]'
SELECT '[(1)]'::cube AS cube;
ERROR: parse error, expecting `COMMA' at or before position 5, character (']', \135), input: '[(1)]'
ERROR: parse error at or before position 5, character (']', \135), input: '[(1)]'
SELECT '[(1),]'::cube AS cube;
ERROR: parse error, expecting `O_PAREN' at or before position 6, character (']', \135), input: '[(1),]'
ERROR: parse error at or before position 6, character (']', \135), input: '[(1),]'
SELECT '[(1),2]'::cube AS cube;
ERROR: parse error, expecting `O_PAREN' at or before position 7, character (']', \135), input: '[(1),2]'
ERROR: parse error at or before position 7, character (']', \135), input: '[(1),2]'
SELECT '[(1),(2),(3)]'::cube AS cube;
ERROR: parse error, expecting `C_BRACKET' at or before position 9, character (',', \054), input: '[(1),(2),(3)]'
ERROR: parse error at or before position 9, character (',', \054), input: '[(1),(2),(3)]'
SELECT '1,'::cube AS cube;
ERROR: parse error, expecting `FLOAT' at or before position 2, character (',', \054), input: '1,'
ERROR: parse error at or before position 2, character (',', \054), input: '1,'
SELECT '1,2,'::cube AS cube;
ERROR: parse error, expecting `FLOAT' at or before position 4, character (',', \054), input: '1,2,'
ERROR: parse error at or before position 4, character (',', \054), input: '1,2,'
SELECT '1,,2'::cube AS cube;
ERROR: parse error, expecting `FLOAT' at or before position 3, character (',', \054), input: '1,,2'
ERROR: parse error at or before position 3, character (',', \054), input: '1,,2'
SELECT '(1,)'::cube AS cube;
ERROR: parse error, expecting `FLOAT' at or before position 4, character (')', \051), input: '(1,)'
ERROR: parse error at or before position 4, character (')', \051), input: '(1,)'
SELECT '(1,2,)'::cube AS cube;
ERROR: parse error, expecting `FLOAT' at or before position 6, character (')', \051), input: '(1,2,)'
ERROR: parse error at or before position 6, character (')', \051), input: '(1,2,)'
SELECT '(1,,2)'::cube AS cube;
ERROR: parse error, expecting `FLOAT' at or before position 4, character (',', \054), input: '(1,,2)'
ERROR: parse error at or before position 4, character (',', \054), input: '(1,,2)'
-- invalid input: semantic errors and trailing garbage
SELECT '[(1),(2)],'::cube AS cube; -- 0

View File

@ -395,25 +395,25 @@ SELECT '100(+-)1'::seg AS seg;
SELECT ''::seg AS seg;
ERROR: seg_in: can't parse an empty string
SELECT 'ABC'::seg AS seg;
ERROR: parse error, expecting `FLOAT' or `RANGE' or `EXTENSION' at or near position 1, character ('A', \101), input: 'ABC'
ERROR: parse error at or near position 1, character ('A', \101), input: 'ABC'
SELECT '1ABC'::seg AS seg;
ERROR: expecting end of input at or near position 2, character ('A', \101), input: '1ABC'
ERROR: parse error at or near position 2, character ('A', \101), input: '1ABC'
SELECT '1.'::seg AS seg;
ERROR: expecting end of input at or near position 2, character ('.', \056), input: '1.'
ERROR: parse error at or near position 2, character ('.', \056), input: '1.'
SELECT '1.....'::seg AS seg;
ERROR: expecting end of input at or near position 6, character ('.', \056), input: '1.....'
ERROR: parse error at or near position 6, character ('.', \056), input: '1.....'
SELECT '.1'::seg AS seg;
ERROR: parse error, expecting `FLOAT' or `RANGE' or `EXTENSION' at or near position 2, character ('1', \061), input: '.1'
ERROR: parse error at or near position 2, character ('1', \061), input: '.1'
SELECT '1..2.'::seg AS seg;
ERROR: expecting end of input at or near position 5, character ('.', \056), input: '1..2.'
ERROR: parse error at or near position 5, character ('.', \056), input: '1..2.'
SELECT '1 e7'::seg AS seg;
ERROR: expecting end of input at or near position 3, character ('e', \145), input: '1 e7'
ERROR: parse error at or near position 3, character ('e', \145), input: '1 e7'
SELECT '1e700'::seg AS seg;
ERROR: numeric value 1e700 unrepresentable

View File

@ -1,5 +1,4 @@
%{
#define YYERROR_VERBOSE
#define YYPARSE_PARAM result /* need this to pass a pointer (void *) to yyparse */
#include "postgres.h"