[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
C Server Pages (CSP) :)
Hi,
Anybody to help me on writing a compiler that converts '.CSP' to C code?
If it is given a PHP-like file, it should output the equivalent C CGI code.
This is what I exactly mean:
File HelloWorld.CSP
---------------------
<html><head><title>Hello World</title></head>
<body>
<%
TextOut("<H1>");
if(itsbig){
%>
<font size="+2">
<?csp
}
?>
</body></html>
Output File HelloWorld.c
-------------------------
main(){
TextOut("Content type: text/html\n\n");
TextOut("<html><head><title>Hello World</Title></Head>\n<Body>\n");
TextOut("H1");
if(itsbig){
TextOut("\n<font size=\"+2\'");
}
TextOut("</body></html>");
}
Nothing new or smashing, but any help? We dont even need a apache module
or something like that now.
----------------------
Lakshmi Anand K.