<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Hi <span>Haojian,</span></div>
<div class="moz-cite-prefix"><span><br>
</span></div>
<div class="moz-cite-prefix"><span> I remember the netbeans C++
autocompletion had such 'inaccurate' but fast parser. I was
wondering if you looked at this and if there is other prior art
in the area.<br>
</span></div>
<div class="moz-cite-prefix"><span><br>
</span></div>
<div class="moz-cite-prefix"><span> Long time ago I believe I
talked with Vladimir about that. Adding him in cc.</span></div>
<div class="moz-cite-prefix"><span><br>
</span></div>
<div class="moz-cite-prefix"><span>Best, Vassil<br>
</span></div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 11/5/21 3:37 PM, Haojian Wu via
cfe-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGQTG1YnFp7zMxHHr=5AeV7KzzmTnr6AJ34+4EE-70WduNoaCw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hello everyone,
<div><br>
</div>
<div><span
id="gmail-docs-internal-guid-dbfa41e6-7fff-8f94-dd81-5d40a71a0ea5">We’d
like to propose a pseudo-parser which can approximately
parse C++ (including broken code). It parses a file in
isolation, without needing headers, compile flags etc.
Ambiguities are resolved heuristically, like clang-format.
Its output is a clang::syntax tree, which maps the token
sequence onto the C++ grammar.<br>
Our motivation comes from wanting to add some low latency
features (file outline, refactorings etc) in clangd, but we
think this is a useful building block for other tools too.</span></div>
<div><br>
</div>
<div>Design is discussed in detail here: <a
href="https://docs.google.com/document/d/1eGkTOsFja63wsv8v0vd5JdoTonj-NlN3ujGF0T7xDbM/edit?usp=sharing"
style="text-decoration-line:none" moz-do-not-send="true"><span style="font-size:11pt;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">https://docs.google.com/document/d/1eGkTOsFja63wsv8v0vd5JdoTonj-NlN3ujGF0T7xDbM/edit?usp=sharing</span></a><br>
<br>
<p dir="ltr"
style="line-height:1.38;margin-top:0pt;margin-bottom:0pt">The
proposal is based on the experience with a working
prototype. Initially, we will focus on building the
foundation. We consider the first version as experimental,
and plan to use and validate it with applications in clangd
(the detailed plan is described <a
href="https://docs.google.com/document/d/1eGkTOsFja63wsv8v0vd5JdoTonj-NlN3ujGF0T7xDbM/edit#heading=h.mawgmexy688j"
moz-do-not-send="true">here</a>).</p>
<br>
As soon as we have consensus on the proposal, we plan to start
this work in the clang repository (code would be under
clang/Tooling/Syntax). We hope we can start sending out
patches for review at the end of November.<br>
<br>
Eager to hear your thoughts. Comments and suggestions are much
appreciated.</div>
<div><br>
</div>
<div><span>Thanks,</span></div>
<div><span>Haojian</span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>