rubylexer 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +90 -0
- data/Manifest.txt +54 -3
- data/README.txt +4 -7
- data/Rakefile +3 -2
- data/lib/rubylexer.rb +856 -323
- data/lib/rubylexer/0.7.0.rb +11 -2
- data/lib/rubylexer/0.7.1.rb +2 -0
- data/lib/rubylexer/charhandler.rb +4 -4
- data/lib/rubylexer/context.rb +86 -9
- data/lib/rubylexer/rulexer.rb +455 -101
- data/lib/rubylexer/token.rb +166 -43
- data/lib/rubylexer/tokenprinter.rb +16 -8
- data/lib/rubylexer/version.rb +1 -1
- data/rubylexer.vpj +98 -0
- data/test/code/all_the_gems.rb +33 -0
- data/test/code/all_the_raas.rb +226 -0
- data/test/code/all_the_rubies.rb +2 -0
- data/test/code/deletewarns.rb +19 -1
- data/test/code/dumptokens.rb +39 -8
- data/test/code/errscan +2 -0
- data/test/code/isolate_error.rb +72 -0
- data/test/code/lexloop +14 -0
- data/test/code/locatetest.rb +150 -8
- data/test/code/regression.rb +109 -0
- data/test/code/rubylexervsruby.rb +53 -15
- data/test/code/strgen.rb +138 -0
- data/test/code/tarball.rb +144 -0
- data/test/code/testcases.rb +11 -0
- data/test/code/tokentest.rb +115 -24
- data/test/data/__eof2.rb +1 -0
- data/test/data/__eof5.rb +2 -0
- data/test/data/__eof6.rb +2 -0
- data/test/data/cvtesc.rb +17 -0
- data/test/data/g.rb +6 -0
- data/test/data/hd0.rb +3 -0
- data/test/data/hdateof.rb +2 -0
- data/test/data/hdempty.rb +3 -0
- data/test/data/hdr.rb +9 -0
- data/test/data/hdr_dos.rb +13 -0
- data/test/data/hdr_dos2.rb +18 -0
- data/test/data/heart.rb +2 -0
- data/test/data/here_escnl.rb +25 -0
- data/test/data/here_escnl_dos.rb +20 -0
- data/test/data/here_squote.rb +3 -0
- data/test/data/heremonsters.rb +140 -0
- data/test/data/heremonsters.rb.broken +68 -0
- data/test/data/heremonsters.rb.broken.save +68 -0
- data/test/data/heremonsters_dos.rb +140 -0
- data/test/data/heremonsters_dos.rb.broken +68 -0
- data/test/data/illegal_oneliners.rb +1 -0
- data/test/data/illegal_stanzas.rb +0 -0
- data/test/data/make_ws_strdelim.rb +22 -0
- data/test/data/maven2_builer_test.rb +82 -0
- data/test/data/migration.rb +8944 -0
- data/test/data/modl.rb +6 -0
- data/test/data/modl_dos.rb +7 -0
- data/test/data/modl_fails.rb +10 -0
- data/test/data/multilinestring.rb +6 -0
- data/test/data/oneliners.rb +555 -0
- data/test/data/p-op.rb +2 -0
- data/test/data/p.rb +3 -1710
- data/test/data/s.rb +90 -21
- data/test/data/simple.rb +1 -0
- data/test/data/simple_dos.rb +1 -0
- data/test/data/stanzas.rb +1194 -0
- data/test/data/strdelim_crlf.rb +6 -0
- data/test/data/stuff.rb +6 -0
- data/test/data/stuff2.rb +5 -0
- data/test/data/stuff3.rb +6 -0
- data/test/data/stuff4.rb +6 -0
- data/test/data/tkweird.rb +20 -0
- data/test/data/unending_stuff.rb +5 -0
- data/test/data/whatnot.rb +8 -0
- data/test/data/ws_strdelim.rb +0 -0
- data/test/test.sh +239 -0
- data/testing.txt +39 -50
- metadata +110 -12
- data/test/code/dl_all_gems.rb +0 -43
- data/test/code/unpack_all_gems.rb +0 -15
- data/test/data/gemlist.txt +0 -280
data/test/data/stuff.rb
ADDED
data/test/data/stuff2.rb
ADDED
data/test/data/stuff3.rb
ADDED
data/test/data/stuff4.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
WIDGET_DESTROY_HOOK = '<WIDGET_DESTROY_HOOK>'
|
2
|
+
INTERP._invoke_without_enc('event', 'add',
|
3
|
+
"<#{WIDGET_DESTROY_HOOK}>", '<Destroy>')
|
4
|
+
INTERP._invoke_without_enc('bind', 'all', "<#{WIDGET_DESTROY_HOOK}>",
|
5
|
+
install_cmd(proc{|path|
|
6
|
+
unless TkCore::INTERP.deleted?
|
7
|
+
begin
|
8
|
+
if (widget=TkCore::INTERP.tk_windows[path])
|
9
|
+
if widget.respond_to?(:__destroy_hook__)
|
10
|
+
widget.__destroy_hook__
|
11
|
+
end
|
12
|
+
end
|
13
|
+
rescue Exception=>e
|
14
|
+
p e if $DEBUG
|
15
|
+
end
|
16
|
+
end
|
17
|
+
}) << ' %W')
|
18
|
+
|
19
|
+
|
20
|
+
|
Binary file
|
data/test/test.sh
ADDED
@@ -0,0 +1,239 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# rubylexer - a ruby lexer written in ruby
|
3
|
+
# Copyright (C) 2004,2005 Caleb Clausen
|
4
|
+
#
|
5
|
+
# This library is free software; you can redistribute it and/or
|
6
|
+
# modify it under the terms of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation; either
|
8
|
+
# version 2.1 of the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this library; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
18
|
+
|
19
|
+
|
20
|
+
#export DEBUG=-rdebug
|
21
|
+
|
22
|
+
|
23
|
+
#export RUBYLEXERVSRUBY=testcode/rubylexervsruby.sh
|
24
|
+
test $RUBY || export RUBY=ruby
|
25
|
+
export RUBYLEXERVSRUBY="$RUBY testcode/rubylexervsruby.rb"
|
26
|
+
|
27
|
+
#ruma driver tests
|
28
|
+
#(disabled for now)
|
29
|
+
#./rumadriver.rb testdata/foobar.rm rulexer.rb
|
30
|
+
#exit
|
31
|
+
|
32
|
+
$RUBY -d $DEBUG testcode/tokentest.rb assert.rb | diff -ub testdata/tokentest.assert.rb.can -
|
33
|
+
#$RUBY -d $DEBUG testcode/tokentest.rb testdata/a | diff -ub testdata/tokentest.a.can -
|
34
|
+
$RUBYLEXERVSRUBY testdata/p.rb
|
35
|
+
$RUBYLEXERVSRUBY testdata/w.rb
|
36
|
+
$RUBYLEXERVSRUBY testdata/g.rb
|
37
|
+
|
38
|
+
|
39
|
+
$RUBYLEXERVSRUBY testdata/regtest.rb
|
40
|
+
|
41
|
+
$RUBYLEXERVSRUBY testdata/untitled1.rb
|
42
|
+
|
43
|
+
$RUBYLEXERVSRUBY /usr/lib/ruby/1.8/htree/template.rb #small diff, no semantic change
|
44
|
+
#set -e
|
45
|
+
|
46
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_libtcltk-ruby1.8_exmaples_sample_sample2.rb
|
47
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_image_size.rb
|
48
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_rexml_dtd_entitydecl.rb
|
49
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_rexml_dtd_notationdecl.rb
|
50
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_rexml_xpath.rb
|
51
|
+
#exit
|
52
|
+
#nil char at eof:
|
53
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/freebase/lib/freebase/databus.rb
|
54
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_fox_gui/editpane.rb
|
55
|
+
|
56
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_tools_fox_source_browser/basic_source_browser.rb
|
57
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_tk.rb
|
58
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_cgi.rb
|
59
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_fox_gui/appframe.rb
|
60
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_ruby1.8-examples_examples_test.rb
|
61
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_tools_source_parser/basic_parser.rb
|
62
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_commands/core_commands.rb
|
63
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_fox_gui/fxscintilla/scintilla.rb
|
64
|
+
$RUBYLEXERVSRUBY /usr/lib/ruby/1.8/rdoc/parsers/parse_c.rb
|
65
|
+
$RUBYLEXERVSRUBY /usr/share/doc/rdtool/examples/rdswap.rb.gz
|
66
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_cgi.rb
|
67
|
+
$RUBYLEXERVSRUBY domain.rb
|
68
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_optparse.rb
|
69
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_resolv.rb
|
70
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_resolv.rb
|
71
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_racc_output.rb
|
72
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_commands/key_manager.rb
|
73
|
+
$RUBYLEXERVSRUBY /usr/lib/ruby/1.8/progressbar.rb
|
74
|
+
$RUBYLEXERVSRUBY /usr/lib/ruby/1.8/yaml/rubytypes.rb
|
75
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_fox_gui/fxscintilla/ruby_colourize.rb
|
76
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_fox_gui/outputpane.rb
|
77
|
+
$RUBYLEXERVSRUBY /usr/lib/ruby/1.8/yaml/basenode.rb
|
78
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_fox_gui/fxscintilla/ruby_autoindent.rb
|
79
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libxtemplate-ruby1.8/examples/sample33.rb
|
80
|
+
$RUBYLEXERVSRUBY /usr/lib/ruby/1.8/rmail/header.rb
|
81
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libxtemplate-ruby1.8/examples/sample34.rb
|
82
|
+
$RUBYLEXERVSRUBY /usr/lib/ruby/1.8/runit/testsuite.rb
|
83
|
+
$RUBYLEXERVSRUBY /usr/lib/ruby/1.8/zip/zip.rb
|
84
|
+
$RUBYLEXERVSRUBY /usr/lib/ruby/1.8/html/template.rb
|
85
|
+
|
86
|
+
#exit
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_xmlrpc_utils.rb
|
101
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_rubyunit.rb
|
102
|
+
|
103
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_parsedate.rb
|
104
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_date_format.rb
|
105
|
+
|
106
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_tkcanvas.rb
|
107
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_tkdialog.rb
|
108
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_net_imap.rb
|
109
|
+
|
110
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_libtk-ruby1.8_exmaples_tkmultilistbox.rb
|
111
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_ruby-examples_examples_mine.rb
|
112
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_ruby-examples_examples_observ.rb
|
113
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_ruby1.8-examples_examples_mine.rb
|
114
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_ruby1.8-examples_examples_observ.rb
|
115
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_aswiki_util.rb
|
116
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_libopengl-ruby_examples_clip.rb
|
117
|
+
|
118
|
+
|
119
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_amrita_parts.rb
|
120
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_cgi_session.rb
|
121
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_complex.rb
|
122
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_csv.rb
|
123
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_libglade-ruby_examples_test.rb
|
124
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_amrita_ams.rb
|
125
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_amrita_format.rb
|
126
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_amrita_node.rb
|
127
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_amrita_tag.rb
|
128
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_amstd_version.rb
|
129
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_webrick_httputils.rb
|
130
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_net_imap.rb
|
131
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_resolv-replace.rb
|
132
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_irb_ruby-lex.rb
|
133
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_date.rb
|
134
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_racc_raccp.rb
|
135
|
+
|
136
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_rd_rdinlineparser.tab.rb
|
137
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_rd_rdblockparser.tab.rb
|
138
|
+
|
139
|
+
|
140
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/texturesurf.rb.gz
|
141
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libncurses-ruby1.8/examples/tclock.rb.gz
|
142
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtkglext1-ruby/examples/simple-mixed.rb.gz
|
143
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/surface.rb.gz
|
144
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/tess.rb.gz
|
145
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/lines.rb.gz
|
146
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libamrita-ruby1.6/examples/bbs/bbs.rb.gz
|
147
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/menus.rb.gz
|
148
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/feedback.rb.gz
|
149
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/wrap.rb.gz
|
150
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/main.rb.gz
|
151
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/pickdepth.rb.gz
|
152
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/tree_store.rb.gz
|
153
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/teaambient.rb.gz
|
154
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libart2-ruby/examples/testlibart2.rb.gz
|
155
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgnomecanvas2-ruby/examples/canvas-primitives.rb.gz
|
156
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/images.rb.gz
|
157
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libamrita-ruby1.6/examples/bbs/test/testbbs.rb.gz
|
158
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgnomecanvas2-ruby/examples/canvas-curve.rb.gz
|
159
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/texgen.rb.gz
|
160
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/stock_browser.rb.gz
|
161
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libncurses-ruby1.8/examples/example.rb.gz
|
162
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/pixbufs.rb.gz
|
163
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/list_store.rb.gz
|
164
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgda2-ruby/examples/sample.rb.gz
|
165
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libamrita-ruby1.6/examples/bbs/model.rb.gz
|
166
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/teapots.rb.gz
|
167
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgstreamer0.6-ruby/examples/media-type2.rb.gz
|
168
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgnome2-ruby/examples/test-gnome/app-helper.rb.gz
|
169
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/testgtk/spinbutton.rb.gz
|
170
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/select.rb.gz
|
171
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/quadric.rb.gz
|
172
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/drawingarea.rb.gz
|
173
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/accpersp.rb.gz
|
174
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/dof.rb.gz
|
175
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/testgtk/cursors.rb.gz
|
176
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/accanti.rb.gz
|
177
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/testgtk/dnd.rb.gz
|
178
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/plane.rb.gz
|
179
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libnet-acl-ruby1.6/examples/acltest.rb.gz
|
180
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/aapoly.rb.gz
|
181
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/changedisplay.rb.gz
|
182
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgnome2-ruby/examples/gnome-config.rb.gz
|
183
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/jitter.rb.gz
|
184
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/image.rb.gz
|
185
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/font.rb.gz
|
186
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtkglext1-ruby/examples/gtkglut.rb.gz
|
187
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgstreamer0.6-ruby/examples/gst-inspect.rb.gz
|
188
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/fog.rb.gz
|
189
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtkglext1-ruby/examples/font.rb.gz
|
190
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/alpha3D.rb.gz
|
191
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/alpha.rb.gz
|
192
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/testgtk/testgtk.rb.gz
|
193
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgnomecanvas2-ruby/examples/canvas-arrowhead.rb.gz
|
194
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/aargb.rb.gz
|
195
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtkglext1-ruby/examples/simple.rb.gz
|
196
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgnome2-ruby/examples/gnome-app-helper.rb.gz
|
197
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/gtk-demo/textview.rb.gz
|
198
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/stroke.rb.gz
|
199
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/testgtk/progressbar.rb.gz
|
200
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/colormat.rb.gz
|
201
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtkglext1-ruby/examples/share-lists.rb.gz
|
202
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgtk2-ruby/examples/testgtk/liststore.rb.gz
|
203
|
+
|
204
|
+
$RUBYLEXERVSRUBY /usr/share/freeride/plugins/rubyide_fox_gui/fxscintilla/ruby_properties.rb
|
205
|
+
$RUBYLEXERVSRUBY /usr/share/doc/rubymagick/examples/demo.rb.gz
|
206
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libopengl-ruby/examples/texbind.rb.gz
|
207
|
+
$RUBYLEXERVSRUBY /usr/share/doc/libgnome2-ruby/examples/test-gnome/font-picker.rb.gz
|
208
|
+
|
209
|
+
echo 'skipping some cmds:'
|
210
|
+
echo 'these generate split-line warnings (low prio issue for now)'
|
211
|
+
cat <<end
|
212
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_optparse.rb
|
213
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_libxmlrpc-ruby1.6_examples_perf_async.rb
|
214
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_libdrb-ruby1.6_examples_dlogd.rb
|
215
|
+
$RUBYLEXERVSRUBY testdata/_usr_bin_dpkg-checkdeps.rb
|
216
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_libgtk-ruby_examples_testgtk_ctree.rb
|
217
|
+
$RUBYLEXERVSRUBY testdata/_usr_share_doc_ruby-examples_examples_cal.rb
|
218
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.8_rd_rd2man-lib.rb
|
219
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_xmltree.rb
|
220
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_parsearg.rb
|
221
|
+
$RUBYLEXERVSRUBY testdata/_usr_lib_ruby_1.6_tracer.rb
|
222
|
+
end
|
223
|
+
|
224
|
+
#oops, looks like this one's missing an end
|
225
|
+
#$RUBYLEXERVSRUBY /usr/share/freeride/freebase/plugins/raa_xmlrpc4r/rpcd.rb
|
226
|
+
|
227
|
+
#not legal in ruby 1.8
|
228
|
+
#$RUBYLEXERVSRUBY /usr/share/doc/libtcltk-ruby1.6/exmaples/sample/sample1.rb
|
229
|
+
|
230
|
+
#these 3 aren't legal ruby:
|
231
|
+
#$RUBYLEXERVSRUBY /usr/share/doc/libdb4.1-ruby1.8/bdb.rb.gz
|
232
|
+
#$RUBYLEXERVSRUBY /usr/share/doc/libdb2-ruby1.8/bdb.rb.gz
|
233
|
+
#$RUBYLEXERVSRUBY /usr/share/doc/libdb3-ruby1.8/bdb.rb.gz
|
234
|
+
|
235
|
+
#not even vaguely legal ruby:
|
236
|
+
#$RUBYLEXERVSRUBY /usr/share/doc/libdebconf-client-ruby/examples/test.rb.templates.ja
|
237
|
+
#$RUBYLEXERVSRUBY /usr/share/doc/libdebconf-client-ruby/examples/test.rb.templates.in
|
238
|
+
#$RUBYLEXERVSRUBY /usr/share/doc/libdebconf-client-ruby/examples/test.rb.templates
|
239
|
+
|
data/testing.txt
CHANGED
@@ -1,69 +1,62 @@
|
|
1
|
-
|
2
1
|
Running the tests:
|
3
|
-
|
4
|
-
|
2
|
+
The simplest thing to do is run "ruby -Ilib test/code/regression.rb". This
|
3
|
+
tests against a list of known ruby expressions. It will take several minutes
|
4
|
+
to run. Currently, there are 5 failures.
|
5
|
+
|
6
|
+
If you're ambitious, try this command: "ruby -Ilib test/code/locatetest.rb".
|
7
|
+
This will use locate to find as much ruby code on your system and test
|
5
8
|
each specimen to see if it can be tokenized correctly (by feeding it to
|
6
9
|
testcode/rubylexervsruby.rb, the operation of which is outlined below
|
7
10
|
under 'testing strategy').
|
8
11
|
|
9
12
|
Interpreting the output of rubylexervsruby.rb (and locatetest):
|
10
|
-
|
11
|
-
doesn't print anything unless there's an error.
|
13
|
+
In rubylexervsruby, I've tried to follow the philosophy that the test program
|
14
|
+
doesn't print anything unless there's an error. Perhaps I haven't followed
|
12
15
|
this far enough; every run of rubylexervsruby produces a little output, and
|
13
16
|
sometimes a run will produce output that doesn't actually indicate a problem,
|
14
|
-
or only a low-priority problem. (
|
15
|
-
|
16
|
-
output. sorry.)
|
17
|
+
or only a low-priority problem. (Since locatetest runs rubylexervsruby over
|
18
|
+
and over, it produces lots of (mostly harmless) output. Sorry.)
|
17
19
|
|
18
|
-
|
20
|
+
The following types of output should be ignored:
|
19
21
|
|
20
22
|
diff file or chunk headers
|
21
23
|
|
22
24
|
lines that look like this:
|
23
25
|
executing: ruby testcode/tokentest.rb ... #normal, 1 for every file
|
24
|
-
or this:
|
25
|
-
warning moved from 24 to 22: ambiguous first argument; put parentheses or even spaces
|
26
26
|
or this:
|
27
27
|
Created warning(s) in new file, line 85: useless use of <=> in void context
|
28
28
|
or this:
|
29
29
|
Removed warning(s) from old file (?!), line 85: useless use of <=> in void context
|
30
|
-
indicate that a warning was added
|
30
|
+
indicate that a warning was added or deleted. Ultimately, these should
|
31
31
|
go away, but right now it's a low-priority issue.
|
32
32
|
|
33
|
-
|
34
|
-
an error
|
35
|
-
|
36
|
-
|
37
|
-
an error as well.
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
+
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
problem is because ruby's lexer generates an extra (empty) string content
|
61
|
-
token at this point, which mine omits. there's no actual semantic difference
|
62
|
-
between the two tokenizations, so there's nothing to be concerned about. in
|
63
|
-
a future release, when my lexer supports the notion of string contents and
|
64
|
-
string delimiters as separate token types, i'll try to emulate ruby more
|
65
|
-
closely. the same case is replicated in p.rb.
|
66
|
-
(in other words, ignore the error in this file and the identical one in p.rb.)
|
33
|
+
If you ever see ruby stack dump in rubylexervsruby output, that's certainly
|
34
|
+
an error.
|
35
|
+
|
36
|
+
Something that looks like a unidiff chunk body (not header) may indicate
|
37
|
+
an error as well. To understand more about how the unidiff output is
|
38
|
+
created, see the section on testing strategy below.
|
39
|
+
|
40
|
+
htree/template.rb should be ok now.
|
41
|
+
|
42
|
+
currently, lots of warnings are printed about token offsets being off by 1,
|
43
|
+
particularly the AssignmentRhsListToken. This is a problem, but for now I'm
|
44
|
+
ignoring it.
|
45
|
+
|
46
|
+
Diff chunks like this indicate a minor problem with the placement of (empty)
|
47
|
+
string fragments. Ignore it for now:
|
48
|
+
|
49
|
+
@@ -13,2 +13,3 @@
|
50
|
+
Shifting token tSTRING_BEG ()
|
51
|
+
+Shifting token tSTRING_CONTENT ()
|
52
|
+
Shifting token tSTRING_DBEG ()
|
53
|
+
@@ -19,2 +20,2 @@
|
54
|
+
Shifting token '\n' ()
|
55
|
+
@@ -13,2 +13,3 @@
|
56
|
+
Shifting token tSTRING_BEG ()
|
57
|
+
+Shifting token tSTRING_CONTENT ()
|
58
|
+
Shifting token tSTRING_DBEG ()
|
59
|
+
|
67
60
|
|
68
61
|
|
69
62
|
if you find any output that doesn't look like one of the above exceptions,
|
@@ -76,10 +69,6 @@ rpcd.rb from freeride -- missing an end
|
|
76
69
|
sample1.rb from 1.6 version of tcltk -- not legal in ruby 1.8
|
77
70
|
bdb.rb from libdb2, 3, and 4 -- not how you declare [] method in ruby
|
78
71
|
|
79
|
-
testdata/p.rb (my menagerie of weird test cases) is one of the worst
|
80
|
-
offenders; it prints lots of output when tested, but all of the problems
|
81
|
-
are harmless or minor.
|
82
|
-
|
83
72
|
only the 10 first lines of each failing file are printed. the rest, as well
|
84
73
|
as other intermediate files are kept in the testresults directory. the test
|
85
74
|
output files are named *.prs.diff. beware: this directory is never cleaned,
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: rubylexer
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.7.
|
7
|
-
date: 2008-
|
6
|
+
version: 0.7.1
|
7
|
+
date: 2008-09-05 00:00:00 +01:00
|
8
8
|
summary: RubyLexer is a lexer library for Ruby, written in Ruby.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -50,7 +50,6 @@ files:
|
|
50
50
|
- lib/rubylexer/charhandler.rb
|
51
51
|
- lib/assert.rb
|
52
52
|
- lib/rubylexer.rb
|
53
|
-
- test/data/gemlist.txt
|
54
53
|
- test/data/blockassigntest.rb
|
55
54
|
- test/data/for.rb
|
56
55
|
- test/data/chunky_bacon.rb
|
@@ -89,58 +88,158 @@ files:
|
|
89
88
|
- test/data/format.rb
|
90
89
|
- test/code/locatetest.rb
|
91
90
|
- test/code/rubylexervsruby.rb
|
92
|
-
- test/code/dl_all_gems.rb
|
93
|
-
- test/code/unpack_all_gems.rb
|
94
91
|
- test/code/tokentest.rb
|
95
92
|
- test/code/dumptokens.rb
|
96
93
|
- test/code/torment
|
97
94
|
- test/code/locatetest
|
98
95
|
- test/code/deletewarns.rb
|
96
|
+
- lib/rubylexer/0.7.1.rb
|
97
|
+
- rubylexer.vpj
|
98
|
+
- test/code/all_the_gems.rb
|
99
|
+
- test/code/all_the_raas.rb
|
100
|
+
- test/code/all_the_rubies.rb
|
101
|
+
- test/code/errscan
|
102
|
+
- test/code/isolate_error.rb
|
103
|
+
- test/code/lexloop
|
104
|
+
- test/code/regression.rb
|
105
|
+
- test/code/strgen.rb
|
106
|
+
- test/code/tarball.rb
|
107
|
+
- test/code/testcases.rb
|
108
|
+
- test/data/cvtesc.rb
|
109
|
+
- test/data/__eof2.rb
|
110
|
+
- test/data/__eof5.rb
|
111
|
+
- test/data/__eof6.rb
|
112
|
+
- test/data/hd0.rb
|
113
|
+
- test/data/hdateof.rb
|
114
|
+
- test/data/hdempty.rb
|
115
|
+
- test/data/hdr_dos2.rb
|
116
|
+
- test/data/hdr_dos.rb
|
117
|
+
- test/data/hdr.rb
|
118
|
+
- test/data/here_escnl_dos.rb
|
119
|
+
- test/data/here_escnl.rb
|
120
|
+
- test/data/heremonsters_dos.rb
|
121
|
+
- test/data/heremonsters_dos.rb.broken
|
122
|
+
- test/data/heremonsters.rb
|
123
|
+
- test/data/heremonsters.rb.broken
|
124
|
+
- test/data/heremonsters.rb.broken.save
|
125
|
+
- test/data/here_squote.rb
|
126
|
+
- test/data/illegal_oneliners.rb
|
127
|
+
- test/data/illegal_stanzas.rb
|
128
|
+
- test/data/make_ws_strdelim.rb
|
129
|
+
- test/data/maven2_builer_test.rb
|
130
|
+
- test/data/migration.rb
|
131
|
+
- test/data/modl_dos.rb
|
132
|
+
- test/data/modl_fails.rb
|
133
|
+
- test/data/modl.rb
|
134
|
+
- test/data/multilinestring.rb
|
135
|
+
- test/data/oneliners.rb
|
136
|
+
- test/data/simple_dos.rb
|
137
|
+
- test/data/simple.rb
|
138
|
+
- test/data/stanzas.rb
|
139
|
+
- test/data/strdelim_crlf.rb
|
140
|
+
- test/data/stuff2.rb
|
141
|
+
- test/data/stuff3.rb
|
142
|
+
- test/data/stuff4.rb
|
143
|
+
- test/data/stuff.rb
|
144
|
+
- test/data/tkweird.rb
|
145
|
+
- test/data/unending_stuff.rb
|
146
|
+
- test/data/whatnot.rb
|
147
|
+
- test/data/ws_strdelim.rb
|
148
|
+
- test/test.sh
|
99
149
|
test_files:
|
150
|
+
- test/code/regression.rb
|
151
|
+
- test/code/isolate_error.rb
|
152
|
+
- test/code/tarball.rb
|
153
|
+
- test/code/testcases.rb
|
100
154
|
- test/code/locatetest.rb
|
155
|
+
- test/code/CVS
|
156
|
+
- test/code/all_the_rubies.rb
|
101
157
|
- test/code/rubylexervsruby.rb
|
102
|
-
- test/code/
|
103
|
-
- test/code/
|
158
|
+
- test/code/strgen.rb
|
159
|
+
- test/code/lexloop
|
104
160
|
- test/code/tokentest.rb
|
161
|
+
- test/code/errscan
|
105
162
|
- test/code/dumptokens.rb
|
163
|
+
- test/code/all_the_raas.rb
|
106
164
|
- test/code/torment
|
107
165
|
- test/code/locatetest
|
108
166
|
- test/code/deletewarns.rb
|
167
|
+
- test/code/all_the_gems.rb
|
168
|
+
- test/data/here_escnl.rb
|
169
|
+
- test/data/migration.rb
|
170
|
+
- test/data/tkweird.rb
|
171
|
+
- test/data/heremonsters.rb
|
172
|
+
- test/data/make_ws_strdelim.rb
|
173
|
+
- test/data/heremonsters_dos.rb.broken
|
109
174
|
- test/data/blockassigntest.rb
|
110
175
|
- test/data/for.rb
|
176
|
+
- test/data/__eof6.rb
|
177
|
+
- test/data/multilinestring.rb
|
111
178
|
- test/data/chunky_bacon.rb
|
112
179
|
- test/data/and.rb
|
180
|
+
- test/data/oneliners.rb
|
181
|
+
- test/data/here_squote.rb
|
113
182
|
- test/data/pre.unix.rb
|
183
|
+
- test/data/hd0.rb
|
184
|
+
- test/data/modl.rb
|
114
185
|
- test/data/untermed_string.rb.broken
|
115
186
|
- test/data/__end__2.rb
|
116
187
|
- test/data/w.rb
|
188
|
+
- test/data/stuff3.rb
|
117
189
|
- test/data/if.rb
|
190
|
+
- test/data/heremonsters_dos.rb
|
191
|
+
- test/data/whatnot.rb
|
118
192
|
- test/data/pre.rb
|
119
193
|
- test/data/jarh.rb
|
120
194
|
- test/data/regtest.rb
|
195
|
+
- test/data/hdr.rb
|
121
196
|
- test/data/chunky_bacon4.rb
|
122
197
|
- test/data/__end__.rb
|
198
|
+
- test/data/stanzas.rb
|
199
|
+
- test/data/modl_fails.rb
|
200
|
+
- test/data/stuff4.rb
|
123
201
|
- test/data/strinc.rb
|
124
202
|
- test/data/lbrace.rb
|
203
|
+
- test/data/stuff.rb
|
125
204
|
- test/data/p.rb
|
126
205
|
- test/data/chunky.plain.rb
|
127
206
|
- test/data/noeolatend.rb
|
207
|
+
- test/data/__eof5.rb
|
128
208
|
- test/data/g.rb
|
129
209
|
- test/data/23.rb
|
210
|
+
- test/data/illegal_stanzas.rb
|
211
|
+
- test/data/here_escnl_dos.rb
|
130
212
|
- test/data/lbrack.rb
|
213
|
+
- test/data/ws_strdelim.rb
|
131
214
|
- test/data/untitled1.rb
|
132
215
|
- test/data/rescue.rb
|
216
|
+
- test/data/unending_stuff.rb
|
133
217
|
- test/data/tokentest.assert.rb.can
|
218
|
+
- test/data/maven2_builer_test.rb
|
219
|
+
- test/data/simple.rb
|
220
|
+
- test/data/heremonsters.rb.broken.save
|
221
|
+
- test/data/modl_dos.rb
|
134
222
|
- test/data/pleac.rb.broken
|
135
223
|
- test/data/heart.rb
|
136
224
|
- test/data/s.rb
|
225
|
+
- test/data/__eof2.rb
|
226
|
+
- test/data/hdr_dos2.rb
|
137
227
|
- test/data/wsdlDriver.rb
|
228
|
+
- test/data/cvtesc.rb
|
229
|
+
- test/data/heremonsters.rb.broken
|
138
230
|
- test/data/p-op.rb
|
231
|
+
- test/data/illegal_oneliners.rb
|
232
|
+
- test/data/hdempty.rb
|
233
|
+
- test/data/hdr_dos.rb
|
139
234
|
- test/data/1.rb.broken
|
140
235
|
- test/data/untermed_here.rb.broken
|
141
236
|
- test/data/newsyntax.rb
|
237
|
+
- test/data/stuff2.rb
|
142
238
|
- test/data/chunky_bacon3.rb
|
143
239
|
- test/data/chunky_bacon2.rb
|
240
|
+
- test/data/strdelim_crlf.rb
|
241
|
+
- test/data/simple_dos.rb
|
242
|
+
- test/data/hdateof.rb
|
144
243
|
- test/data/format.rb
|
145
244
|
- test/results/
|
146
245
|
rdoc_options:
|
@@ -152,7 +251,6 @@ extra_rdoc_files:
|
|
152
251
|
- howtouse.txt
|
153
252
|
- History.txt
|
154
253
|
- testing.txt
|
155
|
-
- test/data/gemlist.txt
|
156
254
|
executables: []
|
157
255
|
|
158
256
|
extensions: []
|
@@ -165,9 +263,9 @@ dependencies:
|
|
165
263
|
version_requirement:
|
166
264
|
version_requirements: !ruby/object:Gem::Version::Requirement
|
167
265
|
requirements:
|
168
|
-
- - "
|
266
|
+
- - ">="
|
169
267
|
- !ruby/object:Gem::Version
|
170
|
-
version: 0.
|
268
|
+
version: 0.2.0
|
171
269
|
version:
|
172
270
|
- !ruby/object:Gem::Dependency
|
173
271
|
name: hoe
|
@@ -176,5 +274,5 @@ dependencies:
|
|
176
274
|
requirements:
|
177
275
|
- - ">="
|
178
276
|
- !ruby/object:Gem::Version
|
179
|
-
version: 1.5.
|
277
|
+
version: 1.5.1
|
180
278
|
version:
|