about summary refs log tree commit diff
path: root/src/aterm-helper.pl
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-09-04T21·06+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-09-04T21·06+0000
commit75068e7d753cf6cbe45a4bf294000dca9bd41d8b (patch)
treec6274cc10caab08349b5585206034f41ca4a575f /src/aterm-helper.pl
parentaab88127321344d5818d823bff515d127108d058 (diff)
* Use a proper namespace.
* Optimise header file usage a bit.
* Compile the parser as C++.

Diffstat (limited to 'src/aterm-helper.pl')
-rwxr-xr-xsrc/aterm-helper.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/aterm-helper.pl b/src/aterm-helper.pl
index 3bb466fe3bb8..54eb33abda8e 100755
--- a/src/aterm-helper.pl
+++ b/src/aterm-helper.pl
@@ -40,6 +40,11 @@ my $initFun = "init";
 open HEADER, ">$ARGV[0]";
 open IMPL, ">$ARGV[1]";
 
+print HEADER "#ifdef __cplusplus\n";
+print HEADER "namespace nix {\n";
+print HEADER "#endif\n\n\n";
+print IMPL "namespace nix {\n";
+
 while (<STDIN>) {
     next if (/^\s*$/);
     
@@ -162,5 +167,10 @@ print IMPL "void $initFun() {\n";
 print IMPL "$init";
 print IMPL "}\n";
 
+print HEADER "#ifdef __cplusplus\n";
+print HEADER "}\n";
+print HEADER "#endif\n\n\n";
+print IMPL "}\n";
+
 close HEADER;
 close IMPL;