gomp-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gomp-discuss] fortran parser :-) ..


From: Dmitry Kurochkin
Subject: Re: [Gomp-discuss] fortran parser :-) ..
Date: Tue, 22 Mar 2005 17:46:49 +0300

Hi Lars.
The C parser (at list my version) is heavily tight with libcpp and C
parser, so I don't think there really is a way to adapt it to Fortran.
And splitting to frontend and backend is a good idia. We can make a
general interface and structures and both parsers will use it.

BTW. I hope to commit my patch really soon.

Regards,
  Dmitry

On Tue, 22 Mar 2005 15:24:24 +0100, Lars Segerlund
<address@hidden> wrote:
> 
>  Replying to my self ...
> 
>   I have tested a small and stupid 'fix' for gfortrans backtracking, ( 
> basicly I remember
>  if we already have parsed a comment on this line :-) ... this is likely to 
> fail for
>  a lot of cases but for now it will do until the real fix ), this gives us 
> some kind
>  of starting point for inserting the fortran open mp parser there.
> 
>   Now what are we going to do :
> 
>         1. adapt out C parser ?
> 
>         2. write a new parser ?
> 
>         3. I have no idéa ...
> 
>   As I said earlier, perhaps we can add some kind of instrumentation to the 
> parser
>  we got, even split it into a front and backend ?
> 
>  / regards, Lars Segerlund.
> 
> On Tue, 22 Mar 2005 14:00:41 +0100
> Lars Segerlund <address@hidden> wrote:
> 
> >
> >  Hi all,
> >
> >   I have found the problem in the gcc 4.0 fortran parser :-) .... it does 
> > some really
> >  nasty backtracking in fixed form and f77 compatible form.
> >   Now that the problem is identified I have come up with a bugfix, ( ugly 
> > hack really ),
> >  which should make us able to parse the OMP directives :-), mainly we 
> > remember if we
> >  have been on this line before.
> >
> >   I am going to make a small proof of concept, and post the code to the 
> > list, but in the
> >  long run the fortran parser will have to be fixed and I will try to work i 
> > on this.
> >
> >   Now an ugly hack might sound very bad, but it's ok for us, if we 'hijack' 
> > the
> >  scanner/parser until were done, this way the only thing that goes away 
> > with a
> >  working scanner/parser is our ugly hack, the code doing gomp stuff stays 
> > the same.
> >
> >   I hope this sounds reasonable to everyone.
> >
> >  Did anybody have a good look at the c/c++ parser and figure out if we have 
> > to make
> >  a new one or if we can use it for fortran also ?
> >  If the statements are exactly the same we might use different backends, ( 
> > ie. something
> >  table driven ?? ).
> >
> >   This is exiting, I really feel like omitting something nasty for the 
> > gimplifier :-) .
> >
> >  / regards, Lars Segerlund.
> >
> >
> > _______________________________________________
> > Gomp-discuss mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/gomp-discuss
> 
> _______________________________________________
> Gomp-discuss mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/gomp-discuss
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]