mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0025329: ExprIntrp_GenExp can not parse unary plus
Formatting Test case for issue CR25329
This commit is contained in:
parent
3910bc6501
commit
ab1469893c
@ -28,6 +28,7 @@ extern void ExprIntrp_ProductOperator();
|
||||
extern void ExprIntrp_DivideOperator();
|
||||
extern void ExprIntrp_ExpOperator();
|
||||
extern void ExprIntrp_UnaryMinusOperator();
|
||||
extern void ExprIntrp_UnaryPlusOperator();
|
||||
extern void ExprIntrp_VariableIdentifier();
|
||||
extern void ExprIntrp_NumValue();
|
||||
extern void ExprIntrp_EndFunction();
|
||||
@ -98,6 +99,7 @@ GenExpr : GenExpr SUMOP GenExpr {ExprIntrp_SumOperator();}
|
||||
| PARENTHESIS GenExpr ENDPARENTHESIS
|
||||
| BRACKET GenExpr ENDBRACKET
|
||||
| MINUSOP GenExpr {ExprIntrp_UnaryMinusOperator();}
|
||||
| SUMOP GenExpr {ExprIntrp_UnaryPlusOperator();}
|
||||
| SingleExpr
|
||||
| Derivation
|
||||
| ConstantDefinition
|
||||
|
@ -430,6 +430,12 @@ extern "C" void ExprIntrp_UnaryMinusOperator()
|
||||
ExprIntrp_Recept.Push(res->ShallowSimplified());
|
||||
}
|
||||
|
||||
extern "C" void ExprIntrp_UnaryPlusOperator()
|
||||
{
|
||||
Handle(Expr_GeneralExpression) op = ExprIntrp_Recept.Pop();
|
||||
ExprIntrp_Recept.Push(op);
|
||||
}
|
||||
|
||||
extern "C" void ExprIntrp_VariableIdentifier()
|
||||
{
|
||||
const TCollection_AsciiString& thename = ExprIntrp_GetResult();
|
||||
|
11
tests/bugs/fclasses/bug25329
Executable file
11
tests/bugs/fclasses/bug25329
Executable file
@ -0,0 +1,11 @@
|
||||
puts "============"
|
||||
puts "OCC25329"
|
||||
puts "============"
|
||||
puts ""
|
||||
#######################################################################
|
||||
# ExprIntrp_GenExp can not parse unary plus
|
||||
#######################################################################
|
||||
|
||||
pload QAcommands
|
||||
|
||||
OCC22611 "+1" 1
|
Loading…
x
Reference in New Issue
Block a user