Use SWIG_GE, SWIG_LE, etc instead of >=, <= since the latter cause
problems when used as template parameters. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9366 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a84b5110d7
commit
cf52954bbb
3 changed files with 17 additions and 5 deletions
|
|
@ -5469,20 +5469,23 @@ exprcompound : expr PLUS expr {
|
|||
}
|
||||
/* Sadly this causes 2 reduce-reduce conflicts with templates. FIXME resolve these.
|
||||
| expr GREATERTHAN expr {
|
||||
$$.val = NewStringf("%s>%s",$1.val,$3.val);
|
||||
$$.val = NewStringf("%s SWIG_LT %s", $1.val, $3.val);
|
||||
$$.type = T_INT;
|
||||
}
|
||||
| expr LESSTHAN expr {
|
||||
$$.val = NewStringf("%s<%s",$1.val,$3.val);
|
||||
$$.val = NewStringf("%s SWIG_GT %s", $1.val, $3.val);
|
||||
$$.type = T_INT;
|
||||
}
|
||||
*/
|
||||
| expr GREATERTHANOREQUALTO expr {
|
||||
$$.val = NewStringf("%s>=%s",$1.val,$3.val);
|
||||
/* Putting >= in the expression literally causes an infinite
|
||||
* loop somewhere in the type system. Just workaround for now
|
||||
* - SWIG_GE is defined in swiglabels.swg. */
|
||||
$$.val = NewStringf("%s SWIG_GE %s", $1.val, $3.val);
|
||||
$$.type = T_INT;
|
||||
}
|
||||
| expr LESSTHANOREQUALTO expr {
|
||||
$$.val = NewStringf("%s<=%s",$1.val,$3.val);
|
||||
$$.val = NewStringf("%s SWIG_LE %s", $1.val, $3.val);
|
||||
$$.type = T_INT;
|
||||
}
|
||||
| expr QUESTIONMARK expr COLON expr %prec QUESTIONMARK {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue