summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
Commit message (Collapse)AuthorAgeFilesLines
* TIP 388 implementationjan.nijtmans2011-08-121-3/+12
|
* Change the signature of TclParseHex(), such that it can now parse up to 8 ↵jan.nijtmans2011-08-091-9/+11
| | | | hex characters
* New internal routines TclScanElement() and TclConvertElement().dgp2011-05-101-1/+1
|\ | | | | Rewritten guts of machinery to produce string rep of lists. [Bug 3173086]
* \ Revised TclFindElement() interface.dgp2011-05-021-24/+18
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The final argument had been bracePtr, the address of a boolean var, where the caller can be told whether or not the parsed list element was enclosed in braces. In practice, no callers really care about that. What the callers really want to know is whether the list element value exists as a literal substring of the string being parsed, or whether a call to TclCopyAndCollpase() is needed to produce the list element value. Now the final argument is changed to do what callers actually need. This is a better fit for the calls in tclParse.c, where now a good deal of post-processing checking for "naked backslashes" is no longer necessary. ***POTENTIAL INCOMPATIBILITY*** For any callers calling in via the internal stubs table who really do use the final argument explicitly to check for the enclosing brace scenario. Simply looking for the braces where they must be is the revision available to those callers, and it will backport cleanly. Tests for expanded literals quoting detection.
| * Tests for expanded literals quoting detection.dgp2011-05-021-3/+5
| |
| * Revised TclFindElement() interface.dgp2011-05-021-21/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The final argument had been bracePtr, the address of a boolean var, where the caller can be told whether or not the parsed list element was enclosed in braces. In practice, no callers really care about that. What the callers really want to know is whether the list element value exists as a literal substring of the string being parsed, or whether a call to TclCopyAndCollpase() is needed to produce the list element value. Now the final argument is changed to do what callers actually need. This is a better fit for the calls in tclParse.c, where now a good deal of post-processing checking for "naked backslashes" is no longer necessary. ***POTENTIAL INCOMPATIBILITY*** For any callers calling in via the internal stubs table who really do use the final argument explicitly to check for the enclosing brace scenario. Simply looking for the braces where they must be is the revision available to those callers, and it will backport cleanly.
* | New utility routines: TclIsSpaceProc() and TclCountSpaceRuns()dgp2011-04-281-1/+25
|\ \ | |/ | | Use to replace calls to isspace() and their /* INTL */ risk.
| * New utility routines: TclIsSpaceProc() and TclCountSpaceRuns()dgp2011-04-281-1/+25
| | | | | | Use to replace calls to isspace() and their /* INTL */ risk.
* | Rewrites to eliminate some isspace() calls.dgp2011-03-161-13/+8
|\ \ | |/
| * Rewrites to eliminate isspace() calls.dgp2011-03-161-13/+8
| |
* | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-4/+4
| | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | MINOR: Formatting fixes, mainly to comments, so code better fits the style indkf2011-03-101-8/+8
| | | | | | the Engineering Manual.
* | * generic/tclBasic.c: More replacements of Tcl_UtfBackslash() callsdgp2011-03-061-2/+2
|\ \ | |/ | | | | | | | | * generic/tclCompile.c: with TclParseBackslash() where possible. * generic/tclCompCmdsSZ.c: * generic/tclParse.c: * generic/tclUtil.c:
| * * generic/tclBasic.c: More replacements of Tcl_UtfBackslash() callsdgp2011-03-061-2/+2
| |\ | | | | | | | | | | | | * generic/tclCompile.c: with TclParseBackslash() where possible. * generic/tclParse.c: * generic/tclUtil.c:
* | \ * generic/tclParse.c (TclParseBackslash): Correct trunction checks indgp2011-03-061-2/+2
|\ \ \ | |/ / | | | * tests/parse.test: \x and \u substitutions. [Bug 3200987]
| * | * generic/tclParse.c (TclParseBackslash): Correct trunction checks indgp2011-03-061-2/+2
| |\ \ | | |/ | | | * tests/parse.test: \x and \u substitutions. [Bug 3200987]
| | * * generic/tclParse.c (TclParseBackslash): Correct trunction checks indgp2011-03-061-2/+2
| | | | | | | | | * tests/parse.test: \x and \u substitutions. [Bug 3200987]
* | | add missing comment terminatormig2011-03-021-1/+2
| | |
* | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ \ | |/ / | | | cause more harm than good. Purged them (except in zlib files).
| * | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ \ | | |/ | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * * generic/tclAlloc.c: Cleaned up various routines in thedgp2009-09-281-1/+9
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: call stacks for memory allocation to * generic/tclParse.c: guarantee that any size values computed * generic/tclThreadAlloc.c: are within the domains of the routines they get passed to. [Bugs 2557696 and 2557796].
| | * * generic/tclParse.c (Tcl_ParseBraces): fix for possible readMiguel Sofer2007-10-151-2/+2
| | | | | | | | | | | | after the end of buffer, [Bug 1813528] (Joe Mistachkin).
| | * * generic/tclParse.c: In contexts where interp and parsePtr->interpdgp2007-07-191-8/+8
| | | | | | | | | | | | might be different, be sure to use the latter for error reporting.
| | * * generic/tclParse.c (Tcl_ParseCommand): also return an error ifMiguel Sofer2006-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | start==NULL and numBytes<0. This is coverity's bug #20 * generic/tclStringObj.c (STRING_SIZE): fix allocation for 0-length strings. This is coverity's bugs #54-5
| * | silence compiler warningsdgp2009-08-261-2/+2
| | |
| * | * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-7/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-24): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script Tcl_Obj*'s, to properly account for them while counting lines for #280.
| * | * generic/tclParse.c: Backport fix for [Bug 2251175].dgp2008-12-011-10/+26
| | |
| * | * generic/tclParse.c (ParseComment): The new TclParseAllWhiteSpace()dgp2008-05-211-5/+8
| | | | | | | | | | | | | | | | | | | | | * tests/parse.test (parse-15.60): routine has no mechanism to return the "incomplete" status of "\\\n" so calling this routine anywhere that can be reached within a Tcl_ParseCommand() call is a mistake. In particular, ParseComment() must not use it. [Bug 1968882].
* | | Code Audit results:dkf2010-03-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
* | | More tidying up (whitespace, spelling, useless parentheses, useless casts)dkf2010-02-241-77/+82
| | |
* | | CONST -> constnijtmans2009-12-251-1/+1
| | |
* | | * generic/tclCompile.c: Re-implement Tcl_SubstObj() as a simpledgp2009-09-171-81/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclParse.c: wrapper around TclNRSubstObj(). This has * tests/basic.test: the effect of caching compiled bytecode in * tests/parse.test: the value to be substituted. Note that Tcl_SubstObj() now exists only for extensions. Tcl itself no longer makes any use of it. Note also that TclSubstTokens() is now reachable only by Tcl_EvalEx() and Tcl_ParseVar() so tests aiming to test its functioning needed adjustment to still have the intended effect.
* | | * generic/tclParse.c Corrected line counting error in multi-commanddgp2009-09-071-0/+4
| | | | | | | | | | | | * tests/into.test: script substitutions. [Bug 2850901].
* | | * generic/tclCompCmds.c (TclCompileSubstCmd): Added a bytecodedgp2009-09-041-24/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: compiler routine for the [subst] command. * generic/tclCmdMZ.c: This is a partial solution to the need to * generic/tclCompile.c: NR-enable [subst] since bytecode execution is * generic/tclCompile.h: already NR-enabled. [Bug 2314561] Two new * generic/tclExecute.c: bytecode instructions, INST_NOP and * generic/tclInt.h: INST_RETURN_CODE_BRANCH were added to support * generic/tclParse.c: the new routine. INST_RETURN_CODE_BRANCH is * tests/basic.test: likely to be useful in any future effort to * tests/info.test: add a bytecode compiler routine for [try]. * tests/parse.test:
* | | fix warningsdas2009-08-251-1/+1
| | |
* | | * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-8/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tcl_EvalEx, TclEvalEx, TclAdvanceContinuations, TclNREvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript, TclCompileTokens): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-24): Extended the parser, compiler, and execution engine with code and attendant data structures tracking the position of continuation lines which are not visible in the resulting script Tcl_Obj*'s, to properly account for them while counting lines for #280.
* | | * generic/tclParse.c: Coding standards fixups.dgp2008-12-011-17/+19
| | |
* | | Alternate fix for[Bug 2251175]: missing backslash substitution on expanded ↵ferrieux2008-11-271-43/+23
| | | | | | | | | | | | literals.
* | | Simplification of expanded-literals handling after analysis of dead branchesferrieux2008-11-191-3/+3
| | |
* | | Fix [Bug 2251175]: missing backslash substitution on expanded literals.ferrieux2008-11-171-3/+36
| | |
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-4/+4
| | |
* | | * generic/tclParse.c: move TclResetCancellation to be called onJoe Mistachkin2008-09-171-2/+2
| | | | | | | | | | | | | | | returning to level 0, as opposed to it being called on starting a substitution at level 0.
* | | * generic/tclParse.c: fixing incomplete reversion of "fix" forMiguel Sofer2008-07-151-1/+2
| | | | | | | | | | | | [Bug 2017583], missing TclResetCancellation call.
* | | * generic/tclParse.c: reverting the "fix" for [Bug 2017583],Miguel Sofer2008-07-141-3/+10
| | | | | | | | | | | | | | | * tests/parse.test: numLevel management and TclInterpReady check seems to be necessary after all.
* | | * generic/tclParse.c: Remove unneeded TclInterpReady callMiguel Sofer2008-07-141-7/+4
| | |
* | | * generic/tclBasic.c.: Embedded Tcl_Canceled() calls intoMiguel Sofer2008-07-141-4/+1
| | | | | | | | | | | | | | | * generic/tclExecute.c: TclInterpReady(). * generic/tclParse.c:
* | | remove unused variableMiguel Sofer2008-07-141-3/+1
| | |
* | | * generic/tclParse.c: remove unnecessary numLevel managementMiguel Sofer2008-07-141-5/+1
| | | | | | | | | | | | [Bug 2017583]
* | | TIP 285 ImplementationJoe Mistachkin2008-06-131-1/+6
| | |