Re: idle parse error due to commit 496501b

fulvio ciriaco <[email protected]> Sun, 22 Mar 2015 21:33:00 +0100
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
Hello Martin,
since you made public your branch, I have been using it for my fortran 
editing and I found all very useful and nice to work with.
I applied the patch from Eric and it solved the problem with the parsing 
errors that sometimes broke also the indentation engine,
or so I guessed.
Thank you and the cedet devels

Fulvio

On 22/03/2015 19:58, Eric Ludlam wrote:
> On 03/04/2015 06:44 AM, Martin Stein wrote:
>> After I rebased my f90 code to the current master branch and started working with it I stumbled upon the following error which I traced to commit 496501b, so I guess the problem is not the commit itself. When I edit a file, idle reparsing fails - sometimes. With the fortran parser it fails most of the time, but I also saw it in lisp mode. Line
>>     (semantic-throw-on-input 'lex)
>> in lex.el (line 815) causes this problem.
>> In the case of the fortran lexer, the idle parse error message is triggered because the lexer calls itself recursively. If throw-on-input throws at an inner recursion step, the lexer aborts, and the outer recursion thinks it is in an infinite loop (the inner lexer has not advanced semantic-lex-end), as it does not know about the throwing. I cannot remember where I took the idea of calling the lexer recursively, but I think I am not the only one doing this.
>>
>> Martin
> Hi Martin,
>
> Sorry for the late reply.  I've been pretty busy.
>
> While trying to ge Alastair's changes working on my machine, I noticed
> the same problem, but when editing Emacs Lisp code.  As far as I know,
> it doesn't recurse in the lexer, but then I haven't worked on that lexer
> in ages.
>
> I've been poking at it for a little while, and for me it just looks like
> the analyzers (all defaults for Emacs Lisp) sometimes don't advance the
> end point.
>
> What I found instead is that changes in semantic-throw-on-input can move
> point.   I added a save-excursion, and the problem appears to have gone
> away for me.
>
> I've submitted that change.  Hopefully that also helps with your
> recursion issue.
>
> Eric
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Cedet-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cedet-devel


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/