Fork me on GitHub

Changeset 7692efc in git for external/tcl/tclCompExpr.c


Ignore:
Timestamp:
Aug 16, 2019, 11:14:50 AM (5 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, master
Children:
0e7d64a
Parents:
94f8f5f (diff), 270bd4f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:delphes/delphes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • external/tcl/tclCompExpr.c

    r94f8f5f r7692efc  
    3131#define ERANGE 34
    3232#endif
    33 
    34 /*
    35  * Boolean variable that controls whether expression compilation tracing
    36  * is enabled.
    37  */
    38 
    39 #ifdef TCL_COMPILE_DEBUG
    40 static int traceCompileExpr = 0;
    41 #endif /* TCL_COMPILE_DEBUG */
    4233
    4334/*
     
    132123#define NOT             (COLON + 1)
    133124#define BIT_NOT         (NOT + 1)
    134 
    135 /*
    136  * Mapping from tokens to strings; used for debugging messages. These
    137  * entries must match the order and number of the token definitions above.
    138  */
    139 
    140 #ifdef TCL_COMPILE_DEBUG
    141 static char *tokenStrings[] = {
    142     "LITERAL", "FUNCNAME",
    143     "[", "]", "(", ")", "$", "\"", ",", "END", "UNKNOWN",
    144     "*", "/", "%", "+", "-",
    145     "<<", ">>", "<", ">", "<=", ">=", "==", "!=",
    146     "&", "^", "|", "&&", "||", "?", ":",
    147     "!", "~"
    148 };
    149 #endif /* TCL_COMPILE_DEBUG */
    150125
    151126/*
     
    198173                            ExprInfo *infoPtr, CompileEnv *envPtr));
    199174
    200 /*
    201  * Macro used to debug the execution of the recursive descent parser used
    202  * to compile expressions.
    203  */
    204 
    205 #ifdef TCL_COMPILE_DEBUG
    206 #define HERE(production, level) \
    207     if (traceCompileExpr) { \
    208         fprintf(stderr, "%*s%s: token=%s, next=\"%.20s\"\n", \
    209                 (level), " ", (production), tokenStrings[infoPtr->token], \
    210                 infoPtr->next); \
    211     }
    212 #else
    213 #define HERE(production, level)
    214 #endif /* TCL_COMPILE_DEBUG */
    215175
    216176
     
    277237                                 * to execute the expression. */
    278238    int result;
    279 
    280 #ifdef TCL_COMPILE_DEBUG
    281     if (traceCompileExpr) {
    282         fprintf(stderr, "expr: string=\"%.30s\"\n", string);
    283     }
    284 #endif /* TCL_COMPILE_DEBUG */
    285239
    286240    /*
     
    409363    int elseCodeOffset, currCodeOffset, jumpDist, result;
    410364   
    411     HERE("condExpr", 1);
    412365    result = CompileLorExpr(interp, infoPtr, flags, envPtr);
    413366    if (result != TCL_OK) {
     
    571524    Tcl_Obj *objPtr;
    572525   
    573     HERE("lorExpr", 2);
    574526    result = CompileLandExpr(interp, infoPtr, flags, envPtr);
    575527    if ((result != TCL_OK) || (infoPtr->token != OR)) {
     
    739691    Tcl_Obj *objPtr;
    740692
    741     HERE("landExpr", 3);
    742693    result = CompileBitOrExpr(interp, infoPtr, flags, envPtr);
    743694    if ((result != TCL_OK) || (infoPtr->token != AND)) {
     
    899850    int result;
    900851
    901     HERE("bitOrExpr", 4);
    902852    result = CompileBitXorExpr(interp, infoPtr, flags, envPtr);
    903853    if (result != TCL_OK) {
     
    970920    int result;
    971921
    972     HERE("bitXorExpr", 5);
    973922    result = CompileBitAndExpr(interp, infoPtr, flags, envPtr);
    974923    if (result != TCL_OK) {
     
    1041990    int result;
    1042991
    1043     HERE("bitAndExpr", 6);
    1044992    result = CompileEqualityExpr(interp, infoPtr, flags, envPtr);
    1045993    if (result != TCL_OK) {
     
    11121060    int op, result;
    11131061
    1114     HERE("equalityExpr", 7);
    11151062    result = CompileRelationalExpr(interp, infoPtr, flags, envPtr);
    11161063    if (result != TCL_OK) {
     
    11901137    int op, result;
    11911138
    1192     HERE("relationalExpr", 8);
    11931139    result = CompileShiftExpr(interp, infoPtr, flags, envPtr);
    11941140    if (result != TCL_OK) {
     
    12771223    int op, result;
    12781224
    1279     HERE("shiftExpr", 9);
    12801225    result = CompileAddExpr(interp, infoPtr, flags, envPtr);
    12811226    if (result != TCL_OK) {
     
    13551300    int op, result;
    13561301
    1357     HERE("addExpr", 10);
    13581302    result = CompileMultiplyExpr(interp, infoPtr, flags, envPtr);
    13591303    if (result != TCL_OK) {
     
    14331377    int op, result;
    14341378
    1435     HERE("multiplyExpr", 11);
    14361379    result = CompileUnaryExpr(interp, infoPtr, flags, envPtr);
    14371380    if (result != TCL_OK) {
     
    15131456    int op, result;
    15141457
    1515     HERE("unaryExpr", 12);
    15161458    op = infoPtr->token;
    15171459    if ((op == PLUS) || (op == MINUS) || (op == BIT_NOT) || (op == NOT)) {
     
    16081550     */
    16091551
    1610     HERE("primaryExpr", 13);
    16111552    theToken = infoPtr->token;
    16121553
Note: See TracChangeset for help on using the changeset viewer.