Do not create _ unless needed (Closes: #1131).
[mpsl.git] / TODO
blob457521ea55b547780f4fae006379cb10482c6023
1 Minimum Profit Scripting Language (mpsl) TODO / Bug List
2 ========================================================
4 Release Critical Bugs
5 ---------------------
7  * 1128: Document the _ array in functions.
8  * 1129: Document the new multithreading support.
9  * 1130: Document the for() instruction.
11 Open Bugs
12 ---------
14  * 1108: Document the 'executable component in compact symbols'
15    feature.
16  * 1112: Document the difference regarding local variable access in
17    named and anonymous subroutines.
18  * 1119: Fix bincall() in 64 bit systems.
19  * 1127: Document the new inverse calling syntax.
21 Pending Enhancements
22 --------------------
24  * 1024: Implement the `continue' directive.
25  * 1083: Implement a split() that uses regular expressions.
26  * 1095: Accept "local var" everywhere a symbol name is accepted.
27  * 1109: There must be possible to have executable components with
28    arguments in compact symbols (as in 'h.code(a1,a2).other').
29  * 1115: Add C++ style comments.
31 Closed
32 ------
34  * 1011: Will the scripting language be included here, or as a
35    separated package? it could poison the mpdm concept as a 'low
36    level utility library' (Yes; Wed, 08 Dec 2004 09:51:55 +0100).
37  * 1010: Find a name for the scripting language (Mpsl should be
38    fine; Wed, 08 Dec 2004 09:52:32 +0100).
39  * 1021: Merge mpsl (the scripting language) lex and yacc files from
40    CVS project filp2 (Thu, 09 Dec 2004 11:55:42 +0100).
41  * 1034: Implement ++ and -- (Tue, 14 Dec 2004 12:15:25 +0100).
42  * 1035: Implement +=, -=, *=, /= (Tue, 14 Dec 2004 12:15:28 +0100).
43  * 1036: Implement the 'local' variable creation in mpsl.
44    (Tue, 14 Dec 2004 13:06:53 +0100).
45  * 1038: Implement the '&&' and '||' boolean operands
46    (Wed, 15 Dec 2004 17:02:12 +0100).
47  * 1039: SUB_PREFIX and SUB_POSTFIX should be only one instruction,
48    that create the prefix / execute things / destroy the prefix,
49    instead of two (Thu, 16 Dec 2004 09:08:38 +0100).
50  * 1040: MPSL_OP_SYMNAM (SYMBOL) should not exist; it should just
51    be a MPSL_OP_LIST (Fri, 17 Dec 2004 07:49:10 +0100).
52  * 1041: MPSL_OP_SYMLIST (SYMLIST) should not exist, and be just
53    a MPSL_OP_LIST. Also, it should have only one argument
54    with the list of symbols, and not an undefined number or arguments.
55    (Fri, 24 Dec 2004 18:26:26 +0100).
56  * 1042: The local t = v instruction is very buggy; it should be
57    implemented as a ';' instruction with the local and the assignation
58    part and the arguments to LOCAL and to '=' should be instructions and
59    not values (Fri, 24 Dec 2004 18:49:29 +0100).
60  * 1046: Subroutine definitions are using MPSL_OP_SUB that is
61    really the substract opcode (Sun, 26 Dec 2004 19:26:32 +0100).
62  * 1022: Implement return values for mpsl functions (Closed by #1052;
63    Sat, 08 Jan 2005 21:30:37 +0100).
64  * 1049: Multiple instructions are buggy; they should always have
65    two arguments (Though the parser now spits 18 shift/reduce conflicts,
66    everything seems to be fine; Sat, 08 Jan 2005 21:32:57 +0100).
67  * 1055: Implement the 'FOREACH' opcode (Sun, 06 Feb 2005 17:31:55 +0100).
68  * 1053: Implement the 'RANGE' opcode (Sun, 06 Feb 2005 17:55:04 +0100).
69  * 1056: Add c-style strings (\n, \t, etc) (Mon, 07 Feb 2005 19:22:50 +0100).
70  * 1057: Add a mpsl_compile_file() function (Mon, 21 Feb 2005 18:31:13 +0100).
71  * 1060: Though local symbol names must be single to the
72    parser, they need to be accesible / assignable as
73    complex values with mpdm_sget() / mpdm_sset()
74    (Wed, 23 Feb 2005 08:20:51 +0100).
75  * 1061: Implement the %= operator (Mon, 07 Mar 2005 07:45:05 +0100).
76  * 1062: Add line info to syntax errors (Mon, 07 Mar 2005 08:15:17 +0100).
77  * 1059: Add support for anonymous subroutines (for doing,
78    for example, a = sub { code; }) (Mon, 07 Mar 2005 16:30:16 +0100).
79  * 1023: Implement the 'break' directive in mpsl
80    (Mon, 07 Mar 2005 16:32:19 +0100).
81  * 1052: Implement the 'return' directive in mpsl
82    (Mon, 07 Mar 2005 16:32:34 +0100).
83  * 1050: Document the virtual machine (Mon, 07 Mar 2005 16:32:49 +0100).
84  * 1060: The compiler should use a cache for literal string
85    values (Mon, 14 Mar 2005 08:16:24 +0100).
86  * 1066: Rename all symbols starting with _ (Thu, 26 May 2005 20:41:46 +0200).
87  * 1067: Allow assignations in while() condition
88    (Tue, 12 Jul 2005 07:54:49 +0200).
89  * 1065: Add the filename to compilation errors
90    (Mon, 31 Oct 2005 16:15:04 +0100).
91  * 1054: Add a main() function, similar to the filp one
92    (Wed, 02 Nov 2005 16:59:36 +0100).
93  * 1070: Add an INC array to be used as a search path when
94    loading mpsl code (Tue, 08 Nov 2005 15:57:02 +0100).
95  * 1064: Compilation errors should be stored somewhere
96    (not just printed on stdout) (Tue, 08 Nov 2005 18:21:41 +0100).
97  * 1058: Function execution should bang when the
98    function is not found, or at least exist a default
99    handler function for it (Closed by #1071;
100    Thu, 10 Nov 2005 08:28:27 +0100).
101  * 1072: Add parsing of hexadecimal numbers
102    (Sat, 12 Nov 2005 12:32:52 +0100).
103  * 1073: Add parsing of octal numbers
104    (Sat, 12 Nov 2005 12:33:00 +0100).
105  * 1076: Add a mpsl_died global variable to abort further execution
106    (Changed to mpsl_abort; Wed, 05 Apr 2006 13:11:33 +0200).
107  * 1079: Add a unified way (a function) to set MPSL errors
108    (Wed, 05 Apr 2006 13:33:51 +0200).
109  * 1078: Add an eval() function (Wed, 05 Apr 2006 17:19:15 +0200).
110  * 1077: Add a die() function (renamed to error();
111    Wed, 05 Apr 2006 17:26:21 +0200)
112  * 1080: The INC array must be get using mpsl_get_symbol() instead
113    of mpdm_hget_s() (Tue, 11 Apr 2006 17:24:55 +0200).
114  * 1071: Undefined functions should get better support
115    (Wed, 03 May 2006 08:22:43 +0200).
116  * 1074: The mpsl command line tool should also search code in
117    the current directory (Wed, 03 May 2006 13:28:31 +0200).
118  * 1085: The mpsl interpreter program should accept a program from stdin
119    (Wed, 03 May 2006 13:28:41 +0200).
120  * 1086: Using return() with a value from inside a while() loop
121    fails (Sat, 13 May 2006 13:58:42 +0200).
122  * 1087: Using return() with a value from inside a foreach() loop
123    fails (Sat, 13 May 2006 14:00:19 +0200).
124  * 1063: Create a sprintf()-like library function
125    (Implemented in mpsl; Tue, 23 May 2006 18:17:05 +0200).
126  * 1089: Change the load() function from a function library to an opcode.
127    (Not necessary; Sun, 18 Jun 2006 21:17:41 +0200).
128  * 1090: Change mpsl_compile_file() to accept the INC as argument instead
129    of using mpsl_get_symbol() (needs #1089 closed)
130    (Not done; Sun, 18 Jun 2006 21:18:24 +0200).
131  * 1091: Change mpsl_get_symbol() and mpsl_set_symbol() to be static, so
132    only opcodes can manipulate it (needs #1090 closed)
133    (Not done; Sun, 18 Jun 2006 21:18:56 +0200).
134  * 1088: Change the virtual machine to propagate the local symbol table
135    in an argument instead of being a global list
136    (Sun, 18 Jun 2006 21:19:13 +0200).
137  * 1082: Implement a Perl-like map() function (Mon, 21 Aug 2006 18:15:26 +0200).
138  * 1075: Finish the quick reference guide (Tue, 22 Aug 2006 00:45:38 +0200).
139  * 1081: Implement a Perl-like grep() function (Tue, 22 Aug 2006 16:49:53 +0200).
140  * 1084: Implement the foreach(local var, list) construction
141    (Closed by #1095; Tue, 03 Oct 2006 13:05:07 +0200).
142  * 1096: Implement an optimizer that 'executes' all MPSL core instructions
143    and converts to LITERAL all the LIST and HASH instructions that have only
144    LITERAL instructions as arguments (Sat, 07 Oct 2006 12:45:03 +0200).
145  * 1100: Fix yy_input_for_flex() to not fail if wctomb() returns > 1
146    (Tue, 10 Oct 2006 13:49:46 +0200).
147  * 1097: Investigate why flatten() makes the 'symval 2' stress test fails
148    and fix it (mpsl_exec_i() was sweeping values still in use;
149    Tue, 10 Oct 2006 17:25:41 +0200).
150  * 1099: Enable flatten() (needs #1097 fixed)
151    (renamed to constant_fold(); Tue, 10 Oct 2006 17:26:05 +0200).
152  * 1093: Change the parser to directly create wide char strings
153    (Tue, 10 Oct 2006 18:44:00 +0200).
154  * 1094: Implement chars (\x1b) and wide chars (\x{1234}) in strings
155    (needs #1093 closed) (Tue, 10 Oct 2006 18:56:16 +0200).
156  * 1098: Change the 'LIST' and 'HASH' parser so that the opcode is inserted
157    when it's completed (all list elements pushed) and not at the beginning,
158    as both opcodes are the best to benefit from constant_fold()
159    (Wed, 11 Oct 2006 18:03:12 +0200).
160  * 1104: Implement strings separated by backslash plus newline
161    (Wed, 18 Apr 2007 14:20:19 +0200).
162  * 1103: Document the 'l' flag in regex()
163    (Mon, 18 Jun 2007 14:25:52 +0200).
164  * 1102: Document the changes to the LIST and HASH opcodes in the
165    internals document (Fri, 24 Aug 2007 08:50:57 +0200).
166  * 1092: The local symbol table description in the internals document
167    is outdated (Fri, 24 Aug 2007 09:00:12 +0200).
168  * 1107: Anonymous code in functions (as in map()) should have the
169    same local symbol context as the subroutine/block that calls it.
170    Currently doesn't work because anonymous subs have its own
171    subroutine frame instead of the caller's (they are subroutines,
172    after all) (Sat, 06 Oct 2007 10:51:20 +0200).
173  * 1114: getenv() crashes if the environment variable does not
174    exit (Mon, 08 Oct 2007 14:10:07 +0200).
175  * 1113: Anonymous subroutines still can't access the local subroutine
176    frame, even when created as block frames
177    (Tue, 30 Oct 2007 08:28:13 +0100).
178  * 1105: Document the backslash + newline separation of strings
179    (Tue, 27 Nov 2007 13:36:59 +0100).
180  * 1101: Document the \x{HHHH} syntax for strings
181    (Tue, 27 Nov 2007 13:40:59 +0100).
182  * 1051: Finish documentation for the scripting language
183    (Wed, 28 Nov 2007 09:49:00 +0100).
184  * 1116: Changed foreach() to _always_ create the iterator variable
185    as local (Wed, 02 Jan 2008 10:10:48 +0100).
186  * 1117: Double backslashes in strings fail
187    (Fri, 04 Apr 2008 09:46:15 +0200).
188  * 1111: Change write() to include a variable argument length
189    (Mon, 02 Feb 2009 16:20:03 +0100).
190  * 1068: Implement a dumper function to dump an mpdm_t as mpsl source code
191    (Mon, 06 Apr 2009 14:13:28 +0200).
192  * 1106: Implement the sscanf() function (similar to the one in filp)
193    (Sat, 25 Apr 2009 09:51:54 +0200).
194  * 1118: Document the sscanf() function
195    (Wed, 26 Aug 2009 17:41:01 +0200).
196  * 1110: Change the trace system to an executable mpdm_t value
197    (Thu, 25 Mar 2010 16:58:46 +0100).
198  * 1120: Invert split() arguments (Thu, 03 Feb 2011 09:31:25 +0100).
199  * 1121: Invert join() arguments (Thu, 03 Feb 2011 09:44:18 +0100).
200  * 1122: Invert sscanf() arguments (Thu, 03 Feb 2011 10:09:22 +0100).
201  * 1125: Invert map() arguments (Thu, 03 Feb 2011 10:51:53 +0100).
202  * 1126: Invert grep() arguments (Thu, 03 Feb 2011 12:23:20 +0100).
203  * 1124: Invert sregex() arguments (Thu, 03 Feb 2011 13:09:17 +0100).
204  * 1123: Invert regex() arguments (Thu, 03 Feb 2011 15:59:47 +0100).
205  * 1069: Implement a C-like for() instruction
206    (Tue, 22 Feb 2011 13:57:01 +0100).
207  * 1131: Do not create the subroutine _ argument if there is nothing
208    to store into (Tue, 05 Apr 2011 09:33:23 +0200).
210 Email bugs to angel@triptico.com