Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 366 lines (246 sloc) 10.351 kb
8f67bea @fglock Perlito version 8.0
authored
1 TODO list for Perlito5
2
d6cad9b @fglock Perlito5 - TODO update
authored
3
25b8875 @fglock Perlito5 - TODO update
authored
4 * perlito5 command-line
e4641d7 @fglock Perlito - extensive TODO update
authored
5
6
8f67bea @fglock Perlito version 8.0
authored
7 * libraries
8
3004b77 @fglock Perlito5 - cleanup, update TODO
authored
9 -- these should probably go into namespace Perlito5X::*
10
ce7ce91 @fglock Perlito - TODO update
authored
11 -- Test (implemented as Perlito5::Test)
3004b77 @fglock Perlito5 - cleanup, update TODO
authored
12
ce7ce91 @fglock Perlito - TODO update
authored
13 -- Data::Dumper (implemented as Perlito5::Dumper)
8f67bea @fglock Perlito version 8.0
authored
14
24c23f7 @fglock Perlito5 - TODO update
authored
15 -- create perlito5-specific libs for:
7aeb314 @fglock Perlito5 - TODO update
authored
16 feature.pm
17 Config.pm
18 overload.pm
19 bytes.pm
20 integer.pm
21 constant.pm
22 lib.pm
23 Carp.pm
24 vars.pm
25 Tie::Array
26 Tie::Hash
27 Tie::Scalar
24c23f7 @fglock Perlito5 - TODO update
authored
28
4d56b5d @fglock Perlito5 - add $ENV{PERL5LIB} to @INC
authored
29 alternately, check $^H for strictness - such that perl's own strict.pm just works
30 and ${^WARNING_BITS} for warnings
31
8f67bea @fglock Perlito version 8.0
authored
32
7b982c3 @fglock Perlito5 - update TODO
authored
33 * Parser
34
131944d @fglock Perlito5 - TODO update; add more references to documentation and tests
authored
35 -- attributes
36 http://perldoc.perl.org/attributes.html
02db591 @fglock Perlito5 - update TODO
authored
37
131944d @fglock Perlito5 - TODO update; add more references to documentation and tests
authored
38 -- create __DATA__
39 http://perldoc.perl.org/SelfLoader.html#The-__DATA__-token
b4f4a35 @fglock Perlito5 - perl5: "use" is compile-time (the emitted code contains all m...
authored
40
ae33743 @fglock Perlito5 - TODO update
authored
41 -- compile-time eval() is not bound to the "program" environment, but to the "compiler" environment instead
131944d @fglock Perlito5 - TODO update; add more references to documentation and tests
authored
42 see README-perlito5-js near "Compile-time / Run-time interleaving"
43
44 my $v;
45 BEGIN { $v = "123" }
46 use Module $v; # $v is not accessible at compile-time
7b982c3 @fglock Perlito5 - update TODO
authored
47
529225f @fglock Perlito5 - TODO update
authored
48 -- parse the regexes
131944d @fglock Perlito5 - TODO update; add more references to documentation and tests
authored
49 create an AST for regexes
7b982c3 @fglock Perlito5 - update TODO
authored
50
b32dc90 @fglock Perlito5 - update TODO
authored
51 -- prototypes (signatures)
131944d @fglock Perlito5 - TODO update; add more references to documentation and tests
authored
52 http://perldoc.perl.org/perlsub.html#Prototypes
53
54 check that undeclared barewords give the right error
55 *foo = sub () { ... } # does prototype work here?
56 check signature in sort()
57 fix the prototype for 'stat(*)' (see t/test.pl in the perl test suite)
fde5276 @fglock Perlito5 - update TODO
authored
58
5f528ed @fglock Perlito5 - parser - more TODO special cases
authored
59 -- "namespace" parsing
131944d @fglock Perlito5 - TODO update; add more references to documentation and tests
authored
60 tests: t5/01-perlito/26-syntax-namespace.t
5f528ed @fglock Perlito5 - parser - more TODO special cases
authored
61
e107c18 @fglock Perlito5 - parser - add "glob variable"
authored
62 $ perl -e ' { package X; sub print { CORE::print(">$_[1]<\n") } } my $x = bless {}, "X"; print $x "xxx" '
63 Not a GLOB reference at -e line 1.
64
65 $ perl -e ' { package X; sub printx { CORE::print(">$_[1]<\n") } } my $x = bless {}, "X"; printx $x "xxx" '
66 >xxx<
67
68 $ perl -MO=Deparse -e ' print X:: "xxx" '
69 print X 'xxx';
70
71 $ perl -e ' use strict; my $x = X::; print $x '
72 X
73
74 $ perl -e ' use strict; my $x = X; print $x '
75 Bareword "X" not allowed while "strict subs" in use
76
daea592 @fglock Perlito5 - add more "use strict"
authored
77 $ perl perlito5.pl -MO=Deparse -e ' ::X::x::y '
78 join("", ::{'main::X::'} x main::y);
79
5f528ed @fglock Perlito5 - parser - more TODO special cases
authored
80 $ perl -MO=Deparse -e ' ::X '
81 '???';
82
83 $ perl -MO=Deparse -e ' sub X {} ::X '
84 sub X { }
85 X;
86
d216d0e @fglock Perlito5 - parser - namespace TODO - more corner cases
authored
87 $ perl -e ' $::X::::X = 3; print $main::X::::X ' # 3
d69c95a @fglock Perlito5 - parser - namespace TODO - more corner cases
authored
88 $ perl -e ' $::X::::X = 3; print $main::main::X::::X ' # 3
89 $ perl -e ' $::X::::X = 3; print $main::X::main::X ' # empty
d216d0e @fglock Perlito5 - parser - namespace TODO - more corner cases
authored
90 $ perl -e ' $::X::::X = 3; print $main::X::X ' # empty
d69c95a @fglock Perlito5 - parser - namespace TODO - more corner cases
authored
91 $ perl -e ' $::X::::X = 3; print $::::X::::X ' # empty
92
bad489f @fglock Perlito5 - parser - TODO list
authored
93 -- CORE:: namespace can be used with operators:
94
95 $ perl -MO=Deparse -e ' $x CORE::and $v '
96 $v if $x;
97
98 $ perl -MO=Deparse -e ' @v = CORE::qw/ a b c / '
99 @v = ('a', 'b', 'c');
100
101 $ perl -MO=Deparse -e ' $x CORE::+ $v '
102 CORE:: is not a keyword
103
d216d0e @fglock Perlito5 - parser - namespace TODO - more corner cases
authored
104
1395266 @fglock Perlito5 - TODO update
authored
105 -- strict and warnings: create options like 'subs', 'refs'
106
94163c8 @fglock perlito5 - parser - tweak TODO list
authored
107 -- clean up:
108 the several "end_tables" in Expression.pm are duplicating the function of
109 $Precedence in Precedence.pm - Expression.pm should use $Precedence directly.
2077216 @fglock Perlito5 - add TODO
authored
110
b33a702 @fglock perlito5 - parser - TODO "things that work in perlito5, but which are er...
authored
111 -- things that work in perlito5, but which are errors in 'perl'
112
113 quotes vs. hash lookups:
114
115 $ perl -e ' q}} '
116 # ok
117
118 $ perl -e ' $x{ q}} } '
119 Unmatched right curly bracket at -e line 1, at end of line
120
121 $ perl -e ' $x{ q]] } '
122 # ok
123
124 string interpolation with nested quotes of the same type:
125
126 $ perl -e ' " $x{"x"} " '
127 String found where operator expected at -e line 1, near "x"} ""
128
2cc1933 @fglock Perlito5 - TODO update
authored
129
95e6b6c @fglock Perlito5 - TODO cleanup
authored
130 * Add tests for fixed bugs:
131
132
133 ---
134 add additional variants of "for"
135
136 # "our" with localization
137 $ perl -e ' use strict; our $x = 123; for our $x (1,2,3) { 2 } print "$x\n" '
138 123
139
140 # variable in scope with localization
141 $ perl -e ' use strict; my $x = 123; for $x (1,2,3) { 2 } print "$x\n" '123
142 123
143
144
145 ---
146 add "print", "printf", "say" special parsing - note this is related to indirect object notation
147
148 indirect object notation
149 http://lwn.net/Articles/451486/
150 http://www.modernperlbooks.com/mt/2009/08/the-problems-with-indirect-object-notation.html
151 http://shadow.cat/blog/matt-s-trout/indirect-but-still-fatal/
152 http://perlbuzz.com/mechanix/2008/02/the-perils-of-perl-5s-indirect.html
153
154 method Module $param;
155 new Class( arg => $value );
156 new Class::($args);
157 say $config->{output} "This is a diagnostic message!"; # indirect call
158 say {$config->{output}} "This is a diagnostic message!"; # say to filehandle
159
160 use Class;
161 sub Class {
162 warn 'Called Class sub not Class package';
163 'Class'
164 }
165 my $q = Class->new; # calls the Class sub above
166 my $s = new Class; # throws a 'Bareword found where operator expected' error
167 my $t = Class::->new # this works
168 my $u = new Class::; # this also works (even with sub main in the current package)
169
170 sbertrang++ noted this is also valid:
171 print( STDERR "123" )
172
173
174 ---
94163c8 @fglock perlito5 - parser - tweak TODO list
authored
175 add tests for signatures: "empty" _ $ ;$
176
177 ---
caf3b30 @fglock perlito5 - parser - fix "sub _" should be in package "main"
authored
178 add test for "sub _" should be in package "main"
179 $ perl -MO=Deparse -e ' package X; sub _ { 123 } '
180 package X;
181 sub main::_ {
182 123;
183 }
184
185 ---
186 add test for defined-or vs. m// (2012/9/25 Конрад Боровски <notifications@github.com>)
187 Note: fixed; see test t5/01-perlito/25-syntax-defined-or.t
188
189 $ perl perlito5.pl -Isrc5/lib -Cast-perl5 -e ' shift // 2 '
190 Number or Bareword found where operator expected
191
192 $ perl perlito5.pl -Isrc5/lib -Cast-perl5 -e ' shift / 2 '
193 Can't find string terminator '/' anywhere before EOF
194
195 ---
196 add test for filetest operators special case:
2cc1933 @fglock Perlito5 - TODO update
authored
197 ' -f($file).".bak" ' should be equivalent to -f "$file.bak"
198 parses as -(f($file)).".bak"
199 but: ' -f ($file).".bak" '
200 parses correctly
201 This seems to be because there is a rule that \w followed by '(' is a function call;
202 this needs more testing: ' ... and(2) '
dd7a160 @fglock Perlito5 - parser: fix a bug caused by incorrect is_term state
authored
203 Test: redefine 'and', 'not' and check what works.
2cc1933 @fglock Perlito5 - TODO update
authored
204
205 ' $s111++ + $s222 '
206 parses as (+$s222)++
207
dd7a160 @fglock Perlito5 - parser: fix a bug caused by incorrect is_term state
authored
208 ' $step++ < $steps '
209 Can't find string terminator '>' anywhere before EOF
210
2cc1933 @fglock Perlito5 - TODO update
authored
211
8f67bea @fglock Perlito version 8.0
authored
212
5bb50dd @fglock Perlito5 - update TODO
authored
213 * Perl5 backend
399a3d2 @fglock Perlito5 - use scalar() instead of .elems()
authored
214
7bc739e @fglock Perlito5 - parser - add 'Perlito5::AST::Given'
authored
215 -- "given" statement not implemented
376e088 @fglock Perlito5 - TODO update
authored
216 -- "default" statement not implemented
7bc739e @fglock Perlito5 - parser - add 'Perlito5::AST::Given'
authored
217
66ec858 @fglock Perlito5 - TODO update
authored
218 -- check that \(@a) and \@a have different meanings
219
529225f @fglock Perlito5 - TODO update
authored
220 -- ${^NAME} needs curly-escaping
221
85c5759 @fglock Perlito5 - TODO update
authored
222 - fix regex delimiters, or escape the regexes
223
47374c7 @fglock Perlito5 - perl5: fix bareblock
authored
224 -- continue block in block: ' { print 1 } continue { print 2 } '
225
7a5d100 @fglock Perlito5 - perl5: document emitter bug (significant parenthesis)
authored
226 -- emitter bug: significant parenthesis:
227 t5/01-perlito/12-context.t fails because:
228 " return (4, 5) " instead of " return 4, 5 "
229
1d5cf89 @fglock Perlito5 - parser: new module Perlito5::Grammar::Sigil
authored
230 -- bug: ' $$x [$y] '
231 emits as ${$x}->[$y];
232
0cc64c5 @fglock Perlito5 - kill perl6-ish "method"
authored
233
8f67bea @fglock Perlito version 8.0
authored
234 * Javascript backend
235
66ec858 @fglock Perlito5 - TODO update
authored
236 -- check that \(@a) and \@a have different meanings
237
09cc8db @fglock Perlito5 - js - add TODO for delete() special case
authored
238 -- delete() in the middle of an array turns exists() off:
239
240 $ perl -e ' @a = (3..7); delete $a[2]; print "exists ", (exists $a[$_] ? 1 : 0), "\n" for 0 .. $#a '
241 exists 1
242 exists 1
243 exists 0
244 exists 1
245 exists 1
246
3b69c4e @fglock Perlito5 - javascript - add bug: "return" and context inside eval
authored
247 -- "or" has SCALAR context (Abigail++):
25440bb @fglock Perlito5 - TODO update
authored
248 See: t5/01-perlito/23-eval.t
3b69c4e @fglock Perlito5 - javascript - add bug: "return" and context inside eval
authored
249
ecbc8f4 @fglock Perlito5 - TODO update; fix "when"
authored
250 -- "~~" operator not implemented; See also "when" implementation
251
252 -- "given" statement not implemented
376e088 @fglock Perlito5 - TODO update
authored
253 -- "when" should use a "break" exception inside "given", and a "next" exception inside "for".
ecbc8f4 @fglock Perlito5 - TODO update; fix "when"
authored
254 -- "default" statement not implemented
255
db64ad6 @fglock Perlito5 - parser: "C-style" loop
authored
256 -- bug: some declarations are not "seen":
257 for ( my $i = 0; $i < 10 ; $i++ ) { print "$i\n" } # compiles to global $i
258
bb77986 @fglock Perlito5 - parser: optimize ident() rule
authored
259 -- bug: don't emit throw() in term position; javascript requires a function() wrapper because throw() is a statement
260
9f9d0dd @fglock Perlito5 - javascript: TODO update
authored
261 -- javascript errors don't show in the global error handler when running in node.js
7a03ff4 @fglock Perlito5 - javascript: eval-block works
authored
262
e584da6 @fglock Perlito5 - javascript: TODO update
authored
263 -- "autoload" the compiler if eval-string is used (eval-string needs the compiler at run-time)
264
529225f @fglock Perlito5 - TODO update
authored
265 -- symbol variables like $] ${"main::\$"} $#_
266 -- check that @_, $_, $a, $b and other special variables are in the right context (lexical, global, package global)
267
aa5eb05 @fglock Perlito5 - TODO update
authored
268 -- emit array/hash slices: @a[@x], @a{@x}
269
014a584 @fglock Perlito5 - javascript: working @ISA; update Changelog, examples
authored
270 -- add alternate mro's
85c5759 @fglock Perlito5 - TODO update
authored
271 -- cache the mro
42a3449 @fglock Perlito5 - TODO update
authored
272
273 -- add regex compiler
274 -- /e modifier
d2169b7 @fglock Perlito5 - t/test.pl: use cmp_ok()
authored
275 -- /x modifier
42a3449 @fglock Perlito5 - TODO update
authored
276 -- support all perl5 regex syntax
529225f @fglock Perlito5 - TODO update
authored
277 -- @v = /x/g
42a3449 @fglock Perlito5 - TODO update
authored
278
887219b @fglock Perlito5 - javascript: work around variable redeclaration bug
authored
279 -- bug: variable redeclaration does not work
280 -- javascript "var" erases the outer value within the whole current lexical scope
42a3449 @fglock Perlito5 - TODO update
authored
281 -- bug: "my" variables - this doesn't work as expected: my $v = $v
282 possible fix: rename variables
887219b @fglock Perlito5 - javascript: work around variable redeclaration bug
authored
283
b75827a @fglock Perlito5 - TODO update
authored
284 -- lvalue ternary: ($a_or_b ? $a : $b) = $c;
285 -- lvalue substr()
286 -- 4-arguments substr()
78fd976 @fglock Perlito5 - javascript: fix 3-arguments substr()
authored
287 -- pos($str)
b44f592 @fglock Perlito5 - TODO update
authored
288 -- lvalue chomp(), chop()
78fd976 @fglock Perlito5 - javascript: fix 3-arguments substr()
authored
289
290 -- missing some types of subroutine signatures
5b56e5b @fglock Perlito5 - change javascript calling convention
authored
291
8f67bea @fglock Perlito version 8.0
authored
292 -- bug: variable aliases create copies instead
293
ce36bd0 @fglock Perlito5 - update TODO
authored
294 -- generate more compact code; maybe use more subroutines instead of inlining;
295 autovivification is probably the most verbose part of the code.
ae7ad72 @fglock Perlito5 - update docs
authored
296
7b982c3 @fglock Perlito5 - update TODO
authored
297 -- in the browser: implement "use" with XMLHttpRequest (what are the security implications?)
4b15a00 @fglock Perlito5 - cleanup parenthesis
authored
298
5bb50dd @fglock Perlito5 - update TODO
authored
299 -- add symbol tables for scalar, array and hash
1b4e7ee @fglock Perlito5 - TODO update: typeglobs
authored
300 -- references to typeglobs:
301 $ perl -e ' print ref(\*main) '
302 GLOB
303 -- aliasing between lexicals and globals
304 $ perl -e 'use strict; my $x = 3; *main::z = \$x; print $main::z; '
305 3
5bb50dd @fglock Perlito5 - update TODO
authored
306
71b0905 @fglock Perlito5 - docs update
authored
307 -- string increment and string ranges
e09904a @fglock Perlito5 - javascript: infrastructure for string increment
authored
308 See: p5str_inc()
5b56e5b @fglock Perlito5 - change javascript calling convention
authored
309
0e5b55f @fglock Perlito5 - update TODO
authored
310 -- finish "overload" implementation
311
0718f37 @fglock Perlito5 - javascript: TODO update
authored
312 -- pack(), unpack()
313 -- y()()
314
b343129 @fglock Perlito - TODO update
authored
315 -- BEGIN{} should execute in the environment of the program under compilation
88914e1 @fglock Perlito5 - TODO update
authored
316 -- BEGIN/END that are defined inside blocks/closures need to run inside some pseudo-environment
317 even if the closure was never created or used in the first place
b343129 @fglock Perlito - TODO update
authored
318
b371c5d @fglock Perlito5 - js - AUTOLOAD finished; add tests; workaround for broken boot...
authored
319 -- bug - method call context is disabled, because it breaks bootstrap.
320 in Runtime.pm:
321 function p5call(invocant, method, list, p5want) {
322 list.unshift(invocant);
323 p5want = 0; // TODO BUG - workaround for broken bootstrap
0cc64c5 @fglock Perlito5 - kill perl6-ish "method"
authored
324
59477ad @fglock Perlito - TODO update
authored
325
fb9190c @fglock Perlito5 - TODO update
authored
326 * Nice to Have
a7ab071 @fglock Perlito5 - add TODO
authored
327
3c87580 @fglock Perlito - TODO update
authored
328 -- debugging symbols
329 -- line numbers in error messages
330
8f60cb4 @fglock Perlito5 - TODO update
authored
331 -- caller()
332 -- "when"
465ee11 @fglock Perlito5 - TODO update
authored
333
fb9190c @fglock Perlito5 - TODO update
authored
334 -- run more of the "perl" test suite
0cc64c5 @fglock Perlito5 - kill perl6-ish "method"
authored
335
71b0905 @fglock Perlito5 - docs update
authored
336 -- proper "use strict" and "use warnings"
1b2eecc @fglock Perlito5 - use @ARGV instead of @*ARGS
authored
337 -- use the same error messages and warnings as 'perl'
42a3449 @fglock Perlito5 - TODO update
authored
338 -- no warnings 'redefine';
1b2eecc @fglock Perlito5 - use @ARGV instead of @*ARGS
authored
339
ebce10f @fglock Perlito5 - parser: add __END__, __DATA__
authored
340 -- __LINE__, __FILE__
f4910a7 @fglock Perlito5 - TODO update
authored
341
b343129 @fglock Perlito - TODO update
authored
342 -- INIT{}, END{}
343 look at the implementation in perlito6-in-Go
f4910a7 @fglock Perlito5 - TODO update
authored
344
4b15a00 @fglock Perlito5 - cleanup parenthesis
authored
345 -- source code - remove Perl 6 code such as "token"
71b0905 @fglock Perlito5 - docs update
authored
346 (fixed: This is only loaded if the grammar compiler is needed)
4b15a00 @fglock Perlito5 - cleanup parenthesis
authored
347
61d64aa @fglock Perlito5 - parser: rewrite operator() in "perl5-land" for later tweaking
authored
348 -- *{ $name }{CODE}->();
349
350 -- local(*{$caller."::a"}) = \my $a;
6217752 @fglock Perlito5 - docs update
authored
351 -- *{$pkg . "::foo"} = \&bar;
61d64aa @fglock Perlito5 - parser: rewrite operator() in "perl5-land" for later tweaking
authored
352
353
d6cad9b @fglock Perlito5 - TODO update
authored
354
355 * Deprecate
356
357 -- remove unused features from src5/lib/Perlito5/Grammar/Regex.pm
358
359 -- Interpreter backend
360 this is not being maintained; the code is still in src5/lib/Perlito5/Eval.pm just in case
361
362 -- Perl6 backend (started)
363 this is not being maintained; not sure if compiling to Perl6 is the best way
364 maybe compiling directly to Parrot/dotnet/Haskell gives better results
365
Something went wrong with that request. Please try again.