[svn:parrot] r44727 - branches/ops_pct/compilers/opsc

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Mar 7 08:08:06 UTC 2010


Author: bacek
Date: Sun Mar  7 08:08:05 2010
New Revision: 44727
URL: https://trac.parrot.org/parrot/changeset/44727

Log:
Initial version of ops2c.nqp

Added:
   branches/ops_pct/compilers/opsc/ops2c.nqp

Added: branches/ops_pct/compilers/opsc/ops2c.nqp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/ops_pct/compilers/opsc/ops2c.nqp	Sun Mar  7 08:08:05 2010	(r44727)
@@ -0,0 +1,36 @@
+#! ./parrot-nqp
+
+pir::load_bytecode("compilers/opsc/opsc.pbc");
+
+my @files := <
+    src/ops/core.ops
+    src/ops/bit.ops
+    src/ops/io.ops
+    src/ops/string.ops
+    src/ops/cmp.ops
+    src/ops/math.ops
+    src/ops/sys.ops
+    src/ops/object.ops
+    src/ops/var.ops
+    src/ops/debug.ops
+    src/ops/pmc.ops
+    src/ops/experimental.ops
+    src/ops/set.ops
+>;
+
+
+my $trans := Ops::Trans::C.new();
+
+my $f := Ops::File.new(|@files);
+my $emitter := Ops::Emitter.new(
+    :ops_file($f), :trans($trans), :script('ops2c'),
+    :flags(
+        hash( core => 1 )
+    ),
+);
+
+$emitter.print_c_header_file();
+$emitter.print_c_source_file();
+
+
+# vim: expandtab shiftwidth=4 ft=perl6:


More information about the parrot-commits mailing list