Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse ESCET (Supervisory Control Engineering Toolkit)
escet
Commits
68b7f9ae
Commit
68b7f9ae
authored
May 08, 2022
by
Dennis Hendriks
Browse files
#344
Bit simpler code for ReadMatrix.
parent
cf7ad45d
Pipeline
#3927
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
common/org.eclipse.escet.common.dsm/src/org/eclipse/escet/common/dsm/io/ReadMatrix.java
View file @
68b7f9ae
...
...
@@ -71,30 +71,30 @@ public class ReadMatrix {
while
(
true
)
{
// Skip whitespace.
if
(
whitespaceMatcher
.
find
(
index
)
&&
whitespaceMatcher
.
start
()
==
index
)
{
index
+
=
whitespaceMatcher
.
end
()
-
index
;
index
=
whitespaceMatcher
.
end
();
}
// Parse an entry.
if
(
quotedEntryMatcher
.
find
(
index
)
&&
quotedEntryMatcher
.
start
()
==
index
)
{
String
entry
=
slice
(
quotedEntryMatcher
.
group
(),
1
,
-
1
);
entries
.
add
(
entry
);
index
+
=
quotedEntryMatcher
.
end
()
-
index
;
index
=
quotedEntryMatcher
.
end
();
}
else
{
Assert
.
check
(
regularEntryMatcher
.
find
(
index
));
Assert
.
areEqual
(
regularEntryMatcher
.
start
(),
index
);
String
entry
=
regularEntryMatcher
.
group
();
entries
.
add
(
entry
);
index
+
=
regularEntryMatcher
.
end
()
-
index
;
index
=
regularEntryMatcher
.
end
();
}
// Skip whitespace.
if
(
whitespaceMatcher
.
find
(
index
)
&&
whitespaceMatcher
.
start
()
==
index
)
{
index
+
=
whitespaceMatcher
.
end
()
-
index
;
index
=
whitespaceMatcher
.
end
();
}
// Parse a separator.
if
(
separatorMatcher
.
find
(
index
)
&&
separatorMatcher
.
start
()
==
index
)
{
index
+
=
separatorMatcher
.
end
()
-
index
;
index
=
separatorMatcher
.
end
();
}
else
{
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment