Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CTA-LAPP
PHOENIX_LIBS
ParserGenerator
Commits
40654057
Commit
40654057
authored
Jan 13, 2021
by
Pierre Aubert
Browse files
Finish to take account operator priority in the genreated parser, No time to lunch and then test
parent
a4557676
Pipeline
#99316
passed with stages
in 9 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/CppBackEnd/repr_cpp_token_operator.cpp
src/CppBackEnd/repr_cpp_token_operator.cpp
+4
-2
No files found.
src/CppBackEnd/repr_cpp_token_operator.cpp
View file @
40654057
...
...
@@ -58,8 +58,10 @@ std::string repr_cpp_singleTokenOperator(const POperator & op, const PGraphToken
body
+=
"
\t\t
long priorityOp(get_priority_operator(op)), priorityInput(get_priority_operator("
+
varName
+
"));
\n
"
;
body
+=
"
\t\t
if(priorityOp > priorityInput){
\n
"
;
body
+=
"
\t\t\t
//repr_cpp_token_operator : Let's get the last operand of the input "
+
varName
+
"
\n
"
;
body
+=
"
\t\t\t\n
"
;
body
+=
"
\t\t\t\n
"
;
body
+=
"
\t\t\t
PStmt * lastOp = get_last_operand_of_operator("
+
varName
+
");
\n
"
;
body
+=
"
\t\t\t
vecOperand.push_back(*lastOp);
\t
//This is a copy, so it works
\n
"
;
body
+=
"
\t\t\t
vecOperand.push_back(rightOp);
\n
"
;
body
+=
"
\t\t\t
*lastOp = op;
\n
"
;
body
+=
"
\t\t\t\n
"
;
body
+=
"
\t\t\t
isStandardPushBack = false;
\n
"
;
body
+=
"
\t\t
}
\n
"
;
...
...
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