This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH, Fortran] Internal documentation for gfc_expr
- From: Tobias Burnus <burnus at net-b dot de>
- To: Daniel Kraft <d at domob dot eu>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 07 Jul 2008 17:02:19 +0200
- Subject: Re: [PATCH, Fortran] Internal documentation for gfc_expr
- References: <486786D8.40807@domob.eu>
Daniel Kraft wrote:
attached is a patch and changelog that creates a new section
"gfc_expr" in the "Front-end data structures" chapter of
gfc-internals.texi describing how expressions are structured.
+@c XXX: Other index keys?
I think that is currently not needed.
+Expressions and ``values'', including constants, variable-, array- and
+component-references as well as complex expressions built of operators and
+function calls [...]
Instead of "built of" I would use "consisting of" or something similar.
+the type, rank and eventually shape of the whole expression or expression tree
"eventually" sounds strange (Oxford Dict. of Engl.: "occurring or
existing at the end of or as a result of a process or period of time").
How about ", if applicable, "?
+@c XXX: Make subsections nodes of their own and create a menu?
One could do so, however, the subsections are currently quite short and
thus I think it is currently not needed.
+@code{expr_type} set to @code{EXPR_CONSTANT}. The constant's value should
s/should/shall/
+some operator on one or two operands. These have an @code{expr_type} of
s/These/The expressions/ ("These" can otherwise be confused with "operands".)
+should be evaluated on these operands, where @code{uop} describes a user-defined
+overloaded operator.
I would remove "overloaded". For operator(+) one overloads it, but for operator(.myop.) not.
+function symbol if the call is to an intrinsic or user-defined function,
I wonder whether "external" is better than "user-defined" or not.
+@c XXX
+@c What good is EXPR_SUBSTRING? When is it used?
Well, as the name already tells: When matching a substring, e.g. "abcde"(1:2) the expressions is a EXPR_SUBSTRING. The expression contains then a gfc_ref of the type REF_SUBSTRING. [Cf. primary.c (match_varspec and match_string_constant).]
Except for the minor nits, the patch looks OK.
By the way, thanks for your fantastic coding and documenting work! Too bad that we currently have a reviewing deficit. I will try to have another look at your huge patch, though I still hope that Paul has soon time to review it. He knows that part of gfortran best.
Tobias