mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 10:49:26 +03:00
27dd121d14
git-subtree-dir: outside/re2 git-subtree-mainline: f94738bfd171ae447133e0964843addbb497894f git-subtree-split: 539b44fc4c5a49c3453b80e3af85d297f4cab4bf
43 lines
1.1 KiB
Bash
Executable File
43 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
cp syntax.txt syntax.html
|
|
sam -d syntax.html <<'!'
|
|
,s/\&/\&/g
|
|
,s/</\</g
|
|
,s/>/\>/g
|
|
,s!== (([^()]|\([^()]*\))*)!≡ <code>\1</code>!g
|
|
,s!«!<code>!g
|
|
,s!»!</code>!g
|
|
,s! vim$! <font size=-2>VIM</font>!g
|
|
,s! pcre$! <font size=-2>PCRE</font>!g
|
|
,s! perl$! <font size=-2>PERL</font>!g
|
|
,x g/NOT SUPPORTED/ s!^[^ ]+!<font color=#808080>&</font>!
|
|
,s!NOT SUPPORTED!!g
|
|
,s!(^[^ ]+) (.*)\n!<tr><td><code>\1</code></td><td>\2</td></tr>\n!g
|
|
,s!.*:$!<b>&</b>!g
|
|
,s!^$!<tr><td></td></tr>!g
|
|
,x v/<tr>/ s!.*!<tr><td colspan=2>&</td></tr>!
|
|
1,2c
|
|
<html>
|
|
<!-- AUTOMATICALLY GENERATED by mksyntaxhtml -->
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<title>RE2 regular expression syntax reference</title>
|
|
</head>
|
|
<body>
|
|
<h1>RE2 regular expression syntax reference</h1>
|
|
|
|
<table border=0 cellpadding=2 cellspacing=2>
|
|
<tr><td colspan=2>This page lists the regular expression syntax accepted by RE2.</td></tr>
|
|
<tr><td colspan=2>It also lists syntax accepted by PCRE, PERL, and VIM.</td></tr>
|
|
<tr><td colspan=2>Grayed out expressions are not supported by RE2.</td></tr>
|
|
.
|
|
$a
|
|
</table>
|
|
</body>
|
|
</html>
|
|
.
|
|
w
|
|
q
|
|
!
|