diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-09-04T21·06+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-09-04T21·06+0000 |
commit | 75068e7d753cf6cbe45a4bf294000dca9bd41d8b (patch) | |
tree | c6274cc10caab08349b5585206034f41ca4a575f /src/aterm-helper.pl | |
parent | aab88127321344d5818d823bff515d127108d058 (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-x | src/aterm-helper.pl | 10 |
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; |