[cfe-commits] [PATCHES] refactoring and cleanup
Chris Lattner
clattner at apple.com
Sat Apr 9 12:28:20 PDT 2011
On Apr 9, 2011, at 7:08 AM, nobled wrote:
>>> ====
>>> 5. generalize number parsing for directives other than #line
>>>
>>> This makes way for sharing code with GLSL's #version directive.
>>
>> I don't think that this is a cleanup. It adds generality for something that Clang doesn't need. The GLSL grammar is only vaguely related to C, why does cramming a GLSL parser into Clang make sense?
>
> You're probably right - never mind the last patch. At this point I'm
> mostly just experimenting to see if it's even feasible, which from
> what you say it won't be; but it's also helping to familiarize myself
> with the codebase better.
Ok, makes sense. I think it is *possible* but probably not desirable. The end result would be far far more complex than a straight GLSL frontend, and the GLSL complexity doesn't add any value to C/C++/ObjC. The type systems and operators are just too different to get much sharing.
That said, it certainly could be a fun project! :)
-Chris
More information about the cfe-commits
mailing list