Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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