Re: Parsing Questions

"Stefan Ewing" <sewing@uvic.ca>
17 Jun 2002 00:10:38 -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: "Stefan Ewing" <sewing@uvic.ca>
Newsgroups: comp.compilers
Date: 17 Jun 2002 00:10:38 -0400
Organization: http://groups.google.com/
References: 02-06-034 02-06-035
Keywords: parse
Posted-Date: 17 Jun 2002 00:10:38 EDT

"Michael J. Fromberger" <sting@linguist.dartmouth.edu> wrote
> "Stefan Ewing" <sewing@uvic.ca> writes:
>
> >Also, how should one represent the Java field access operator (.) in
> >a parse tree? 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.
>
> Where were you looking?


Well, after being unable to find the information I needed at Sun's own
site, I used Google to find tables giving the precedence of operators
in Java, located at various other sites. One such table (the URL is
http://www.csc.calpoly.edu/~csc101/studynotes/JavaOperators.htm )
classified the operators as unary, binary, or ternary, with the dot
operator being placed under in the "unary" column. Of course, the
table is for a freshman Computer Science course--as opposed to one in
context-free grammars or compiler writing--and I do not know what the
source of the author's information was (the author being an instructor
at Cal Poly), so I can't necessarily rely upon the information.


I have since found a table at the Sun Java site (
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/opsummary.html
) which implicitly denotes the field access operator as binary (which
makes more sense to me).


Stefan Ewing


Post a followup to this message

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