summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
Commit message (Collapse)AuthorAgeFilesLines
* Micro-optimization: Use TclGetStringFromObj in stead of Tcl_GetStringFromObj ↵jan.nijtmans2016-07-081-2/+2
| | | | in many places where possible.
* Tcl_SetVar -> Tcl_SetVar2 and comparable replacements, eliminating functions ↵jan.nijtmans2016-06-291-1/+1
| | | | which are deprecated.
* Re-order loop for fewer gotos.dgp2016-06-271-46/+36
|
* Stop parsing white space where there cannot be any.dgp2016-06-271-41/+28
|
* Streamline comment parsing.dgp2016-06-271-34/+33
|
* typo in comment. Eliminate unnecessary end-of-line spacing.jan.nijtmans2015-10-191-2/+2
|
* Eliminate unnessessary end-of-line spacing. No functional change.jan.nijtmans2015-10-041-1/+1
|\
| * Eliminate unnessessary end-of-line spacing. No functional change.jan.nijtmans2015-10-041-1/+1
| |
| * With no callers left, TclIsLocalScalar() is removed.dgp2014-12-191-50/+0
| |
* | Eliminate TclIsLocalScalar(). No callers left.dgp2014-12-231-50/+0
| |
* | [d2ffcca163] Limit parsing results that are documented to accept only ASCII ↵dgp2014-12-051-17/+46
|\ \ | |/ | | | | chars to actually follow that constraint. This requires not trusting isalnum(.) and isalpha(.) to deliver portable identical results.
| * Stop using isalnum(.). Its results are not portable. Replace with ourdgp2014-12-041-4/+43
| | | | | | own private routine TclIsBareword() that does exactly what we want.
| * I like this patch better. Retain the byte orientation of the parser.dgp2014-11-261-17/+4
| |
| * One way to fix the parser of $-substitution accepting non-ASCII varnames.dgp2014-11-251-0/+3
| |
* | Error in order of #include lines broke some windows builds.dgp2013-09-051-1/+1
| |
* | Replace potentially memleak creating safety check of a "cannot happen"dgp2013-08-071-8/+6
| | | | | | condition with an assertion.
* | Demonstrate and fix memory leak in Tcl_ParseVar().dgp2013-07-241-0/+1
|\ \ | |/
| * Demonstrate and fix memory leak in Tcl_ParseVar().dgp2013-07-241-0/+1
| |
* | MODULE_SCOPE symbol names are suppoted to start with 'tcl' (data) or 'Tcl' ↵jan.nijtmans2012-12-041-1/+1
| | | | | | | | (code)
* | more result generation conversiondkf2012-08-031-2/+2
| |
* | converting to using Tcl_Obj API for error message generation; part donedkf2012-08-031-13/+16
| |
* | Refactor TclScanElement() part of list parsing to take advantage of tablesdgp2012-03-071-12/+2
| | | | | | | | | | constructed for the task of script parsing. Ought to speed generation of string representation of lists, though the effect is likely only noticeable on long lists made up primarily of simple elements (not needing quoting).
* | 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
| | |