1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* tclCompExpr.c --
*
* This file contains the code to parse and compile Tcl expressions
* and implementations of the Tcl commands corresponding to expression
* operators, such as the command ::tcl::mathop::+ .
*
* Contributions from Don Porter, NIST, 2006-2007. (not subject to US copyright)
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclCompExpr.c,v 1.97 2008/02/28 20:40:24 dgp Exp $
*/
#include "tclInt.h"
#include "tclCompile.h" /* CompileEnv */
/*
* Expression parsing takes place in the routine ParseExpr(). It takes a
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* tclCompExpr.c --
*
* This file contains the code to parse and compile Tcl expressions
* and implementations of the Tcl commands corresponding to expression
* operators, such as the command ::tcl::mathop::+ .
*
* Contributions from Don Porter, NIST, 2006-2007. (not subject to US copyright)
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclCompExpr.c,v 1.97.2.1 2010/01/06 21:35:25 nijtmans Exp $
*/
#include "tclInt.h"
#include "tclCompile.h" /* CompileEnv */
/*
* Expression parsing takes place in the routine ParseExpr(). It takes a
|
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
|
if ((lastStart[0] == '0')
&& ((lastStart[1] == 'o')
|| (lastStart[1] == 'O'))
&& (lastStart[2] >= '0')
&& (lastStart[2] <= '9')) {
const char *end = lastStart + 2;
Tcl_Obj* copy;
while (isdigit(*end)) {
end++;
}
copy = Tcl_NewStringObj(lastStart,
end - lastStart);
if (TclCheckBadOctal(NULL,
Tcl_GetString(copy))) {
Tcl_AppendToObj(post,
|
|
|
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
|
if ((lastStart[0] == '0')
&& ((lastStart[1] == 'o')
|| (lastStart[1] == 'O'))
&& (lastStart[2] >= '0')
&& (lastStart[2] <= '9')) {
const char *end = lastStart + 2;
Tcl_Obj* copy;
while (isdigit(UCHAR(*end))) {
end++;
}
copy = Tcl_NewStringObj(lastStart,
end - lastStart);
if (TclCheckBadOctal(NULL,
Tcl_GetString(copy))) {
Tcl_AppendToObj(post,
|