diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-09-12 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-09-12 08:01:00 -0700 |
commit | 75d6d6abd1ccbfeb2ac6e156a015d9888a5727e7 (patch) | |
tree | 5647b0e935c334c2b26b946bafb235f73892e245 /src/bdd/parse | |
parent | 4db86550728b9c5ffeed4a158faf19afd6518b42 (diff) | |
download | abc-75d6d6abd1ccbfeb2ac6e156a015d9888a5727e7.tar.gz abc-75d6d6abd1ccbfeb2ac6e156a015d9888a5727e7.tar.bz2 abc-75d6d6abd1ccbfeb2ac6e156a015d9888a5727e7.zip |
Version abc80912
Diffstat (limited to 'src/bdd/parse')
-rw-r--r-- | src/bdd/parse/parseCore.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/bdd/parse/parseCore.c b/src/bdd/parse/parseCore.c index 0071fb5a..88888379 100644 --- a/src/bdd/parse/parseCore.c +++ b/src/bdd/parse/parseCore.c @@ -362,6 +362,7 @@ DdNode * Parse_FormulaParser( FILE * pOutput, char * pFormulaInit, int nVars, in default: // scan the next name +/* fFound = 0; for ( i = 0; pTemp[i] && pTemp[i] != ' ' && pTemp[i] != '\t' && pTemp[i] != '\r' && pTemp[i] != '\n'; i++ ) { @@ -375,13 +376,31 @@ DdNode * Parse_FormulaParser( FILE * pOutput, char * pFormulaInit, int nVars, in if ( fFound ) break; } +*/ + // bug fix by SV (9/11/08) + fFound = 0; + for ( i = 0; pTemp[i] && pTemp[i] != ' ' && pTemp[i] != '\t' && pTemp[i] != '\r' && pTemp[i] != '\n' && + pTemp[i] != PARSE_SYM_AND1 && pTemp[i] != PARSE_SYM_AND2 && pTemp[i] != PARSE_SYM_XOR1 && + pTemp[i] != PARSE_SYM_XOR2 && pTemp[i] != PARSE_SYM_XOR3 && pTemp[i] != PARSE_SYM_XOR && + pTemp[i] != PARSE_SYM_OR1 && pTemp[i] != PARSE_SYM_OR2 && pTemp[i] != PARSE_SYM_CLOSE; + i++ ) + {} + for ( v = 0; v < nVars; v++ ) + { + if ( strncmp( pTemp, ppVarNames[v], i ) == 0 && strlen(ppVarNames[v]) == (unsigned)(i) ) + { + pTemp += i-1; + fFound = 1; + break; + } + } + if ( !fFound ) { fprintf( pOutput, "Parse_FormulaParser(): The parser cannot find var \"%s\" in the input var list.\n", pTemp ); Flag = PARSE_FLAG_ERROR; break; } - // assume operation AND, if vars follow one another if ( Flag == PARSE_FLAG_VAR ) Parse_StackOpPush( pStackOp, PARSE_OPER_AND ); |