Corrected the version
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@67 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d8ca607836
commit
a4fc295416
1 changed files with 17 additions and 3 deletions
|
|
@ -13,9 +13,7 @@
|
|||
* can be used and distributed.
|
||||
****************************************************************************/
|
||||
|
||||
static char cvsroot[] = "$Header$";
|
||||
|
||||
#include "swigcpp.h"
|
||||
#include "swigcore.h"
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* expr.c
|
||||
|
|
@ -218,6 +216,22 @@ int SWIG_expr(DOH *s, int *error) {
|
|||
*error = 1;
|
||||
return 0;
|
||||
}
|
||||
if ((token == TOKEN_INT) || (token == TOKEN_UINT) || (token == TOKEN_LONG) || (token == TOKEN_ULONG)) {
|
||||
/* A number. Reduce EXPR_TOP to an EXPR_VALUE */
|
||||
stack[sp].value = (long) atol(Char(Scanner_text(scan)));
|
||||
stack[sp].op = EXPR_VALUE;
|
||||
} else if (token == TOKEN_PLUS) { }
|
||||
else if ((token == TOKEN_MINUS) || (token == TOKEN_LNOT) || (token==TOKEN_NOT)) {
|
||||
if (token == TOKEN_MINUS) token = EXPR_UMINUS;
|
||||
stack[sp].value = token;
|
||||
stack[sp++].op = EXPR_OP;
|
||||
stack[sp].op = EXPR_TOP;
|
||||
} else if ((token == TOKEN_LPAREN)) {
|
||||
stack[sp++].op = EXPR_GROUP;
|
||||
stack[sp].op = EXPR_TOP;
|
||||
stack[sp].value = 0;
|
||||
} else if (token == TOKEN_ENDLINE) { }
|
||||
else goto syntax_error;
|
||||
break;
|
||||
case EXPR_VALUE:
|
||||
/* A value is on the stack. We may reduce or evaluate depending on what the next token is */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue