Changeset 53
- Timestamp:
- 04/28/05 20:10:48 (4 years ago)
- Files:
-
- trunk/dsp/DSPGrammar.d (modified) (3 diffs)
- trunk/dsp/RequestConfig.d (modified) (1 diff)
- trunk/dsp/ServletCompiler.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dsp/DSPGrammar.d
r49 r53 40 40 public static char[] newline = "\n"; 41 41 42 public static char[] standardInclude = "import dsp.servlet.ServletRegistry,dsp.servlet.IDSPResponse,dsp.servlet.IDSPRequest,std.string ";42 public static char[] standardInclude = "import dsp.servlet.ServletRegistry,dsp.servlet.IDSPResponse,dsp.servlet.IDSPRequest,std.string,mango.io.model.IWriter"; 43 43 public static char[] servletPrefix = "__servlet_"; 44 44 public static char[] servletDecl = "(IDSPRequest request, IDSPResponse response)"; 45 public static char[] outputVarDecl = " HttpWriter __writer = response.getWriter()";45 public static char[] outputVarDecl = "IWriter __writer = response.getWriter()"; 46 46 47 47 public static char[] outputFunc = "__writer.put"; … … 84 84 85 85 public static char[] servletHeader(char[] name,char[] modulePath){ 86 //TODO: rework to use servlet name instead of 'default' 86 87 return 87 88 "module " ~ pathToNamespace(modulePath) ~ ";" ~ newline ~ … … 91 92 92 93 static this(){ 93 dsp.servlet.ServletRegistry.registerServletHandle(&` ~ servletFunctionName(name) ~ `,` ~ "`" ~ modulePath ~ "`" ~ `); 94 printf("servlet library init!\n"); 95 dsp.servlet.ServletRegistry.registerServletHandle(&` ~ servletFunctionName(name) ~ `,` ~ "`default`" ~ `); 94 96 }` ~ newline 95 97 ; trunk/dsp/RequestConfig.d
r49 r53 37 37 char[] tempDirectory; 38 38 char[] cacheDirectory; 39 char[] runtimeDirectory; 39 40 40 41 public char[] toString(){ 41 42 return 42 "pwd: " ~ pwd ~ "\n" ~43 "name: " ~ name ~ "\n" ~44 "ext: " ~ ext ~ "\n" ~45 "modulePath: " ~ modulePath ~ "\n" ~46 "requestModule: " ~ requestModule ~ "\n" ~47 "dspSourceFilename: " ~ dspSourceFilename ~ "\n" ~48 "dSourceFilename: " ~ dSourceFilename ~ "\n" ~49 "destServletFilename: " ~ destServletFilename ~ "\n" ~43 "pwd: " ~ pwd ~ "\n" 44 "name: " ~ name ~ "\n" 45 "ext: " ~ ext ~ "\n" 46 "modulePath: " ~ modulePath ~ "\n" 47 "requestModule: " ~ requestModule ~ "\n" 48 "dspSourceFilename: " ~ dspSourceFilename ~ "\n" 49 "dSourceFilename: " ~ dSourceFilename ~ "\n" 50 "destServletFilename: " ~ destServletFilename ~ "\n" 50 51 "tempDirectory: " ~ tempDirectory ~ "\n" 51 52 "cacheDirectory: " ~ cacheDirectory ~ "\n" 53 "runtimeDirectory: " ~ runtimeDirectory ~ "\n" 52 54 ; 53 55 } trunk/dsp/ServletCompiler.d
r49 r53 70 70 " -od" ~ cfg.tempDirectory ~ 71 71 " -of" ~ cfg.destServletFilename ~ 72 " dspruntime.lib" ~73 72 " mango.lib" ~ 74 " phobos.lib" ~ 73 " " ~ cfg.runtimeDirectory ~ "DllStub.obj" ~ 74 " " ~ cfg.runtimeDirectory ~ "IDSPRequest.obj" ~ 75 " " ~ cfg.runtimeDirectory ~ "IDSPResponse.obj" ~ 76 " " ~ cfg.runtimeDirectory ~ "ServletRegistry.obj" ~ 77 " " ~ cfg.runtimeDirectory ~ "servlet.def" ~ 75 78 " -version=dsp" ~ 76 79 " > " ~ cfg.tempDirectory ~ cfg.name ~ "_output.txt" 77 80 ; 78 81 82 /* //TODO: report a bug regarding issues with build. 83 char[] commandline = 84 "build " ~ cfg.dSourceFilename ~ 85 " -op" ~ 86 " -od" ~ cfg.tempDirectory ~ 87 " dspruntime.lib" ~ 88 " servlet.def" ~ 89 " -version=dsp" ~ 90 " > " ~ cfg.tempDirectory ~ cfg.name ~ "_output.txt" 91 ; 92 */ 79 93 writefln("command: %s",commandline); 80 94
