HTML+Javascript+VB

今日読んだ論文.Webアプリケーションでいろんな言語が混ざった状態のを解析する手法.

Robust multilingual parsing using island grammars, Nikita Synytskyy, James R. Cordy, Thomas R. Dean October 2003 Proceedings of the 2003 conference of the Centre for Advanced Studies on Collaborative research CASCON '03

<html>
<script>
function capitalize() {
  //capitalize the string
  temp= new String (theForm.textbox.value)
  theForm.textbox.value =
  temp.toUpperCase()
}
</script>
Welcome to our sample ASP page!
<%
txtValue = Request.Form("textbox")
if (txtValue <> "") then
  rem we have submissions, so
  rem display the value of txtValue
%>
  <table border=1>
  <tr><td>
   You typed in: <% =txtValue %>
  </td></tr>
  </table>
<%
else
    ’display the form for collecting data
%>
  <form action="sample.asp" name=theForm onSubmit="capitalize()">
    <input type="text" name="textbox" value="Type Something Here">
  <br>
    <input type="submit" value="Submit">
</form>
<%
end if
%>
</html>

みたいなプログラムにおいて,「ここはVB」「ここはHTML」という判別をしてくれるらしい.

Island Grammar ってのは, たとえばVBという島 からみるとHTML は海というように,構造をもったものか, 単なる字の羅列とみるかという観点を変化させながら解析していくものらしい.よく読んでない