Artifact 7987523bea80af67679b679ee0d14ec3b0c7041cf5bd83a42ef723dba5db41d4:
- File todo.md — part of check-in [8ff12da684] at 2026-10-04 04:37:10 on branch tip-759b_tcl90 — Tcl_Parse.h : - add a new constant TYPE_OP (=0x100) in the Enum ParseTypeFlags - define 3 constants to modulate the parsing beyond the context (command or arithmetic): define TCL_CMD_NOT_NESTED 0 define TCL_CMD_NESTED_IN_CMD 1 define TCL_CMD_NESTED_IN_EXPR 2 Tcl_Parse.c : - modification of the type of tclCharTypeTable (defined as "int" instead of "unsigned char") - definitions in tclCharTypeTable : substitute TYPE_NORMAL by TYPE_OP for ascii operator chars - mofication of the terminator flag in Tcl_ParseCommand to include TYPE_OP and TYPE_CLOSE_PAREN category when coming from expr (when nested = TCL_CMD_NESTED_IN_EXPR) Tcl_CompExpr.c : - include Tcl_Parse.h - Added more raw commands into expr - (lassign, lindex, lappend, llength, string, dict,...) - Improve the way to come back from command parsing. (user: Florentis, size: 1295) [annotate] [blame] [check-ins using]
A faire :
Pour
substcommand :- in tcl.h :
#define TCL_SUBST_EXPR 8in tcl.h (~ line 510)#define TCL_SUBST_ALL 15in tcl.h (~ line 510)- in tclParse.c :
- func ParseToken :
int noSubstExpr = !(flags & TCL_SUBST_EXPR);at the begining- add a test like :
if (noSubstExpr) { tokenPtr->type = TCL_TOKEN_TEXT; tokenPtr->size = 1; parsePtr->numTokens++; src++; numBytes--; continue; }
- func TclSubstParse : ??? Must be checked specifically to see what has to be done (how does this func works ?)
- in tclCompCmdsSZ.c, func TclSubstCompile
- create a case for TCL_TOKEN_SUB_EXPR (and then call Tcl_CompileExpr)
Pour
info incompletecommand :- understand the way it works
- create test cases
Pour tcl-parser :
- try to compile it with the tip-759b branch
- test
Memory management :
- in tclParse.c, ParseToken :
- add
Tcl_FreeParse(exprParsePtr);
User Interface :
- in tclParse.c :
- func ParseToken :
- decide if, after a ParseExpr error, we fall back to COMMAND case.
- in tclCompExpr.c
Expr language :
- ?? Accept a sequence like : test
?expr;
- ?? Accept a sequence like : test