Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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