Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ezekiel Dohmen
advLigoRTS
Commits
b862b5f0
Commit
b862b5f0
authored
Jun 27, 2022
by
Ezekiel Dohmen
Browse files
Doing duplicate node check with lower cased names, fixing #403
parent
1bd0c011
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/epics/util/lib/Parser3.pm
View file @
b862b5f0
...
...
@@ -140,7 +140,7 @@ sub parse {
# if the node is a block, add the name to the parent CHILD_BLOCKS hash
if
(
$cur_node
->
{
NAME
}
eq
"
Block
"
&&
exists
$
{
$cur_node
->
{
FIELDS
}}{
Name
})
{
my
$parent
=
$cur_node
->
{
PARENT_BLOCK
};
my
$name
=
$
{
$cur_node
->
{
FIELDS
}}{
Name
};
my
$name
=
lc
$
{
$cur_node
->
{
FIELDS
}}{
Name
};
if
(
exists
$
{
$parent
->
{
CHILD_BLOCKS
}}{
$name
}
)
{
...
...
@@ -224,7 +224,7 @@ sub add_child_block {
#check if child is a node with a name, if so, it should go in CHILD_BLOCKS hash
if
(
$child
->
{
NAME
}
eq
"
Block
")
{
my
$child_name
=
$
{
$child
->
{
FIELDS
}}{
Name
};
my
$child_name
=
lc
$
{
$child
->
{
FIELDS
}}{
Name
};
if
(
exists
$
{
$parent
->
{
CHILD_BLOCKS
}}{
$child_name
})
{
print
("
Found duplicate name
$child_name
while adding a child
\n
");
print
("
Original node
\n
");
...
...
@@ -232,11 +232,10 @@ sub add_child_block {
print
("
Duplicate node
\n
");
print_node
(
$child
);
$errormsg
=
"
*** ERROR -- Found duplicate name
$child_name
while adding a child block
The RCG builds block names by prepending enclosing system names, using an '_' character as a separator.
Other blocks that have an '_' in their name can end up with the same name.
The RCG builds block names by prepending enclosing system names, using an '_' character as a separator.
Other blocks that have an '_' in their name can end up with the same name.
One of the identically named blocks needs to be renamed. Avoid this problem by not using '_' in block names.
";
One of the identically named blocks needs to be renamed. Avoid this problem by not using '_' in block names
";
die
$errormsg
;
}
$
{
$parent
->
{
CHILD_BLOCKS
}}{
$child_name
}
=
$child
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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