|
From: | Scott Robert Ladd |
Subject: | Re: [Gomp-discuss] Re: Lexing and parsing OMP directives, again |
Date: | Wed, 09 Jul 2003 09:52:44 -0400 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030618 Debian/1.3.1-3 |
Zack Weinberg wrote:
You've correctly understood my suggestion. I had in mind that cpplib would, upon encountering a #pragma, first check whether it was a #pragma that affects preprocessor behavior. If not, it would inject the token __builtin_pragma into its output stream, then pass all the tokens following the #pragma on unchanged, and finally inject a ; token at the end of the directive line.
> > The C parser would then interpret __builtin_pragma as a _keyword_, and > expect a stream of tokens following - with whatever syntax and > semantics are necessary - until it reached the trailing semicolon, at > which point it would go back to the normal grammar.As I understand it, what you're suggesting is that cpplib would translate OpenMP pragmas into internally-defined language extensions handled by later stages of the compile.
C99's _Pragma() would get the same treatment, except that its argument would be unstringified first.
So it sounds like any work required to implement OpenMP will also be applicable implementing C99. Nice and synergistic.
-- Scott Robert Ladd Coyote Gulch Productions (http://www.coyotegulch.com)
[Prev in Thread] | Current Thread | [Next in Thread] |