From 79f228b04f0f95e72ae68068b27412f8433ebc1b Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 3 Jun 2020 20:11:09 -0400 Subject: [PATCH] Remove dead code (bisonreader) --- nodist/bisonreader | 58 ---------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100755 nodist/bisonreader diff --git a/nodist/bisonreader b/nodist/bisonreader deleted file mode 100755 index 561dd77be..000000000 --- a/nodist/bisonreader +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env perl -###################################################################### -# -# Copyright 2007-2020 by Wilson Snyder. This program is free software; you -# can redistribute it and/or modify it under the terms of either the GNU -# Lesser General Public License Version 3 or the Perl Artistic License -# Version 2.0. -# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 -# -###################################################################### - -# DESCRIPTION: Debugging of bison output - -use warnings; -use strict; - -my $Debug; - -my %declared; -my %used; - -my $body = 0; -my $rule = ""; -my $lineno = 0; -foreach my $line () { - $lineno++; - chomp $line; - $line =~ s!//.*$!!g; - $line =~ s!\s+! !g; - next if $line eq ''; - if ($line =~ m!^\%\%!) { - $body++; - } elsif ($body == 1) { - $rule .= $line; - if ($line =~ m!^\s*;\s*$!) { - #print "Rule: $rule\n"; - ($rule =~ /^([a-zA-Z0-9_]+)(<\S+>)?:(.*)$/) or die "%Error: No rule name: $1\n"; - my $rulename = $1; my $preaction = $3; - $declared{$rulename} = $lineno; - $preaction =~ s/\{[^\}]*\}/ /g; - #print "RULEN $rulename PA $preaction\n" if $Debug; - $rule = ''; - foreach my $ref (split /\s+/, $preaction) { - next if $ref !~ /^[a-zA-Z]/; - next if $ref eq $rulename; - if (!$used{$ref} && $declared{$ref}) { - print " %Warning: $lineno: $ref used by $rulename after declaration\n"; - } - $used{$ref} = $lineno; - print " ref $ref\n" if $Debug; - } - } - } -} - -# Local Variables: -# compile-command: "./bisonreader < ../src/verilog.y" -# End: