Skip to content

Commit

Permalink
Bug 733856 - segfault in QGListIterator while parsing fortran code
Browse files Browse the repository at this point in the history
Problem with variables with the name type versus type definitions.
type followed by = is recognized as not being a type definition instead of the use of a variable.
  • Loading branch information
albert-github committed Jul 30, 2014
1 parent c9d816a commit aac81f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fortrancode.l
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,8 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
}
YY_FTN_RESET
}
<*>^{BS}"type"{BS}"=" { g_code->codify(yytext); }

<*>. {
g_code->codify(yytext);
}
Expand Down
1 change: 1 addition & 0 deletions src/fortranscanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ private {
{ID} {
}
^{BS}"type"{BS_}"is"/{BS_} { }
^{BS}"type"{BS}"=" { }
}
<AttributeList>{
{COMMA} {}
Expand Down

0 comments on commit aac81f8

Please sign in to comment.