From bbbbc70a0b2efcd03bbcaf4e08ac139e7969e608 Mon Sep 17 00:00:00 2001 From: murphy Date: Mon, 7 Jan 2008 14:17:43 +0000 Subject: Added etc/todo (scanner drafts) and two TextMate project files. --- .../darcs/coderay/_darcs/checkpoints/index.html | 11 ++ .../darcs/coderay/_darcs/index.html | 17 ++ .../darcs/coderay/_darcs/index.html@C=D;O=A | 17 ++ .../darcs/coderay/_darcs/index.html@C=M;O=A | 17 ++ .../darcs/coderay/_darcs/index.html@C=N;O=D | 17 ++ .../darcs/coderay/_darcs/index.html@C=S;O=A | 17 ++ .../darcs/coderay/_darcs/inventories/index.html | 11 ++ .../darcs/coderay/_darcs/inventory | 17 ++ .../darcs/coderay/_darcs/patches/index.html | 18 ++ .../darcs/coderay/_darcs/prefs/index.html | 16 ++ .../darcs/coderay/_darcs/pristine/index.html | 13 ++ etc/todo/www.demiurgo.org/darcs/coderay/index.html | 14 ++ .../darcs/coderay/index.html@C=D;O=A | 14 ++ .../darcs/coderay/index.html@C=D;O=D | 14 ++ .../darcs/coderay/index.html@C=M;O=A | 14 ++ .../darcs/coderay/index.html@C=M;O=D | 14 ++ .../darcs/coderay/index.html@C=N;O=A | 14 ++ .../darcs/coderay/index.html@C=N;O=D | 14 ++ .../darcs/coderay/index.html@C=S;O=A | 14 ++ .../darcs/coderay/index.html@C=S;O=D | 14 ++ .../darcs/coderay/lib/coderay/encoders/index.html | 12 ++ .../lib/coderay/encoders/index.html@C=D;O=A | 12 ++ .../lib/coderay/encoders/index.html@C=M;O=A | 12 ++ .../lib/coderay/encoders/index.html@C=N;O=D | 12 ++ .../lib/coderay/encoders/index.html@C=S;O=A | 12 ++ .../darcs/coderay/lib/coderay/encoders/latex.rb | 79 ++++++++ .../darcs/coderay/lib/coderay/index.html | 13 ++ .../darcs/coderay/lib/coderay/index.html@C=D;O=A | 13 ++ .../darcs/coderay/lib/coderay/index.html@C=D;O=D | 13 ++ .../darcs/coderay/lib/coderay/index.html@C=M;O=A | 13 ++ .../darcs/coderay/lib/coderay/index.html@C=M;O=D | 13 ++ .../darcs/coderay/lib/coderay/index.html@C=N;O=A | 13 ++ .../darcs/coderay/lib/coderay/index.html@C=N;O=D | 13 ++ .../darcs/coderay/lib/coderay/index.html@C=S;O=A | 13 ++ .../darcs/coderay/lib/coderay/index.html@C=S;O=D | 13 ++ .../darcs/coderay/lib/coderay/scanners/index.html | 13 ++ .../lib/coderay/scanners/index.html@C=D;O=A | 13 ++ .../lib/coderay/scanners/index.html@C=M;O=A | 13 ++ .../lib/coderay/scanners/index.html@C=N;O=D | 13 ++ .../lib/coderay/scanners/index.html@C=S;O=A | 13 ++ .../coderay/lib/coderay/scanners/javascript.rb | 199 +++++++++++++++++++++ .../lib/coderay/scanners/javascript/index.html | 12 ++ .../www.demiurgo.org/darcs/coderay/lib/index.html | 12 ++ .../darcs/coderay/lib/index.html@C=D;O=A | 12 ++ .../darcs/coderay/lib/index.html@C=D;O=D | 12 ++ .../darcs/coderay/lib/index.html@C=M;O=A | 12 ++ .../darcs/coderay/lib/index.html@C=M;O=D | 12 ++ .../darcs/coderay/lib/index.html@C=N;O=A | 12 ++ .../darcs/coderay/lib/index.html@C=N;O=D | 12 ++ .../darcs/coderay/lib/index.html@C=S;O=A | 12 ++ .../darcs/coderay/lib/index.html@C=S;O=D | 12 ++ .../www.demiurgo.org/darcs/coderay/test/index.html | 13 ++ .../darcs/coderay/test/index.html@C=D;O=A | 13 ++ .../darcs/coderay/test/index.html@C=M;O=A | 13 ++ .../darcs/coderay/test/index.html@C=N;O=D | 13 ++ .../darcs/coderay/test/index.html@C=S;O=A | 13 ++ .../darcs/coderay/test/test_javascript_scanner.rb | 104 +++++++++++ .../darcs/coderay/test/test_latex_encoder.rb | 103 +++++++++++ 58 files changed, 1209 insertions(+) create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/checkpoints/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=D;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=M;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=N;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=S;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventories/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventory create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/patches/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/prefs/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/_darcs/pristine/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=D;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=M;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=N;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=S;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/latex.rb create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=D;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=M;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=N;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=S;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript.rb create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=D;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=M;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=N;O=D create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=S;O=A create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/test/test_javascript_scanner.rb create mode 100755 etc/todo/www.demiurgo.org/darcs/coderay/test/test_latex_encoder.rb (limited to 'etc/todo/www.demiurgo.org') diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/checkpoints/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/checkpoints/index.html new file mode 100755 index 0000000..a0a36d5 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/checkpoints/index.html @@ -0,0 +1,11 @@ + + + + Index of /darcs/coderay/_darcs/checkpoints + + +

Index of /darcs/coderay/_darcs/checkpoints

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html new file mode 100755 index 0000000..f6a7303 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html @@ -0,0 +1,17 @@ + + + + Index of /darcs/coderay/_darcs + + +

Index of /darcs/coderay/_darcs

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] checkpoints/ 23-Sep-2006 21:34 - +[DIR] inventories/ 23-Sep-2006 21:34 - +[TXT] inventory 28-Sep-2006 00:48 825 +[DIR] patches/ 28-Sep-2006 00:48 - +[DIR] prefs/ 23-Sep-2006 21:34 - +[DIR] pristine/ 23-Sep-2006 21:34 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=D;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=D;O=A new file mode 100755 index 0000000..df9ef0b --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=D;O=A @@ -0,0 +1,17 @@ + + + + Index of /darcs/coderay/_darcs + + +

Index of /darcs/coderay/_darcs

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] checkpoints/ 23-Sep-2006 21:34 - +[DIR] inventories/ 23-Sep-2006 21:34 - +[TXT] inventory 28-Sep-2006 00:48 825 +[DIR] patches/ 28-Sep-2006 00:48 - +[DIR] prefs/ 23-Sep-2006 21:34 - +[DIR] pristine/ 23-Sep-2006 21:34 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=M;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=M;O=A new file mode 100755 index 0000000..533958d --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=M;O=A @@ -0,0 +1,17 @@ + + + + Index of /darcs/coderay/_darcs + + +

Index of /darcs/coderay/_darcs

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] checkpoints/ 23-Sep-2006 21:34 - +[DIR] inventories/ 23-Sep-2006 21:34 - +[DIR] prefs/ 23-Sep-2006 21:34 - +[DIR] pristine/ 23-Sep-2006 21:34 - +[TXT] inventory 28-Sep-2006 00:48 825 +[DIR] patches/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=N;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=N;O=D new file mode 100755 index 0000000..a175ae6 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=N;O=D @@ -0,0 +1,17 @@ + + + + Index of /darcs/coderay/_darcs + + +

Index of /darcs/coderay/_darcs

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] pristine/ 23-Sep-2006 21:34 - +[DIR] prefs/ 23-Sep-2006 21:34 - +[DIR] patches/ 28-Sep-2006 00:48 - +[TXT] inventory 28-Sep-2006 00:48 825 +[DIR] inventories/ 23-Sep-2006 21:34 - +[DIR] checkpoints/ 23-Sep-2006 21:34 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=S;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=S;O=A new file mode 100755 index 0000000..0ac3f12 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/index.html@C=S;O=A @@ -0,0 +1,17 @@ + + + + Index of /darcs/coderay/_darcs + + +

Index of /darcs/coderay/_darcs

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] checkpoints/ 23-Sep-2006 21:34 - +[DIR] inventories/ 23-Sep-2006 21:34 - +[DIR] patches/ 28-Sep-2006 00:48 - +[DIR] prefs/ 23-Sep-2006 21:34 - +[DIR] pristine/ 23-Sep-2006 21:34 - +[TXT] inventory 28-Sep-2006 00:48 825 +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventories/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventories/index.html new file mode 100755 index 0000000..f6d1d38 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventories/index.html @@ -0,0 +1,11 @@ + + + + Index of /darcs/coderay/_darcs/inventories + + +

Index of /darcs/coderay/_darcs/inventories

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventory b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventory new file mode 100755 index 0000000..a7a8470 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/inventory @@ -0,0 +1,17 @@ +[First version +zoso@foton.es**20060923203447] [Add :wrap option to the LaTeX encoder +zoso@foton.es**20060924125211] +[Remove all non-alphanumeric characters from LaTeX commands +zoso@foton.es**20060924143810] +[Use \synbs instead of $\backslash$, seems to work better in verbatim +zoso@foton.es**20060924143837] +[Add a very basic Javascript scanner (adapted Ruby scanner) +zoso@foton.es**20060924154208] +[Improve LaTeX special character escaping +zoso@foton.es**20060927233750 + * Rewrite Latex#escape_latex method, so it uses only one pass (avoids some + escape-the-already-escaped-characters problems and it's probably faster) + * Now backslashes are substituted by "\synbs{}", to avoid problems with letters + that could be just after the \synbs, turning it into another, undefined + command like "\synbsn" or something +] diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/patches/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/patches/index.html new file mode 100755 index 0000000..85ec1c7 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/patches/index.html @@ -0,0 +1,18 @@ + + + + Index of /darcs/coderay/_darcs/patches + + +

Index of /darcs/coderay/_darcs/patches

+
Icon  Name                                                             Last modified      Size  Description
[DIR] Parent Directory - +[CMP] 20060923203447-5140e-df04368a13906528ef99e9ab5718624532f05b31.gz 23-Sep-2006 21:34 1.4K +[CMP] 20060924125211-5140e-ea83d35d45314665af86e1bd2eeda952f953dd43.gz 24-Sep-2006 13:52 702 +[CMP] 20060924143810-5140e-a52edb9676be4736a6042e1607be7939e5ec3f28.gz 24-Sep-2006 15:39 250 +[CMP] 20060924143837-5140e-880669c10c7a8b9e8e601724eccce9fff3917f44.gz 24-Sep-2006 15:39 432 +[CMP] 20060924154208-5140e-8cc8c6fbe46d11ab2493b4206c8cc259c01bb883.gz 24-Sep-2006 16:58 3.3K +[CMP] 20060927233750-5140e-589da45a369c268f1acb9fad63e9e3f3c8dd01b8.gz 28-Sep-2006 00:48 795 +[   ] pending 28-Sep-2006 00:48 4 +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/prefs/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/prefs/index.html new file mode 100755 index 0000000..5288084 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/prefs/index.html @@ -0,0 +1,16 @@ + + + + Index of /darcs/coderay/_darcs/prefs + + +

Index of /darcs/coderay/_darcs/prefs

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[   ] binaries 23-Sep-2006 21:34 395 +[   ] boring 23-Sep-2006 21:34 534 +[   ] defaultrepo 23-Sep-2006 21:34 28 +[TXT] motd 23-Sep-2006 21:34 0 +[   ] repos 23-Sep-2006 21:34 28 +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/pristine/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/pristine/index.html new file mode 100755 index 0000000..14bd055 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/_darcs/pristine/index.html @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/_darcs/pristine + + +

Index of /darcs/coderay/_darcs/pristine

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] lib/ 23-Sep-2006 21:34 - +[DIR] test/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/index.html new file mode 100755 index 0000000..d1b3aec --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/index.html @@ -0,0 +1,14 @@ + + + + Index of /darcs/coderay + + +

Index of /darcs/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] _darcs/ 28-Sep-2006 00:48 - +[DIR] lib/ 23-Sep-2006 21:34 - +[DIR] test/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=A new file mode 100755 index 0000000..3cc4074 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=A @@ -0,0 +1,14 @@ + + + + Index of /darcs/coderay + + +

Index of /darcs/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] _darcs/ 28-Sep-2006 00:48 - +[DIR] lib/ 23-Sep-2006 21:34 - +[DIR] test/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=D new file mode 100755 index 0000000..8f9e380 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=D;O=D @@ -0,0 +1,14 @@ + + + + Index of /darcs/coderay + + +

Index of /darcs/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] test/ 28-Sep-2006 00:48 - +[DIR] lib/ 23-Sep-2006 21:34 - +[DIR] _darcs/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=A new file mode 100755 index 0000000..9606f9a --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=A @@ -0,0 +1,14 @@ + + + + Index of /darcs/coderay + + +

Index of /darcs/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] lib/ 23-Sep-2006 21:34 - +[DIR] _darcs/ 28-Sep-2006 00:48 - +[DIR] test/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=D new file mode 100755 index 0000000..00a778c --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=M;O=D @@ -0,0 +1,14 @@ + + + + Index of /darcs/coderay + + +

Index of /darcs/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] test/ 28-Sep-2006 00:48 - +[DIR] _darcs/ 28-Sep-2006 00:48 - +[DIR] lib/ 23-Sep-2006 21:34 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=A new file mode 100755 index 0000000..d1b3aec --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=A @@ -0,0 +1,14 @@ + + + + Index of /darcs/coderay + + +

Index of /darcs/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] _darcs/ 28-Sep-2006 00:48 - +[DIR] lib/ 23-Sep-2006 21:34 - +[DIR] test/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=D new file mode 100755 index 0000000..8f9e380 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=N;O=D @@ -0,0 +1,14 @@ + + + + Index of /darcs/coderay + + +

Index of /darcs/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] test/ 28-Sep-2006 00:48 - +[DIR] lib/ 23-Sep-2006 21:34 - +[DIR] _darcs/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=A new file mode 100755 index 0000000..a191676 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=A @@ -0,0 +1,14 @@ + + + + Index of /darcs/coderay + + +

Index of /darcs/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] _darcs/ 28-Sep-2006 00:48 - +[DIR] lib/ 23-Sep-2006 21:34 - +[DIR] test/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=D new file mode 100755 index 0000000..8f9e380 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/index.html@C=S;O=D @@ -0,0 +1,14 @@ + + + + Index of /darcs/coderay + + +

Index of /darcs/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] test/ 28-Sep-2006 00:48 - +[DIR] lib/ 23-Sep-2006 21:34 - +[DIR] _darcs/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html new file mode 100755 index 0000000..7ebac3a --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib/coderay/encoders + + +

Index of /darcs/coderay/lib/coderay/encoders

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[   ] latex.rb 28-Sep-2006 00:48 1.4K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=D;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=D;O=A new file mode 100755 index 0000000..7c7a8c4 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=D;O=A @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib/coderay/encoders + + +

Index of /darcs/coderay/lib/coderay/encoders

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[   ] latex.rb 28-Sep-2006 00:48 1.4K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=M;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=M;O=A new file mode 100755 index 0000000..9d9cd59 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=M;O=A @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib/coderay/encoders + + +

Index of /darcs/coderay/lib/coderay/encoders

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[   ] latex.rb 28-Sep-2006 00:48 1.4K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=N;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=N;O=D new file mode 100755 index 0000000..339f519 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=N;O=D @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib/coderay/encoders + + +

Index of /darcs/coderay/lib/coderay/encoders

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[   ] latex.rb 28-Sep-2006 00:48 1.4K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=S;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=S;O=A new file mode 100755 index 0000000..0d5687f --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/index.html@C=S;O=A @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib/coderay/encoders + + +

Index of /darcs/coderay/lib/coderay/encoders

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[   ] latex.rb 28-Sep-2006 00:48 1.4K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/latex.rb b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/latex.rb new file mode 100755 index 0000000..0a54872 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/encoders/latex.rb @@ -0,0 +1,79 @@ +module CodeRay +module Encoders + + # = LaTeX Encoder + # + # Encoder producing LaTeX. + class Latex < Encoder + + include Streamable + register_for :latex + + FILE_EXTENSION = 'tex' + + DEFAULT_OPTIONS = { + :wrap => true, + } + + protected + def text_token text, kind + @out << + if kind == :space + text + else + text = escape_latex(text) + "\\syn#{kind_to_command(kind)}{#{text}}" + end + end + + def block_token action, kind + @out << super + end + + def open_token kind + "\\syn#{kind_to_command(kind)}{" + end + + def close_token kind + "}" + end + + def kind_to_command kind + kind.to_s.gsub(/[^a-z0-9]/i, '').to_sym + end + + def finish options + case options[:wrap] + when true, 1, :semiverbatim + @out = "\\begin{semiverbatim}\n#{@out}\n\\end{semiverbatim}\n" + when false, 0 + # Nothing to do + else + raise ArgumentError, "Unknown :wrap option: '#{options[:wrap]}'" + end + + super + end + + # Escape text so it's interpreted literally by LaTeX compilers + def escape_latex string + string.to_s.gsub(/[$\\{}_%#&~^"]/) do |s| + case s + when '$' + '\$' + when '\\' + '\synbs{}' + when /[{}_%#&]/ + "\\#{s}" + when /[~^]/ + "\\#{s}{}" + when '"' + '"{}' + end + end + end + + end + +end +end diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html new file mode 100755 index 0000000..a23f094 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay + + +

Index of /darcs/coderay/lib/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] encoders/ 28-Sep-2006 00:48 - +[DIR] scanners/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=A new file mode 100755 index 0000000..9c255dc --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay + + +

Index of /darcs/coderay/lib/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] encoders/ 28-Sep-2006 00:48 - +[DIR] scanners/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=D new file mode 100755 index 0000000..79e6552 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=D;O=D @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay + + +

Index of /darcs/coderay/lib/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] scanners/ 24-Sep-2006 16:58 - +[DIR] encoders/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=A new file mode 100755 index 0000000..36ef38c --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay + + +

Index of /darcs/coderay/lib/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] scanners/ 24-Sep-2006 16:58 - +[DIR] encoders/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=D new file mode 100755 index 0000000..55e3bee --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=M;O=D @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay + + +

Index of /darcs/coderay/lib/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] encoders/ 28-Sep-2006 00:48 - +[DIR] scanners/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=A new file mode 100755 index 0000000..a23f094 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay + + +

Index of /darcs/coderay/lib/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] encoders/ 28-Sep-2006 00:48 - +[DIR] scanners/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=D new file mode 100755 index 0000000..79e6552 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=N;O=D @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay + + +

Index of /darcs/coderay/lib/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] scanners/ 24-Sep-2006 16:58 - +[DIR] encoders/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=A new file mode 100755 index 0000000..00c2252 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay + + +

Index of /darcs/coderay/lib/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] encoders/ 28-Sep-2006 00:48 - +[DIR] scanners/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=D new file mode 100755 index 0000000..79e6552 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/index.html@C=S;O=D @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay + + +

Index of /darcs/coderay/lib/coderay

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] scanners/ 24-Sep-2006 16:58 - +[DIR] encoders/ 28-Sep-2006 00:48 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html new file mode 100755 index 0000000..a35fdd7 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay/scanners + + +

Index of /darcs/coderay/lib/coderay/scanners

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[   ] javascript.rb 24-Sep-2006 16:58 5.5K +[DIR] javascript/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=D;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=D;O=A new file mode 100755 index 0000000..9b896d4 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=D;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay/scanners + + +

Index of /darcs/coderay/lib/coderay/scanners

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[   ] javascript.rb 24-Sep-2006 16:58 5.5K +[DIR] javascript/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=M;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=M;O=A new file mode 100755 index 0000000..6860db0 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=M;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay/scanners + + +

Index of /darcs/coderay/lib/coderay/scanners

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[   ] javascript.rb 24-Sep-2006 16:58 5.5K +[DIR] javascript/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=N;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=N;O=D new file mode 100755 index 0000000..e34a9bd --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=N;O=D @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay/scanners + + +

Index of /darcs/coderay/lib/coderay/scanners

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[DIR] javascript/ 24-Sep-2006 16:58 - +[   ] javascript.rb 24-Sep-2006 16:58 5.5K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=S;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=S;O=A new file mode 100755 index 0000000..a92141d --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/index.html@C=S;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/lib/coderay/scanners + + +

Index of /darcs/coderay/lib/coderay/scanners

+
Icon  Name                        Last modified      Size  Description
[DIR] Parent Directory - +[DIR] javascript/ 24-Sep-2006 16:58 - +[   ] javascript.rb 24-Sep-2006 16:58 5.5K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript.rb b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript.rb new file mode 100755 index 0000000..da67084 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript.rb @@ -0,0 +1,199 @@ +module CodeRay +module Scanners + + # Basic Javascript scanner + class Javascript < Scanner + + include Streamable + + register_for :javascript + + helper :patterns + + DEFAULT_OPTIONS = { + } + + private + def scan_tokens tokens, options + first_bake = saved_tokens = nil + last_token_dot = false + last_state = nil + state = :initial + depth = nil + inline_block_stack = [] + + patterns = Patterns # avoid constant lookup + + until eos? + match = nil + kind = nil + + if state.instance_of? patterns::StringState +# {{{ + match = scan_until(state.pattern) || scan_until(/\z/) + tokens << [match, :content] unless match.empty? + break if eos? + + case match = getch + + when state.delim + if state.paren + state.paren_depth -= 1 + if state.paren_depth > 0 + tokens << [match, :nesting_delimiter] + next + end + end + tokens << [match, :delimiter] + tokens << [:close, state.type] + state = state.next_state + + when '\\' + if state.interpreted + if esc = scan(/ #{patterns::ESCAPE} /ox) + tokens << [match + esc, :char] + else + tokens << [match, :error] + end + else + case m = getch + when state.delim, '\\' + tokens << [match + m, :char] + when nil + tokens << [match, :error] + else + tokens << [match + m, :content] + end + end + + when '#' + case peek(1)[0] + when ?{ + inline_block_stack << [state, depth] + state = :initial + depth = 1 + tokens << [:open, :inline] + tokens << [match + getch, :delimiter] + when ?$, ?@ + tokens << [match, :escape] + last_state = state # scan one token as normal code, then return here + state = :initial + else + raise_inspect 'else-case # reached; #%p not handled' % peek(1), tokens + end + + when state.paren + state.paren_depth += 1 + tokens << [match, :nesting_delimiter] + + else + raise_inspect 'else-case " reached; %p not handled, state = %p' % [match, state], tokens + + end + next +# }}} + else +# {{{ + if match = scan(/ [ \t\f]+ | \\? \n | \# .* /x) + case m = match[0] + when ?\s, ?\t, ?\f + match << scan(/\s*/) unless eos? + kind = :space + when ?\n, ?\\ + kind = :space + match << scan(/\s*/) unless eos? + when ?#, ?=, ?_ + kind = :comment + else + raise_inspect 'else-case _ reached, because case %p was not handled' % [matched[0].chr], tokens + end + tokens << [match, kind] + next + + elsif state == :initial + + # IDENTS # + if match = scan(/#{patterns::METHOD_NAME}/o) + kind = last_token_dot ? :ident : + patterns::IDENT_KIND[match] + + # OPERATORS # + elsif (not last_token_dot and match = scan(/ ==?=? | \.\.?\.? | [\(\)\[\]\{\}] | :: | , /x)) or + (last_token_dot and match = scan(/#{patterns::METHOD_NAME_OPERATOR}/o)) + last_token_dot = :set if match == '.' or match == '::' + kind = :operator + unless inline_block_stack.empty? + case match + when '{' + depth += 1 + when '}' + depth -= 1 + if depth == 0 # closing brace of inline block reached + state, depth = inline_block_stack.pop + tokens << [match, :delimiter] + kind = :inline + match = :close + end + end + end + + elsif match = scan(/ ['"] /mx) + tokens << [:open, :string] + kind = :delimiter + state = patterns::StringState.new :string, match == '"', match # important for streaming + + elsif match = scan(/#{patterns::NUMERIC}/o) + kind = if self[1] then :float else :integer end + + elsif match = scan(/ \+\+ | -- | << | >> /x) + kind = :operator + + elsif match = scan(/ [-+!~^]=? | [*|&]{1,2}=? | >>? /x) + kind = :operator + + elsif match = scan(/ [\/%]=? | <(?:<|=>?)? | [?:;] /x) + kind = :operator + + else + kind = :error + match = getch + + end + + end +# }}} + + last_token_dot = last_token_dot == :set + + if $DEBUG and not kind + raise_inspect 'Error token %p in line %d' % + [[match, kind], line], tokens, state + end + raise_inspect 'Empty token', tokens unless match + + tokens << [match, kind] + + if last_state + state = last_state + last_state = nil + end + end + end + + inline_block_stack << [state] if state.is_a? patterns::StringState + until inline_block_stack.empty? + this_block = inline_block_stack.pop + tokens << [:close, :inline] if this_block.size > 1 + state = this_block.first + tokens << [:close, state.type] + end + + tokens + end + + end + +end +end + +# vim:fdm=marker diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript/index.html new file mode 100755 index 0000000..9a3769c --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/coderay/scanners/javascript/index.html @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib/coderay/scanners/javascript + + +

Index of /darcs/coderay/lib/coderay/scanners/javascript

+
Icon  Name                                 Last modified      Size  Description
[DIR] Parent Directory - +[TXT] patterns.rb 24-Sep-2006 16:58 2.5K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html new file mode 100755 index 0000000..af2e071 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib + + +

Index of /darcs/coderay/lib

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] coderay/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=A new file mode 100755 index 0000000..6c8f2f8 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=A @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib + + +

Index of /darcs/coderay/lib

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] coderay/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=D new file mode 100755 index 0000000..80551b7 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=D;O=D @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib + + +

Index of /darcs/coderay/lib

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] coderay/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=A new file mode 100755 index 0000000..27bdbd0 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=A @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib + + +

Index of /darcs/coderay/lib

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] coderay/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=D new file mode 100755 index 0000000..80551b7 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=M;O=D @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib + + +

Index of /darcs/coderay/lib

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] coderay/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=A new file mode 100755 index 0000000..af2e071 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=A @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib + + +

Index of /darcs/coderay/lib

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] coderay/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=D new file mode 100755 index 0000000..80551b7 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=N;O=D @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib + + +

Index of /darcs/coderay/lib

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] coderay/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=A new file mode 100755 index 0000000..224354b --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=A @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib + + +

Index of /darcs/coderay/lib

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] coderay/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=D new file mode 100755 index 0000000..80551b7 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/lib/index.html@C=S;O=D @@ -0,0 +1,12 @@ + + + + Index of /darcs/coderay/lib + + +

Index of /darcs/coderay/lib

+
Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - +[DIR] coderay/ 24-Sep-2006 16:58 - +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html new file mode 100755 index 0000000..8d79e63 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/test + + +

Index of /darcs/coderay/test

+
Icon  Name                       Last modified      Size  Description
[DIR] Parent Directory - +[   ] test_javascript_scanner.rb 24-Sep-2006 16:58 3.9K +[TXT] test_latex_encoder.rb 28-Sep-2006 00:48 4.0K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=D;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=D;O=A new file mode 100755 index 0000000..d3e4481 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=D;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/test + + +

Index of /darcs/coderay/test

+
Icon  Name                       Last modified      Size  Description
[DIR] Parent Directory - +[   ] test_javascript_scanner.rb 24-Sep-2006 16:58 3.9K +[TXT] test_latex_encoder.rb 28-Sep-2006 00:48 4.0K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=M;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=M;O=A new file mode 100755 index 0000000..0fa49ac --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=M;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/test + + +

Index of /darcs/coderay/test

+
Icon  Name                       Last modified      Size  Description
[DIR] Parent Directory - +[   ] test_javascript_scanner.rb 24-Sep-2006 16:58 3.9K +[TXT] test_latex_encoder.rb 28-Sep-2006 00:48 4.0K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=N;O=D b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=N;O=D new file mode 100755 index 0000000..81f5381 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=N;O=D @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/test + + +

Index of /darcs/coderay/test

+
Icon  Name                       Last modified      Size  Description
[DIR] Parent Directory - +[TXT] test_latex_encoder.rb 28-Sep-2006 00:48 4.0K +[   ] test_javascript_scanner.rb 24-Sep-2006 16:58 3.9K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=S;O=A b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=S;O=A new file mode 100755 index 0000000..fd7e1e9 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/test/index.html@C=S;O=A @@ -0,0 +1,13 @@ + + + + Index of /darcs/coderay/test + + +

Index of /darcs/coderay/test

+
Icon  Name                       Last modified      Size  Description
[DIR] Parent Directory - +[   ] test_javascript_scanner.rb 24-Sep-2006 16:58 3.9K +[TXT] test_latex_encoder.rb 28-Sep-2006 00:48 4.0K +
+
Apache/2.0.46 (CentOS) Server at www.demiurgo.org Port 80
+ diff --git a/etc/todo/www.demiurgo.org/darcs/coderay/test/test_javascript_scanner.rb b/etc/todo/www.demiurgo.org/darcs/coderay/test/test_javascript_scanner.rb new file mode 100755 index 0000000..e1bfe70 --- /dev/null +++ b/etc/todo/www.demiurgo.org/darcs/coderay/test/test_javascript_scanner.rb @@ -0,0 +1,104 @@ +require 'test/unit' +require 'coderay' + +class TC_Latex_Encoder < Test::Unit::TestCase + def setup + CodeRay::Encoders.plugin_path 'lib/coderay/encoders' + @enc = CodeRay::Encoders[:latex].new + end + + + def test_simple + source_text = < "I have \\$30, and new\\synbs{}\nline", + 'I like "clean & simple" things just best than {obscure,complicated}' => 'I like "{}clean \& simple"{} things just best than \{obscure,complicated\}', + "The string '\\'' is valid... in C" => "The string '\\synbs{}'' is valid... in C", + "Escape dollars as \\$, and continue line, backslash at the end, like so: \\\n" => "Escape dollars as \\synbs{}\\$, and continue line, backslash at the end, like so: \\synbs{}\n", + "Perl: $foo{some_key} =~ /^#.*$/" => "Perl: \\$foo\\{some\\_key\\} =\\~{} /\\^{}\\#.*\\$/", + "Double backslash escaping: \\\\" => "Double backslash escaping: \\synbs{}\\synbs{}", + "\"Some\nmultiline\nstring\"" => "\"{}Some\nmultiline\nstring\"{}", + "printf(\"Hello, World\\n\");" => "printf(\"{}Hello, World\\synbs{}n\"{});"} + tests.each_pair do |k,v| + assert_equal(v, @enc.send(:escape_latex, k)) + end + end + + + def test_simple + source_text = < false)) + assert_equal(expected_latex2, symbols.latex) + assert_equal(expected_latex2, symbols.latex(:wrap => true)) + assert_equal(expected_latex2, symbols.latex(:wrap => :semiverbatim)) + end + + def teardown + @enc = nil + end +end -- cgit v1.2.1