Subject: bug#12568: 24.2.50; semantic parser and python conditional expressions

From: David Engster <[email-masked]>
Date: Sat, 06 Oct 2012 23:40:39 +0200

Stefan Reichör writes:
> How to reproduce the bug:
> C-x C-f 1.py RET
> M-x semantic-mode RET
>
>>>> file content for 1.py
> etags_cmd = "c:/emacs/bin/etags.exe" if cRunningOnWindows else "etags"
>>>> end file content
>
> This gives the following error:
>
> Idle Parse Error: "#<buffer 1.py> - wisent-python-lexer: endless loop
> at 13, after (STRING_LITERAL 13 . 13)"

I'm afraid I currently cannot reproduce this, using Emacs from bzr,
revno. 110397.

Loading 1.py and enabling semantic-mode does not give me any
error. Also, calling

  M-x semantic-lex-test

correctly returns

((NAME 1 . 10)
 (ASSIGN 11 . 12)
 (STRING_LITERAL 13 . 37)
 (IF 38 . 40)
 (NAME 41 . 58)
 (ELSE 59 . 63)
 (STRING_LITERAL 64 . 71)
 (NEWLINE 71 . 72))

so the lexer seems to work fine.

-David