tclParse.c File Reference#include "tclInt.h"
Go to the source code of this file.
|
Defines |
#define | TYPE_NORMAL 0 |
#define | TYPE_SPACE 0x1 |
#define | TYPE_COMMAND_END 0x2 |
#define | TYPE_SUBS 0x4 |
#define | TYPE_QUOTE 0x8 |
#define | TYPE_CLOSE_PAREN 0x10 |
#define | TYPE_CLOSE_BRACK 0x20 |
#define | TYPE_BRACE 0x40 |
#define | CHAR_TYPE(c) (charTypeTable+128)[(int)(c)] |
Functions |
void | TclParseInit (Tcl_Interp *interp, const char *start, int numBytes, Tcl_Parse *parsePtr) |
int | Tcl_ParseCommand (Tcl_Interp *interp, const char *start, register int numBytes, int nested, register Tcl_Parse *parsePtr) |
int | TclParseAllWhiteSpace (const char *src, int numBytes) |
int | TclParseHex (const char *src, int numBytes, Tcl_UniChar *resultPtr) |
int | TclParseBackslash (const char *src, int numBytes, int *readPtr, char *dst) |
void | Tcl_FreeParse (Tcl_Parse *parsePtr) |
int | Tcl_ParseVarName (Tcl_Interp *interp, const char *start, register int numBytes, Tcl_Parse *parsePtr, int append) |
const char * | Tcl_ParseVar (Tcl_Interp *interp, register const char *start, const char **termPtr) |
int | Tcl_ParseBraces (Tcl_Interp *interp, const char *start, register int numBytes, register Tcl_Parse *parsePtr, int append, const char **termPtr) |
int | Tcl_ParseQuotedString (Tcl_Interp *interp, const char *start, register int numBytes, register Tcl_Parse *parsePtr, int append, const char **termPtr) |
Tcl_Obj * | Tcl_SubstObj (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags) |
int | TclSubstTokens (Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, int *tokensLeftPtr, int line) |
int | Tcl_CommandComplete (const char *script) |
int | TclObjCommandComplete (Tcl_Obj *objPtr) |
int | TclIsLocalScalar (const char *src, int len) |
Define Documentation
#define CHAR_TYPE |
( |
c |
|
) |
(charTypeTable+128)[(int)(c)] |
#define TYPE_CLOSE_BRACK 0x20 |
#define TYPE_CLOSE_PAREN 0x10 |
#define TYPE_COMMAND_END 0x2 |
Function Documentation
int Tcl_CommandComplete |
( |
const char * |
script |
) |
|
Definition at line 1261 of file tclParse.c.
References ckfree, Tcl_Parse::staticTokens, and Tcl_Parse::tokenPtr.
Referenced by Tcl_ParseBraces(), Tcl_ParseExpr(), Tcl_ParseQuotedString(), Tcl_ParseVarName(), Tcl_SubstObj(), TclCompileEnsemble(), TclCompileExpr(), TclCompileScript(), and TclEvalEx().
int Tcl_ParseBraces |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
start, |
|
|
register int |
numBytes, |
|
|
register Tcl_Parse * |
parsePtr, |
|
|
int |
append, |
|
|
const char ** |
termPtr | |
|
) |
| | |
Definition at line 1592 of file tclParse.c.
References CHAR_TYPE, Tcl_Token::numComponents, Tcl_Token::size, Tcl_Token::start, Tcl_AppendResult(), TCL_ERROR, Tcl_FreeParse(), TCL_OK, TCL_PARSE_MISSING_BRACE, Tcl_SetResult(), TCL_STATIC, TCL_TOKEN_BS, TCL_TOKEN_TEXT, TclGrowParseTokenArray, TclParseBackslash(), TclParseInit(), Tcl_Token::type, TYPE_NORMAL, and UCHAR.
int Tcl_ParseCommand |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
start, |
|
|
register int |
numBytes, |
|
|
int |
nested, |
|
|
register Tcl_Parse * |
parsePtr | |
|
) |
| | |
Definition at line 243 of file tclParse.c.
References Tcl_Token::numComponents, Tcl_Token::size, Tcl_Token::start, TCL_ERROR, TCL_OK, TCL_PARSE_BRACE_EXTRA, TCL_PARSE_QUOTE_EXTRA, Tcl_ParseBraces(), Tcl_ParseQuotedString(), Tcl_SetResult(), TCL_STATIC, TCL_SUBST_ALL, TCL_TOKEN_EXPAND_WORD, TCL_TOKEN_SIMPLE_WORD, TCL_TOKEN_TEXT, TCL_TOKEN_WORD, TclFindElement(), TclGrowParseTokenArray, TclParseInit(), Tcl_Token::type, TYPE_CLOSE_BRACK, TYPE_COMMAND_END, TYPE_SPACE, and UCHAR.
int Tcl_ParseQuotedString |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
start, |
|
|
register int |
numBytes, |
|
|
register Tcl_Parse * |
parsePtr, |
|
|
int |
append, |
|
|
const char ** |
termPtr | |
|
) |
| | |
const char* Tcl_ParseVar |
( |
Tcl_Interp * |
interp, |
|
|
register const char * |
start, |
|
|
const char ** |
termPtr | |
|
) |
| | |
Definition at line 1507 of file tclParse.c.
References Tcl_Parse::numTokens, Tcl_Token::size, Tcl_GetObjResult(), Tcl_IncrRefCount, Tcl_IsShared, TCL_OK, Tcl_ParseVarName(), Tcl_ResetResult(), TclGetString, TclStackAlloc(), TclStackFree(), TclSubstTokens(), and Tcl_Parse::tokenPtr.
int Tcl_ParseVarName |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
start, |
|
|
register int |
numBytes, |
|
|
Tcl_Parse * |
parsePtr, |
|
|
int |
append | |
|
) |
| | |
Definition at line 1299 of file tclParse.c.
References Tcl_Parse::errorType, Tcl_Parse::incomplete, Tcl_Parse::interp, Tcl_Token::numComponents, Tcl_Parse::numTokens, Tcl_Token::size, Tcl_Token::start, TCL_ERROR, Tcl_FreeParse(), TCL_OK, TCL_PARSE_MISSING_PAREN, TCL_PARSE_MISSING_VAR_BRACE, Tcl_SetResult(), TCL_STATIC, TCL_SUBST_ALL, TCL_TOKEN_TEXT, TCL_TOKEN_VARIABLE, TCL_UTF_MAX, Tcl_UtfCharComplete(), Tcl_UtfToUniChar(), TclGrowParseTokenArray, TclParseInit(), Tcl_Parse::term, Tcl_Parse::tokenPtr, Tcl_Token::type, TYPE_CLOSE_PAREN, and UCHAR.
Definition at line 1866 of file tclParse.c.
References CONST, Tcl_Parse::end, Tcl_Parse::errorType, Tcl_Parse::incomplete, NUM_STATIC_TOKENS, Tcl_Token::numComponents, Tcl_Parse::numTokens, Tcl_Token::size, Tcl_Token::start, Tcl_AppendObjToObj(), TCL_BREAK, Tcl_DecrRefCount, TCL_ERROR, Tcl_FreeParse(), Tcl_GetObjResult(), Tcl_IncrRefCount, Tcl_NewObj(), TCL_OK, Tcl_Panic(), TCL_PARSE_SUCCESS, Tcl_ParseCommand(), Tcl_SetObjResult(), TCL_TOKEN_COMMAND, TCL_TOKEN_TEXT, TCL_TOKEN_VARIABLE, TclGetStringFromObj, TclGrowParseTokenArray, TclParseInit(), TclStackAlloc(), TclStackFree(), TclSubstTokens(), Tcl_Parse::term, Tcl_Parse::tokenPtr, Tcl_Parse::tokensAvailable, and Tcl_Token::type.
Referenced by Tcl_SubstObjCmd().
int TclIsLocalScalar |
( |
const char * |
src, |
|
|
int |
len | |
|
) |
| | |
int TclObjCommandComplete |
( |
Tcl_Obj * |
objPtr |
) |
|
int TclParseAllWhiteSpace |
( |
const char * |
src, |
|
|
int |
numBytes | |
|
) |
| | |
int TclParseBackslash |
( |
const char * |
src, |
|
|
int |
numBytes, |
|
|
int * |
readPtr, |
|
|
char * |
dst | |
|
) |
| | |
int TclParseHex |
( |
const char * |
src, |
|
|
int |
numBytes, |
|
|
Tcl_UniChar * |
resultPtr | |
|
) |
| | |
void TclParseInit |
( |
Tcl_Interp * |
interp, |
|
|
const char * |
start, |
|
|
int |
numBytes, |
|
|
Tcl_Parse * |
parsePtr | |
|
) |
| | |
Definition at line 199 of file tclParse.c.
References Tcl_Parse::end, Tcl_Parse::errorType, Tcl_Parse::incomplete, Tcl_Parse::interp, NUM_STATIC_TOKENS, Tcl_Parse::numTokens, Tcl_Parse::numWords, Tcl_Parse::staticTokens, Tcl_Parse::string, TCL_PARSE_SUCCESS, Tcl_Parse::term, Tcl_Parse::tokenPtr, and Tcl_Parse::tokensAvailable.
Referenced by Tcl_ParseBraces(), Tcl_ParseCommand(), Tcl_ParseExpr(), Tcl_ParseQuotedString(), Tcl_ParseVarName(), Tcl_SubstObj(), and TclCompileEnsemble().
int TclSubstTokens |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Token * |
tokenPtr, |
|
|
int |
count, |
|
|
int * |
tokensLeftPtr, |
|
|
int |
line | |
|
) |
| | |
Definition at line 2119 of file tclParse.c.
References iPtr, Tcl_Token::numComponents, Tcl_Token::size, Tcl_Token::start, TCL_BREAK, TCL_CONTINUE, Tcl_DecrRefCount, TCL_ERROR, Tcl_GetObjResult(), Tcl_IncrRefCount, TCL_LEAVE_ERR_MSG, Tcl_NewStringObj(), Tcl_ObjGetVar2(), TCL_OK, Tcl_Panic(), TCL_TOKEN_BS, TCL_TOKEN_COMMAND, TCL_TOKEN_TEXT, TCL_TOKEN_VARIABLE, TCL_UTF_MAX, Tcl_UtfBackslash(), TclEvalEx(), TclInterpReady(), TclSubstTokens(), and Tcl_Token::type.
Referenced by Tcl_EvalTokensStandard(), Tcl_ParseVar(), Tcl_SubstObj(), TclEvalEx(), and TclSubstTokens().
Generated on Wed Mar 12 12:18:33 2008 by
1.5.1
|