Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
a2c7ec07
Commit
a2c7ec07
authored
Feb 16, 2007
by
Matthias Braun
Browse files
another fix :)
parent
a9b231ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/scripts/generate_emitter.pl
View file @
a2c7ec07
...
...
@@ -8,7 +8,9 @@
use
strict
;
use
Data::
Dumper
;
use
File::
Basename
;
my
$myname
=
$
0
;
our
$specfile
=
$ARGV
[
0
];
our
$target_dir
=
$ARGV
[
1
];
...
...
@@ -31,8 +33,12 @@ unless ($return = do $specfile) {
use
strict
"
subs
";
if
(
$new_emit_syntax
)
{
do
"
generate_emitter_new.pl
";
return
;
my
$newscript
=
dirname
(
$myname
)
.
"
/generate_emitter_new.pl
";
unless
(
$return
=
do
"
$newscript
")
{
warn
"
couldn't parse
$newscript
: $@
"
if
$@
;
warn
"
couldn't do
$newscript
: $!
"
unless
defined
$return
;
warn
"
couldn't run
$newscript
"
unless
$return
;
}
}
my
$comment_string_quoted
=
quotemeta
(
$comment_string
);
...
...
ir/be/scripts/generate_emitter_new.pl
View file @
a2c7ec07
...
...
@@ -13,25 +13,8 @@ our $specfile;
our
$target_dir
;
our
$arch
;
our
$comment_string
;
our
$comment_string_end
;
our
%nodes
;
our
%emit_templates
;
our
$spec_version
=
1
;
# include spec file
my
$return
;
no
strict
"
subs
";
unless
(
$return
=
do
$specfile
)
{
warn
"
couldn't parse
$specfile
: $@
"
if
$@
;
warn
"
couldn't do
$specfile
: $!
"
unless
defined
$return
;
warn
"
couldn't run
$specfile
"
unless
$return
;
}
use
strict
"
subs
";
my
$comment_string_quoted
=
quotemeta
(
$comment_string
);
my
$target_c
=
$target_dir
.
"
/gen_
"
.
$arch
.
"
_emitter.c
";
my
$target_h
=
$target_dir
.
"
/gen_
"
.
$arch
.
"
_emitter.h
";
...
...
@@ -90,8 +73,6 @@ foreach my $op (keys(%nodes)) {
push
(
@obst_func
,
$line
.
"
{
\n
");
my
@emit
=
split
(
/\n/
,
$n
{"
emit
"});
if
(
$spec_version
<
3
)
{
last
;
}
foreach
my
$template
(
@emit
)
{
# substitute only lines, starting with a '.'
if
(
$template
=~
/^(\s*)\.\s*(.*)/
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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