Project JASPachO's weblog

Thursday, February 23, 2006

Testing DSO waters

Well, now that we have a design for Hyena ready, we have started making a test DSO module, mainly to figure out what we need when writing a module for Apache.

Some progress has been made here, and a small test modue has been written, namely hyenatry.c.

It was compiled with the following command (as root):
apxs -i -a -c -n hyenatry hyenatry.c

Now, we need to figure out how to test it.

Wednesday, February 15, 2006

Finally... progress!!

At last, we seem to be making progress. After splitting up our group into 2, Gerard and Hardik have been making progess in figuring out lex and yacc.

Rohan and Savio, despite the fact that there is still no working code, thanks to problems with SpiderMonkey configuration, have also made progress. Rohan has come up with his initial version of Hyena's detailed design in pseudocode, which follows:


//First Hyena is woken up by Apache when a request for an ASP page is received

//Main function
{
Fetch ASP file;

set state to HTML;

if first line has <%@LANGUAGE="JAVASCRIPT"%>
{
while end-of-file not reached
{
read line;

if state is HTML
output line;
else
execute line;
}
}//Execute ASP-JavaScript
else
{
//Need to check what ASP-Perl does here
}
}

//This method gives HTML output to Apache
//Note: Detailed mechanism needs to be figured out
//Output method
{
while <% or end-of-line is not encountered
output characters to Apache;

if <% is encountered
{
set state to ASP;
execute rest of line;
}

if end-of-line is encountered
return;
}

//This method executes the ASP-JavaScript code
//Execute method
{
while %> or end-of-line or ; not encountered
{
if ASP-function-call exist
{
execute parameter of ASP-function-call;
executeASP ASP-function-call;
executeJS stuff before function call + result of function call;
}
else
executeJS line;
}

if %> is encountered
{
set state to HTML;
output rest of line;
}

if end-of-line or ; encountered
return;
}


Let's hope we continue at a fair clip from now on.