[llvm-commits] [hlvm] r38044 - in /hlvm/trunk/utils: bin/mkFuncs.pm bin/mkTokenizer tmplt/Tokenizer_Template.cpp
Reid Spencer
reid at x10sys.com
Sat Jul 7 16:59:15 PDT 2007
Author: reid
Date: Sat Jul 7 18:59:15 2007
New Revision: 38044
URL: http://llvm.org/viewvc/llvm-project?rev=38044&view=rev
Log:
Undo my brain fart.
Modified:
hlvm/trunk/utils/bin/mkFuncs.pm
hlvm/trunk/utils/bin/mkTokenizer
hlvm/trunk/utils/tmplt/Tokenizer_Template.cpp
Modified: hlvm/trunk/utils/bin/mkFuncs.pm
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/utils/bin/mkFuncs.pm?rev=38044&r1=38043&r2=38044&view=diff
==============================================================================
--- hlvm/trunk/utils/bin/mkFuncs.pm (original)
+++ hlvm/trunk/utils/bin/mkFuncs.pm Sat Jul 7 18:59:15 2007
@@ -18,7 +18,7 @@
my $hlvmdir = get_hlvm_dir();
chomp($MODULE_PATH = `pwd`);
- $MODULE_PATH =~ s|$hlvmdir\/hlvm\/(.*)|$1|;
+ $MODULE_PATH = substr($MODULE_PATH,rindex($MODULE_PATH,"/hlvm/")+6);
$MODULE = $MODULE_PATH;
$MODULE =~ s|\/|_|g;
@@ -50,7 +50,7 @@
}
}
- local $NAMESPACE = "HLVM_$MODULE";
+ local $NAMESPACE = "HLVM_$MODULE";
local $module_header = ucfirst($MODULE);
local $MODULE_INCLUDE = "<hlvm/$MODULE/${module_header}.h>";
local $CLASS_INCLUDE = "<hlvm/$MODULE/${CLASS}.h>";
Modified: hlvm/trunk/utils/bin/mkTokenizer
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/utils/bin/mkTokenizer?rev=38044&r1=38043&r2=38044&view=diff
==============================================================================
--- hlvm/trunk/utils/bin/mkTokenizer (original)
+++ hlvm/trunk/utils/bin/mkTokenizer Sat Jul 7 18:59:15 2007
@@ -114,8 +114,9 @@
# Run the input through GPERF to create the perfect hash function
$hlvmdir = get_hlvm_dir();
-chomp($Module = `pwd`);
-$Module =~ s|$hlvmdir\/hlvm\/(.*)|$1|;
+chomp($ModulePath = `pwd`);
+$ModulePath = substr($ModulePath,rindex($ModulePath,"/hlvm/")+6);
+$Module = $ModulePath;
$Module =~ s|\/|_|g;
print GPERF "struct TokenMap {\n";
print GPERF "const char *name; HLVM_$Module"."::".$Schema."Tokens token;\n" ;
Modified: hlvm/trunk/utils/tmplt/Tokenizer_Template.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/utils/tmplt/Tokenizer_Template.cpp?rev=38044&r1=38043&r2=38044&view=diff
==============================================================================
--- hlvm/trunk/utils/tmplt/Tokenizer_Template.cpp (original)
+++ hlvm/trunk/utils/tmplt/Tokenizer_Template.cpp Sat Jul 7 18:59:15 2007
@@ -5,8 +5,8 @@
/// @brief Implements the functions of class %SCHEMA_NAME%Tokenizer.
///////////////////////////////////////////////////////////////////////////////
-#include <%MODULE_PATH%/%SCHEMA_NAME%Tokenizer.h>
-#include <%MODULE_PATH%/%SCHEMA_NAME%TokenHash.i>
+#include <hlvm/%MODULE_PATH%/%SCHEMA_NAME%Tokenizer.h>
+#include <hlvm/%MODULE_PATH%/%SCHEMA_NAME%TokenHash.i>
namespace HLVM_%MODULE% {
More information about the llvm-commits
mailing list