Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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