Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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