From 05aecd2c0be8f2256a114080ddd05105e64b1c73 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 5 May 2020 20:33:35 -0400 Subject: [PATCH] Internals: Fix tabs in astgen. No effective functional change. --- src/astgen | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/astgen b/src/astgen index 69cba4d08..8a7e02469 100644 --- a/src/astgen +++ b/src/astgen @@ -140,7 +140,11 @@ sub read_refs { sub open_file { my $filename = shift; my $fh = IO::File->new($filename,"w") or die "%Error: $! $filename,"; - print $fh '// Generated by astgen // -*- mode: C++; c-file-style: "cc-mode" -*-'."\n"; + if ($filename =~ /\.txt$/) { + print $fh '// Generated by astgen'."\n"; + } else { + print $fh '// Generated by astgen // -*- mode: C++; c-file-style: "cc-mode" -*-'."\n"; + } return $fh; } @@ -182,32 +186,32 @@ sub write_report { $fh->print("Processing stages (approximate, based on order in Verilator.cpp):\n"); foreach my $class (sort {$Stages{$a} <=> $Stages{$b}} keys %Stages) { - $fh->print("\t$class\n"); + $fh->print(" $class\n"); } - $fh->print("\nProcessing stages (approximate, based on order in Verilator.cpp):\n"); + $fh->print("\nClasses:\n"); foreach my $type (sort (keys %Classes)) { printf $fh " class %-20s\n", "Ast${type}"; - $fh->print("\tparent:\t"); + $fh->print(" parent: "); foreach my $subclass (subclasses_of($type)) { next if $subclass eq 'Node'; printf $fh "Ast%-12s ",$subclass; } printf $fh "\n"; - $fh->print("\tchilds:\t"); + $fh->print(" childs: "); foreach my $subclass (children_of($type)) { next if $subclass eq 'Node'; printf $fh "Ast%-12s ",$subclass; } printf $fh "\n"; if (my $refs = $ClassRefs{"Ast${type}"}) { - $fh->print("\tnewed:\t"); + $fh->print(" newed: "); foreach my $stage (sort {($Stages{$a}||-1) <=> ($Stages{$b}||-1)} keys %{$refs->{newed}}) { $fh->print($stage." "); } $fh->print("\n"); - $fh->print("\tused:\t"); + $fh->print(" used: "); foreach my $stage (sort {($Stages{$a}||-1) <=> ($Stages{$b}||-1)} keys %{$refs->{used}}) { $fh->print($stage." ");