gomp-discuss
[Top][All Lists]
Advanced

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

Re: [Gomp-discuss] omp directive parser ....


From: Steven Bosscher
Subject: Re: [Gomp-discuss] omp directive parser ....
Date: 21 Feb 2003 16:58:26 +0100

Op vr 21-02-2003, om 12:55 schreef Lars Segerlund:
> 
>   There is a parser in the standard, perhaps we could port it to 
> lexx/yacc ? It might be of some use ?

No, there is a *grammar* in the standard.

And no, we cannot port it to lex/yacc, because:
a) GNU CC doesn't use lex
b) GNU CC doesn't do {_Pragma,#pragma} in yacc.
c) g++ doesn't do lex nor yacc.

We *can* implement the grammar in the new recursive decent parser in g++
as soon as we've figured out how to get some kind of PRAGMA token from
cpplib to the parser instead of to separate pragma handlers.

This is something that should be discussed in the gcc lists, but it may
turn into another little flame war because overall #pragmas just suck
bigtime from a language design point of view, and there are issues with
moving such stuff to the parser.

I've sort of given up on implementing a "#pragma omp" parser as a GCC
#pragma handler for C, because there is no way we can parse an
expression.  Things look much better for g++.

Greetz
Steven








reply via email to

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