From: Theodore A. Roth Date: Wed, 6 Nov 2002 22:55:32 +0000 (+0000) Subject: * c-exp.y: Add missing semi-colons. X-Git-Tag: gdb_5_3-2002-12-12-release~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a20f2a1e52f331778ff8af58a7c2cfa469e6839;p=thirdparty%2Fbinutils-gdb.git * c-exp.y: Add missing semi-colons. * f-exp.y: Add missing semi-colons. * m2-exp.y: Add missing semi-colons. * p-exp.y: Add missing semi-colons. Add empty action to start rule to avoid a type clash error when building with bison >= 1.50. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4078ec5303e..82569ec81a1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2002-11-06 Theodore A. Roth + + * c-exp.y: Add missing semi-colons. + * f-exp.y: Add missing semi-colons. + * m2-exp.y: Add missing semi-colons. + * p-exp.y: Add missing semi-colons. + Add empty action to start rule to avoid a type clash error when + building with bison >= 1.50. + 2002-10-31 Joel Brobecker * hppa-tdep.c (low_text_segment_addres): Fix a compilation warning. diff --git a/gdb/c-exp.y b/gdb/c-exp.y index c6fc52c63a5..882de6601bd 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -247,9 +247,11 @@ exp1 : exp /* Expressions, not including the comma operator. */ exp : '*' exp %prec UNARY { write_exp_elt_opcode (UNOP_IND); } + ; exp : '&' exp %prec UNARY { write_exp_elt_opcode (UNOP_ADDR); } + ; exp : '-' exp %prec UNARY { write_exp_elt_opcode (UNOP_NEG); } diff --git a/gdb/f-exp.y b/gdb/f-exp.y index b9004264eec..56fd70af954 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -241,9 +241,11 @@ exp : '(' exp ')' /* Expressions, not including the comma operator. */ exp : '*' exp %prec UNARY { write_exp_elt_opcode (UNOP_IND); } + ; exp : '&' exp %prec UNARY { write_exp_elt_opcode (UNOP_ADDR); } + ; exp : '-' exp %prec UNARY { write_exp_elt_opcode (UNOP_NEG); } @@ -283,6 +285,7 @@ arglist : exp arglist : substring { arglist_len = 2;} + ; arglist : arglist ',' exp %prec ABOVE_COMMA { arglist_len++; } diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index e291d62b1cb..3fb46851c84 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -216,6 +216,7 @@ type_exp: type exp : exp '^' %prec UNARY { write_exp_elt_opcode (UNOP_IND); } + ; exp : '-' { number_sign = -1; } @@ -330,6 +331,7 @@ exp : INCL '(' exp ',' exp ')' exp : EXCL '(' exp ',' exp ')' { error("Sets are not implemented.");} + ; set : '{' arglist '}' { error("Sets are not implemented.");} diff --git a/gdb/p-exp.y b/gdb/p-exp.y index f0939e7bbbf..74e16afd4c8 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -233,7 +233,8 @@ static int search_field; start : { current_type = NULL; search_field = 0; } - normal_start; + normal_start {} + ; normal_start : exp1 @@ -257,11 +258,13 @@ exp : exp '^' %prec UNARY { write_exp_elt_opcode (UNOP_IND); if (current_type) current_type = TYPE_TARGET_TYPE (current_type); } + ; exp : '@' exp %prec UNARY { write_exp_elt_opcode (UNOP_ADDR); if (current_type) current_type = TYPE_POINTER_TYPE (current_type); } + ; exp : '-' exp %prec UNARY { write_exp_elt_opcode (UNOP_NEG); } @@ -317,6 +320,7 @@ exp : exp '[' write_exp_elt_opcode (BINOP_SUBSCRIPT); if (current_type) current_type = TYPE_TARGET_TYPE (current_type); } + ; exp : exp '(' /* This is to save the value of arglist_len