Unexpected C Parsing Conflict

pocm@soton.ac.uk (Paulo Jorge de O. C. de Matos)
Fri, 25 Apr 2008 20:38:07 +0100

          From comp.compilers

Related articles
Unexpected C Parsing Conflict pocm@soton.ac.uk (2008-04-25)
Re: Unexpected C Parsing Conflict pocm@soton.ac.uk (2008-04-26)
| List of all articles for this month |
From: pocm@soton.ac.uk (Paulo Jorge de O. C. de Matos)
Newsgroups: comp.compilers
Date: Fri, 25 Apr 2008 20:38:07 +0100
Organization: Aioe.org NNTP Server
Keywords: C, parse, question
Posted-Date: 25 Apr 2008 23:55:26 EDT

Hello all,


I have found a conflict in parsing C99 which arises from the fact that
after a mult_expr a '*' (according to bison) can come up which means
that it can either reduce mult_expr or shift the '*' for yet another
multiplication.


Now, * comes up as a unary operator and in the pointer definition but
I can't find how or where they can follow a multiplication. Can
someone let me know either how to solve this shift/reduce conflict or
give me a concrete example where a * comes after a multiplication and
is not a multiplication operator?


Cheers,


--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.