Skip to content
Snippets Groups Projects
Commit 0ccf59f2 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

namelist2config: re-enable here-doc detection to remove spurious data

parent 80fad994
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ my $namelist_group = {};
my $namelist_variable = [];
while(<>) {
if(/^EOF/) {
if($in_doc && m/^EOF/) {
if($open_value) {
$direct and print("\n");
$open_value = 0;
......@@ -100,7 +100,7 @@ while(<>) {
$in_doc = 0;
$direct and $verbose and print "### $_";
}
elsif(/^\s*\/\s*$/) {
elsif($in_doc && m/^\s*\/\s*$/) {
if($open_value) {
$direct and print("\n");
$open_value = 0;
......@@ -115,8 +115,7 @@ while(<>) {
exists $namelists{$key} or $namelists{$key} = {};
$namelist_file = $namelists{$key};
}
### elsif($in_doc && m{^\s*&(\w+)}) {
elsif(/^\s*&(\w+)/) {
elsif($in_doc && m/^\s*&(\w+)/) {
$in_group = 1;
my $group = lc($1);
### $group =~ s/output_nml/'output_nml TODO'.++$i/e;
......@@ -125,8 +124,7 @@ while(<>) {
exists $namelist_file->{$group} or $namelist_file->{$group} = {};
$namelist_group = $namelist_file->{$group};
}
### elsif($in_doc && $in_group) {
elsif($in_group) {
elsif($in_doc && $in_group) {
my $key = '';
my $value;
my $comment = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment