[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs contributions, C and Lisp
From: |
Óscar Fuentes |
Subject: |
Re: Emacs contributions, C and Lisp |
Date: |
Tue, 25 Feb 2014 20:50:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> 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,
Why do we need a small part of parsing? For implementing C++ smart
completion on a reliable way, you need semantic analysis. Furthermore,
people here are talking too much about completion, but there are other
features that require whole-program semantic analysis and hence are out
of reach of the approaches mentioned here based on gcc spitting
not-quite-comprehensive information.
> perhaps it's worth trying first? If
> push comes to shove, what was implemented in GCC can be reimplemented
> in Emacs Lisp, no?
Right now the available systems for smart code completion are annoyingly
slow. They are implemented on C/C++. It is reasonable to expect from a
Elisp-based solution to be unbearably slow, not to mention the
complexity.
Why reinvent the wheel?
> 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?
Dunno about David, but I say "yes", for smart completion you need way
more than quick & dirty parsing.
- Re: Emacs contributions, C and Lisp, (continued)
- Re: Emacs contributions, C and Lisp, Stephen Leake, 2014/02/25
- Re: Emacs contributions, C and Lisp, Glenn Morris, 2014/02/24
- Re: Emacs contributions, C and Lisp, David Kastrup, 2014/02/25
- Re: Emacs contributions, C and Lisp, David Kastrup, 2014/02/25
- Re: Emacs contributions, C and Lisp, Stephen Leake, 2014/02/25
- Re: Emacs contributions, C and Lisp, David Kastrup, 2014/02/25
- Re: Emacs contributions, C and Lisp, Stephen Leake, 2014/02/25
- Re: Emacs contributions, C and Lisp, Eli Zaretskii, 2014/02/25
- Re: Emacs contributions, C and Lisp, David Kastrup, 2014/02/25
- Re: Emacs contributions, C and Lisp, Eli Zaretskii, 2014/02/25
- Re: Emacs contributions, C and Lisp,
Óscar Fuentes <=
- Re: Emacs contributions, C and Lisp, Eli Zaretskii, 2014/02/25
- Re: Emacs contributions, C and Lisp, Óscar Fuentes, 2014/02/25
- Re: Emacs contributions, C and Lisp, David Engster, 2014/02/26
- Re: Emacs contributions, C and Lisp, Josh, 2014/02/26
- Re: Emacs contributions, C and Lisp, David Engster, 2014/02/26
- Re: Emacs contributions, C and Lisp, Óscar Fuentes, 2014/02/26
- Re: Emacs contributions, C and Lisp, David Engster, 2014/02/26
- Re: Emacs contributions, C and Lisp, Óscar Fuentes, 2014/02/26
- Re: Emacs contributions, C and Lisp, David Kastrup, 2014/02/26
- Re: Emacs contributions, C and Lisp, Stefan Monnier, 2014/02/26