[Top][All Lists]

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

Re: Emacs contributions, C and Lisp

From: Eli Zaretskii
Subject: Re: Emacs contributions, C and Lisp
Date: Tue, 25 Feb 2014 19:28:00 +0200

> From: David Kastrup <address@hidden>
> Date: Tue, 25 Feb 2014 17:37:14 +0100
> > Is it certain that we actually need a compiler for that?  Did someone
> > investigate whether CEDET infrastructure is capable of doing something
> > like that?  Since, as you point out, a compiler will probably choke on
> > syntactically incorrect input, shouldn't we try to look elsewhere?
> > After all, we don't need to parse the source completely, only as much
> > as needed for completion.
> Nobody can parse C++ reliably.  GCC has given up on trying to teach
> Bison (aka LALR(1) and then some) how to parse C++ and has implemented
> its own hand-written parser.

I understand the potential difficulties, but since we only need a
relatively small part of parsing, perhaps it's worth trying first?  If
push comes to shove, what was implemented in GCC can be reimplemented
in Emacs Lisp, no?  Though I have hard time believing that we will
need to go that far.

> If you want to be able to reliably follow references to their
> _corresponding_ definition, it's almost inavoidable to ask some compiler
> for its opinion just what fully qualified function/operator is to be
> considered to correspond to the source.

I don't understand why, sorry.  Are we still talking about smart
completion, i.e. displaying candidate expansions of text at or near
point?  Or are we talking about something else?

reply via email to

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