[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: progmodes/project.el and search paths
From: |
Dmitry Gutov |
Subject: |
Re: progmodes/project.el and search paths |
Date: |
Sat, 15 Aug 2015 01:30:41 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 |
On 08/14/2015 02:52 PM, Eric Ludlam wrote:
2) Parsers don't check types, etc as they go, and are flexible about the
symbols they accept.
This means you can get irrational tags. This is for a combination of
handling incomplete code, speed (less to do) and because most folks just
go an run their compiler at some point anyway.
Doesn't that mean that code completion at the end of a chain of calls
can be inaccurate (with e.g. lots of false positives), even if code is
otherwise valid?
3) Iterative parsing, so each invocation of the parser only executes
across a single tag.
This means that if parsing fails, we just move forward one lexical token
and try again. This lets the parser just wash over anything it doesn't
get.
AFAIK, parsers in general try to ignore errors, or else you wouldn't be
able to get any useful information, after compilation fails, about any
errors after the first one.
4) Incremental parser
Emacs watches you edit, tracks your changes, and matches it up against
previously parsed tags. If things are 'broken' in the code you edit,
but you didn't touch the boundaries of the other nearby tags, it lets it
be until next time. This means all the previously captured data is
available for use, including the active broken tag you might be editing.
That sounds useful.
It also has the typical bison error handling, but that tends not to be
necessary.
In summary; Semantic can extract useful data out of pretty badly trashed
code, and track your changes while you edit in a robust way.
It seems I stand corrected, thanks. However, it would be interesting to
do a comparison on some real file, against a widely used compiler, such
as Clang.
- Re: progmodes/project.el and search paths, (continued)
- Re: progmodes/project.el and search paths, David Engster, 2015/08/09
- Re: progmodes/project.el and search paths, Stephen Leake, 2015/08/09
- Re: progmodes/project.el and search paths, David Engster, 2015/08/10
- Re: progmodes/project.el and search paths, Stephen Leake, 2015/08/10
- Re: progmodes/project.el and search paths, David Engster, 2015/08/12
- Re: progmodes/project.el and search paths, Stephen Leake, 2015/08/12
- Re: progmodes/project.el and search paths, David Engster, 2015/08/12
- Re: progmodes/project.el and search paths, Nix, 2015/08/13
- Re: progmodes/project.el and search paths, Dmitry Gutov, 2015/08/13
- Re: progmodes/project.el and search paths, Eric Ludlam, 2015/08/14
- Re: progmodes/project.el and search paths,
Dmitry Gutov <=
- Re: progmodes/project.el and search paths, Eric Ludlam, 2015/08/14
- Re: progmodes/project.el and search paths, Eli Zaretskii, 2015/08/15
- Re: progmodes/project.el and search paths, Nix, 2015/08/10
- Re: progmodes/project.el and search paths, Dmitry Gutov, 2015/08/03
- Re: progmodes/project.el and search paths, Eric Ludlam, 2015/08/04
- Re: progmodes/project.el and search paths, Dmitry Gutov, 2015/08/04
Re: progmodes/project.el and search paths, David Engster, 2015/08/03