|
@@ -635,7 +635,17 @@ namespace Analyser
|
|
label = true;
|
|
label = true;
|
|
}
|
|
}
|
|
else if (c.ToString().IndexOfAny(Delimiters) == 0)
|
|
else if (c.ToString().IndexOfAny(Delimiters) == 0)
|
|
- {
|
|
|
|
|
|
+ {
|
|
|
|
+ //Особый учет для последовательностей >=, => и т.д.
|
|
|
|
+ bool comparer = pos + 1 < line.Length;
|
|
|
|
+ String cmp = "";
|
|
|
|
+ if (comparer)
|
|
|
|
+ {
|
|
|
|
+ cmp = line.Substring(pos, 2);
|
|
|
|
+ comparer = cmp.Equals("<=") || cmp.Equals(">=") || cmp.Equals("=>") || cmp.Equals("=<") || cmp.Equals("<>") ||
|
|
|
|
+ cmp.Equals("+=") || cmp.Equals("-=") || cmp.Equals("*=") || cmp.Equals("/=");
|
|
|
|
+ }
|
|
|
|
+
|
|
if ((c == '&') && (bracketLevel == 0))
|
|
if ((c == '&') && (bracketLevel == 0))
|
|
{
|
|
{
|
|
if (controlBlock == (int)ControlBlockType.IfCondition)
|
|
if (controlBlock == (int)ControlBlockType.IfCondition)
|
|
@@ -671,7 +681,7 @@ namespace Analyser
|
|
//CLOSE ALL
|
|
//CLOSE ALL
|
|
block += c;
|
|
block += c;
|
|
}
|
|
}
|
|
- else if (!blockStarted && (c == '*'))
|
|
|
|
|
|
+ else if (!comparer && !blockStarted && (c == '*'))
|
|
{
|
|
{
|
|
//Возможно, *PL, *P, *NL
|
|
//Возможно, *PL, *P, *NL
|
|
blockStarted = true;
|
|
blockStarted = true;
|
|
@@ -703,15 +713,6 @@ namespace Analyser
|
|
}
|
|
}
|
|
bool whiteSpace = c.ToString().IndexOfAny(WhiteSpace) == 0;
|
|
bool whiteSpace = c.ToString().IndexOfAny(WhiteSpace) == 0;
|
|
|
|
|
|
- //Особый учет для последовательностей >=, => и т.д.
|
|
|
|
- bool comparer = pos + 1 < line.Length;
|
|
|
|
- String cmp = "";
|
|
|
|
- if (comparer)
|
|
|
|
- {
|
|
|
|
- cmp = line.Substring(pos, 2);
|
|
|
|
- comparer = cmp.Equals("<=") || cmp.Equals(">=") || cmp.Equals("=>") || cmp.Equals("=<") || cmp.Equals("<>") ||
|
|
|
|
- cmp.Equals("+=") || cmp.Equals("-=");
|
|
|
|
- }
|
|
|
|
if (comparer)
|
|
if (comparer)
|
|
{
|
|
{
|
|
//<= >= => =< <> += -=
|
|
//<= >= => =< <> += -=
|
|
@@ -956,7 +957,8 @@ namespace Analyser
|
|
{
|
|
{
|
|
//Обрабатываем попытки "склеить" некоторые последовательности символов
|
|
//Обрабатываем попытки "склеить" некоторые последовательности символов
|
|
string first = block.Substring(0, 1);
|
|
string first = block.Substring(0, 1);
|
|
- if (first.Equals("*"))
|
|
|
|
|
|
+ string second = block.Substring(1, 1);
|
|
|
|
+ if (!second.Equals("=") && first.Equals("*"))
|
|
{
|
|
{
|
|
//Если была неудачная попытка прочесть *NL, *P, и т.д., "разделяем" блок на части
|
|
//Если была неудачная попытка прочесть *NL, *P, и т.д., "разделяем" блок на части
|
|
blockGroup.Add(first);
|
|
blockGroup.Add(first);
|
|
@@ -1120,6 +1122,10 @@ namespace Analyser
|
|
int setpos = FindInTopBracketLevel(blockGroup, blockInGroupIsText, "=");
|
|
int setpos = FindInTopBracketLevel(blockGroup, blockInGroupIsText, "=");
|
|
if (setpos == INVALID_INDEX)
|
|
if (setpos == INVALID_INDEX)
|
|
setpos = FindInTopBracketLevel(blockGroup, blockInGroupIsText, "+=");
|
|
setpos = FindInTopBracketLevel(blockGroup, blockInGroupIsText, "+=");
|
|
|
|
+ if (setpos == INVALID_INDEX)
|
|
|
|
+ setpos = FindInTopBracketLevel(blockGroup, blockInGroupIsText, "*=");
|
|
|
|
+ if (setpos == INVALID_INDEX)
|
|
|
|
+ setpos = FindInTopBracketLevel(blockGroup, blockInGroupIsText, "/=");
|
|
if (setpos == INVALID_INDEX)
|
|
if (setpos == INVALID_INDEX)
|
|
setpos = FindInTopBracketLevel(blockGroup, blockInGroupIsText, "-=");
|
|
setpos = FindInTopBracketLevel(blockGroup, blockInGroupIsText, "-=");
|
|
if (isSetOp && (setpos == INVALID_INDEX))
|
|
if (isSetOp && (setpos == INVALID_INDEX))
|