From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25767 invoked by alias); 24 Aug 2009 22:27:31 -0000 Received: (qmail 25758 invoked by uid 22791); 24 Aug 2009 22:27:30 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Aug 2009 22:27:20 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7OMRI20003644 for ; Mon, 24 Aug 2009 18:27:18 -0400 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7OMRF4S022800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 24 Aug 2009 18:27:17 -0400 Message-ID: <4A9313C2.3050907@redhat.com> Date: Mon, 24 Aug 2009 23:06:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [RFA] Token cleanup in c-exp.y Content-Type: multipart/mixed; boundary="------------020002040805060506070401" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-08/txt/msg00400.txt.bz2 This is a multi-part message in MIME format. --------------020002040805060506070401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 312 Hi, The attached patch "fixes" two tokens in c-exp.y, "->*" and ".*", which were not previously recognized as tokens. Keith ChangeLog 2009-08-24 Keith Seitz * c-exp.y (tokentab3): Add new token, ARROW_STAR. Changed all users. (tokentab2): Add new token, DOT_STAR. Changed all users. --------------020002040805060506070401 Content-Type: text/plain; name="token-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="token-fix.patch" Content-length: 1535 Index: c-exp.y =================================================================== RCS file: /cvs/src/src/gdb/c-exp.y,v retrieving revision 1.59 diff -u -p -r1.59 c-exp.y --- c-exp.y 7 Jul 2009 21:33:48 -0000 1.59 +++ c-exp.y 24 Aug 2009 20:41:09 -0000 @@ -232,7 +232,7 @@ static int parse_number (char *, int, in %left '+' '-' %left '*' '/' '%' %right UNARY INCREMENT DECREMENT -%right ARROW '.' '[' '(' +%right ARROW ARROW_STAR '.' DOT_STAR '[' '(' %token BLOCKNAME %token FILENAME %type block @@ -333,7 +333,7 @@ exp : exp ARROW qualified_name write_exp_elt_opcode (STRUCTOP_MPTR); } ; -exp : exp ARROW '*' exp +exp : exp ARROW_STAR exp { write_exp_elt_opcode (STRUCTOP_MPTR); } ; @@ -368,7 +368,7 @@ exp : exp '.' qualified_name write_exp_elt_opcode (STRUCTOP_MEMBER); } ; -exp : exp '.' '*' exp +exp : exp DOT_STAR exp { write_exp_elt_opcode (STRUCTOP_MEMBER); } ; @@ -1664,7 +1664,8 @@ struct token static const struct token tokentab3[] = { {">>=", ASSIGN_MODIFY, BINOP_RSH, 0}, - {"<<=", ASSIGN_MODIFY, BINOP_LSH, 0} + {"<<=", ASSIGN_MODIFY, BINOP_LSH, 0}, + {"->*", ARROW_STAR, BINOP_END, 1} }; static const struct token tokentab2[] = @@ -1688,7 +1689,8 @@ static const struct token tokentab2[] = {"==", EQUAL, BINOP_END, 0}, {"!=", NOTEQUAL, BINOP_END, 0}, {"<=", LEQ, BINOP_END, 0}, - {">=", GEQ, BINOP_END, 0} + {">=", GEQ, BINOP_END, 0}, + {".*", DOT_STAR, BINOP_END, 0} }; /* Identifier-like tokens. */ --------------020002040805060506070401--