[cfe-dev] Decoupling semantics from parsing
Reid Kleckner via cfe-dev
cfe-dev at lists.llvm.org
Mon Apr 1 11:56:08 PDT 2019
Earlier in Clang's life, the parser did not depend on semantic analysis
(lib/Parse did not depend on lib/Sema). However, my understanding is that
as C++ support was added, it became clear that this was awkward, so in
r112244, John removed the virtual 'Action' interface that Sema implemented
and made Parse depend directly on Sema. I wasn't around at the time, so I
don't know the exact motivations, but from what I can tell, clang has
intentionally moved away from the kind of model you are proposing.
On Mon, Apr 1, 2019 at 10:50 AM McCorney Severin via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Hello,
>
> 1. What I meant was very clear: currently, type checking is embedded into
> the parsing logic and AST node creation and it would be really clean if
> they were decoupled.
> 2. Yep, I have been spending time with the codebase for the past couple of
> years ... just never contributed.
>
> -McCorney
>
> On Mon, Apr 1, 2019 at 10:03 AM Bruno Ricci <riccibrun at gmail.com> wrote:
>
>>
>>
>> On 01/04/2019 17:32, McCorney Severin via cfe-dev wrote:
>> > Hello,
>> >
>> > I am currently a math/physics student at UCSD and am looking for a way
>> to get involved in clang. Is there a desire or interest to decouple
>> semantic analysis form syntax parsing? Please let me know.
>> >
>> > Thank,
>> > -McCorney
>>
>> What do you mean by that ? In general you need to do some semantic
>> analysis to parse C++
>> (eg: what is x * y; ?). How you could get involved depends on what you
>> would be
>> interested to work on. One of the first step is probably to gain
>> familiarity with
>> the codebase. Familiarity with the standard(s) is also going to be
>> required depending
>> on what you want to work on.
>>
>> Bruno
>>
>> >
>> > _______________________________________________
>> > cfe-dev mailing list
>> > cfe-dev at lists.llvm.org
>> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>> >
>>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190401/5919d6d3/attachment.html>
More information about the cfe-dev
mailing list