Changelog 2003-10-23 15:40 UTC+0100 Ryszard Glab

This commit is contained in:
Ryszard Glab
2003-10-23 14:09:30 +00:00
parent 1aad158eb0
commit 5744e86ad2
2 changed files with 26 additions and 34 deletions

View File

@@ -8,6 +8,10 @@
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2003-10-23 15:40 UTC+0100 Ryszard Glab <rglab@przesiew.imid.med.pl>
* source/compiler/harbour.l
* fixed codeblock scanning - this should cure random GPFs
2003-10-23 11:00 UTC+0100 Ryszard Glab <rglab@przesiew.imid.med.pl>
* include/hbexprc.c
* source/compiler/exproptc.c

View File

@@ -1459,49 +1459,37 @@ Separator {SpaceTab}
yylval.asCodeblock.lateEval = FALSE;
cText = yytext+1;
iLen = 1;
while( *cText || ((cMark != '\0') && (*cText == '\0')) )
while( *cText || iLen < yyleng )
{
iLen++;
if( *cText == '\'' )
{
if( cMark == '\'' )
cMark = '\0';
else if( cMark == '\0' )
cMark = '\'';
}
else if( *cText == '"' )
{
if( cMark == '"' )
cMark = '\0';
else if( cMark == '\0' )
cMark = '"';
}
else if( *cText == '[' )
{
if( cMark == ']' )
cMark = '\0';
else if( cMark == '\0' )
cMark = ']';
}
if( *cText == '\'' && cMark == '\0' )
cMark = '\'';
else if( *cText == '"' && cMark == '\0' )
cMark = '"';
else if( *cText == '[' && cMark == '\0' )
cMark = ']';
else if( *cText == cMark )
cMark = '\0';
else if( *cText == '|' && iPos == 0 )
iPos = iLen;
iPos = iLen;
else if( *cText == '&' && cMark == '\0' )
{
yylval.asCodeblock.isMacro = TRUE;
++cText;
while( *cText == ' ' || *cText == '\t' )
++cText;
if( *cText == '(' )
yylval.asCodeblock.lateEval = TRUE;
--cText;
yylval.asCodeblock.isMacro = TRUE;
++cText;
while( *cText == ' ' || *cText == '\t' )
++cText;
if( *cText == '(' )
yylval.asCodeblock.lateEval = TRUE;
--cText;
}
else if( *cText == '{' && cMark == '\0' )
iCode++;
iCode++;
else if( *cText == '}' && cMark == '\0' )
{
iCode--;
if( iCode == 0 )
break;
iCode--;
if( iCode == 0 )
break;
}
cText++;
}