[Top][All Lists]

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

Re: Contributing LLVM.org patches to gud.el

From: Richard Stallman
Subject: Re: Contributing LLVM.org patches to gud.el
Date: Thu, 12 Feb 2015 12:34:31 -0500

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > It might not per se necessary that Emacs have access to the AST in
  > textual form. If GCC or part of GCC could be called as a library from
  > within Emacs to access the AST via an API, that might be sufficient.

I am sure that can be done.

As has been said, GCC does not generate the parse tree for the whole
program, or even a whole function.  I initially thought of doing it
that way, but it used a lot of memory, so I made it generate RTL from
each expression tree and then throw the tree away.  It doesn't make
trees for statements at all.  At least, that's how it worked for C.

So it would first be necessary to make the parser generate and keep
the full trees, instead of generating RTL.

I think the term "AST" means a tree that corresponds precisely to the
syntax.  The GCC tree structure does not correspond precisely to the
syntax; the parser makes some simplifications and expansions itself.
So the tree is not really an AST.  This shouldn't affect completion

Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
www.fsf.org  www.gnu.org
Skype: No way! See stallman.org/skype.html.

reply via email to

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