-fdump-parse-tree
Christopher D. Rickett
crickett@lanl.gov
Mon Sep 12 19:57:00 GMT 2005
On Mon, 12 Sep 2005, Tobias Schlüter wrote:
> Christopher D. Rickett wrote:
> >>Isn't the change in indentation levels sufficient for this? Output of the
> >>code always starts at indentation level 0, whereas the symbol table output
> >>starts at indentation level 1. (For the definition of this see in
> >>code_indent(), and also the use of show_level in gfc_show_namespace. Also
> >>note that gfc_show_code() is always called with level = 0 from there.)
> >
> >
> > The indentation level change is sufficient, and is what we currently use.
> > The use of braces would simplify the job though and could prevent us from
> > relying on whitespace in the grammar.
>
> There is no grammar :-) A possibly safer alternative would be a keyword-based
> approach: there's only a small number of possible words a code line begins
> with (they're enumerated in gfc_show_code_node), and likewise there's only a
> small number of words that a line with namespace information begins with
> ("Array spec", "symtree", "symbol", "Namespace", and maybe the odd one I'm
> missing in the random file I tried this with).
I apologize; I should have been clearer. I was referring to the grammar
we have for parsing the output from dump-parse-tree.
> - Tobi
>
Chris
More information about the Fortran
mailing list