Re: Parsing Questions

"Ian Wild" <ian@cfmu.eurocontrol.be>
14 Jun 2002 15:12:21 -0400

          From comp.compilers

Related articles
Parsing questions e8rasmus@etek.chalmers.se (Rasmus Anthin) (2000-01-06)
Parsing Questions sewing@uvic.ca (Stefan Ewing) (2002-06-13)
Re: Parsing Questions sting@linguist.dartmouth.edu (Michael J. Fromberger) (2002-06-14)
Re: Parsing Questions ian@cfmu.eurocontrol.be (Ian Wild) (2002-06-14)
Re: Parsing Questions joachim_d@gmx.de (Joachim Durchholz) (2002-06-14)
Re: Parsing Questions rcbilson@plg2.math.uwaterloo.ca (Richard C Bilson) (2002-06-14)
Re: Parsing Questions vbdis@aol.com (VBDis) (2002-06-14)
Re: Parsing Questions sewing@uvic.ca (Stefan Ewing) (2002-06-17)
Re: Parsing Questions sewing@uvic.ca (Stefan Ewing) (2002-06-17)
| List of all articles for this month |

From: "Ian Wild" <ian@cfmu.eurocontrol.be>
Newsgroups: comp.compilers
Date: 14 Jun 2002 15:12:21 -0400
Organization: Hierarchical
References: 02-06-034
Keywords: parse
Posted-Date: 14 Jun 2002 15:12:21 EDT

Stefan Ewing wrote:
>
> How can the postfix increment/decrement operators in C, C++, and Java
> be represented in a parse tree? For example, if we have the
> epxression
>
> a = b++ + c;


(SET a (SUM (POSTINC b) c))




> Also, how should one represent the Java field access operator (.) in a
> parse tree?


I'd go with something like (FIELD primary "fieldname").


> At first glance, it seems like a binary operator to me
> (given the object name and the field name, a memory address is
> returned), but one operator precedence chart I saw online shows . as a
> unary operator.


The unary operator in question is actually ".fieldname".


Post a followup to this message

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