Created
July 10, 2011 16:13
-
-
Save dakkar/1074654 to your computer and use it in GitHub Desktop.
micro-patch for gas-preprocessor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first way: in pre-processing | |
# before calling «parse_line($_)» from the «while» loop | |
if (/\.irpc\s+([\d\w.]+)\s*(.*)/) { | |
my ($id,$vals)=($1,$2); | |
my @vals = split //,$vals; | |
$_ = ".irp $id @vals"; | |
} | |
# second way: in «parse_line» | |
# just after the «elsif ($line =~ /\.irp\s+([\d\w\.]+)\s*(.*)/) {…}» | |
elsif ($line =~ /\.irpc\s+([\d\w\.]+)\s*(.*)/) { | |
$in_irp = 1; | |
$num_repts = 1; | |
$rept_lines = "\n"; | |
$irp_param = $1; | |
# only use whitespace as the separator | |
my $irp_arglist = $2; | |
@irp_args = split(//, $irp_arglist); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment