25 |
$class->use or die $@; |
$class->use or die $@; |
26 |
my $parser = $class->new; |
my $parser = $class->new; |
27 |
|
|
28 |
|
my $footer = q[ |
29 |
|
<footer> |
30 |
|
[<a href="input">Input</a>] |
31 |
|
[<a href="../doc/readme">Source</a>] |
32 |
|
</footer> |
33 |
|
]; |
34 |
|
|
35 |
my @error; |
my @error; |
36 |
$parser->onerror (sub { |
$parser->onerror (sub { |
37 |
my %args = @_; |
my %args = @_; |
65 |
print "Content-Type: text/html; charset=utf-8\n\n"; |
print "Content-Type: text/html; charset=utf-8\n\n"; |
66 |
print q[<!DOCTYPE HTML><html lang=en> |
print q[<!DOCTYPE HTML><html lang=en> |
67 |
<title>Regular expression visualizer: ], $eregexp, q[</title> |
<title>Regular expression visualizer: ], $eregexp, q[</title> |
68 |
<link rel="stylesheet" href="/www/style/html/xhtml"/> |
<link rel="stylesheet" href="/www/style/html/xhtml"> |
69 |
</head> |
|
|
<body> |
|
70 |
<h1>Regular expression visualizer</h1> |
<h1>Regular expression visualizer</h1> |
71 |
|
|
72 |
<p>Input: <code>], $eregexp, q[</code></p> |
<p>Input: <code>], $eregexp, q[</code></p> |
76 |
print join '', @error; |
print join '', @error; |
77 |
print q[</ul>]; |
print q[</ul>]; |
78 |
|
|
79 |
|
print $footer; |
80 |
|
|
81 |
exit; |
exit; |
82 |
} |
} |
83 |
|
|
111 |
print "</section>\n"; |
print "</section>\n"; |
112 |
} |
} |
113 |
|
|
114 |
print q[</body></html>]; |
print $footer; |
115 |
|
|
116 |
|
print q[</body></html>]; |