summaryrefslogtreecommitdiff
path: root/src/pyscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 593db6b..7782125 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -197,7 +197,7 @@ SHORTSTRINGITEM ({SHORTSTRINGCHAR}|{ESCAPESEQ})
SHORTSTRINGCHAR [^\\\n"]
STRINGLITERAL {STRINGPREFIX}?( {SHORTSTRING} | {LONGSTRING})
STRINGPREFIX ("r"|"u"|"ur"|"R"|"U"|"UR"|"Ur"|"uR")
-FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"if"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally")
+FLOWKW ("or"|"and"|"is"|"not"|"print"|"for"|"in"|"try"|"except"|"yield"|"raise"|"break"|"continue"|"pass"|"if"|"return"|"while"|"elif"|"else"|"finally")
POUNDCOMMENT "#"[^#\n][^\n]*
SCRIPTCOMMENT "#!".*
@@ -548,7 +548,7 @@ STARTDOCSYMS "##"
}
<FunctionBody>{
- \n{B}/{IDENTIFIER}{BB} {
+ \n{B}/{IDENTIFIER}[^{LETTER}{DIGIT}_] {
DBG_CTX((stderr,"indent %d<=%d\n",computeIndent(&yytext[1]),yyextra->indent));
if (computeIndent(&yytext[1])<=yyextra->indent)
{
@@ -1800,6 +1800,7 @@ static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
pyscannerYYrestart( 0, yyscanner );
if (ce->section&Entry::COMPOUND_MASK)
{
+ yyextra->specialBlock = false;
yyextra->current_root = ce;
BEGIN( Search );
}