Re[2]: [cedet-semantic] Wisent grammar compilation sometimes unsuccessful.
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2004-02-20 13:48:26
|
>>> David PONCE <dav...@wa...> seems to think that: >Eric, > >[...] >>>I must confess that this problem often occurs after I entered the >>>debugger. So probably it is due to a bad interaction between `debug' >>>and the various hooks and timers semantic uses. >>> >>>Perhaps it is the problem Joseph has had too, as it seems he has often >>>used the Lisp debugger recently ;-) >> >> [ ... ] >> >> Do you think a trick like this might be a quick fix?! > >Yes it could be useful. However I am not sure the debugger is really >the problem. It became more obviously useful when I set edebug breakpoints in semantic functions and the debugger didn't recurse when the idle handler went off. Huzzah! >I investigated a little more on this issue and found that in some >cases, after the parse tree state has been set to "unparseable" it is >not correctly reset to "needs-update" after the buffer is modified >again. Thus disabling re-parse. > >Here is a little patch I applied to semantic-edit.el that seems to >have cured the problem for me. > >Does it look good for you? > >David > >2004-02-20 David Ponce <da...@dp...> > > * cedet/semantic/semantic-edit.el > > (semantic-edits-change-function-handle-changes): Set the parse > tree state to needs-update on every change. [ ... ] Hmmm. When I first inserted that line, I tried it in both places. I found that in a really simple test, if I deleted a } (in C) it would go into unparseable mode. If I inserted the }, it would continue to not reparse because of that heuristic. I opted to ignore this case because any other change in the buffer got things going again. Having it in the outer section causes odd behavior in semantic completion mode. For example: int funk() { myfcn(a-!- } where -!- is the cursor. Completion mode kicks in, and the buffer is made unparseable. The buffer doesn't become parseable when adding characters, and new characters are a part of the original change. The parser will keep trying to get things to work uselessly. It resulted in lots of messages in my minibuffer. Of course, typing ) to end the arg list should enable things again but that is missed. Perhaps you solution is better. Ideally, we could keep the buffer unparseable until a change element includes a paren or string character. Ok, I think I like your change. I've changed the idle completion system quite a bit since then. I will try it again. Unfortunately, you first reported the idle scheduler problem back before I introduced the unparseable buffer feature. I remember working on the unparseable feature wondering if it would fix idle timer problem. Eric -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |