Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
ff0af050
Commit
ff0af050
authored
Jan 18, 2013
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed CNF expressions transformations with explicit braces
parent
e4ea524f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
src/plugins/kumiranalizer/syntaxanalizer.cpp
src/plugins/kumiranalizer/syntaxanalizer.cpp
+4
-0
src/shared/dataformats/ast_expression.cpp
src/shared/dataformats/ast_expression.cpp
+1
-0
src/shared/dataformats/ast_expression.h
src/shared/dataformats/ast_expression.h
+4
-0
No files found.
src/plugins/kumiranalizer/syntaxanalizer.cpp
View file @
ff0af050
...
...
@@ -3310,6 +3310,7 @@ AST::Expression * SyntaxAnalizerPrivate::parseExpression(
if
(
oper
)
{
subexpression
<<
oper
;
}
operand
->
expressionIsClosed
=
true
;
}
// end if (blockType==SubExpression)
else
if
(
blockType
==
None
)
{
if
(
oper
)
{
...
...
@@ -4601,6 +4602,9 @@ AST::Expression * SyntaxAnalizerPrivate::makeExpressionTree(const QList<Subexpre
(
tailIsLiteral
&&
literalOperands
)
);
if
(
headExpr
->
expressionIsClosed
)
makeCNF
=
false
;
if
(
makeCNF
)
{
AST
::
Expression
*
res
=
new
AST
::
Expression
;
res
->
kind
=
AST
::
ExprSubexpression
;
...
...
src/shared/dataformats/ast_expression.cpp
View file @
ff0af050
...
...
@@ -11,6 +11,7 @@ Expression::Expression()
baseType
.
kind
=
TypeNone
;
variable
=
NULL
;
function
=
NULL
;
expressionIsClosed
=
false
;
constant
=
QVariant
::
Invalid
;
operatorr
=
AST
::
OpNone
;
dimension
=
0
;
...
...
src/shared/dataformats/ast_expression.h
View file @
ff0af050
...
...
@@ -92,6 +92,10 @@ struct ABSTRACTSYNTAXTREE_EXPORT Expression {
*/
QList
<
struct
Expression
*>
operands
;
/** True if expression () bounds.
* This flag is used to avoid CNF-transofmations */
bool
expressionIsClosed
;
/** Operator in case of kind==StSubexpression, emty otherwise */
enum
ExpressionOperator
operatorr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment