Repository navigation
ЛР2. Коваленко Артем гр.5093 - #1937
Open
ZeroTangans wants to merge 11 commits into
Open
ZeroTangans wants to merge 11 commits into
ZeroTangans wants to merge 11 commits into
Conversation
Dovgalyuk
requested changes
Oct 27, 2026
| @@ -0,0 +1,127 @@ | |||
| #include "Lab2CPP.h" | |||
| #include "../LibraryCPP/stack.h" | |||
Owner
There was a problem hiding this comment.
Пути нужно прописывать с CMakeLists.txt
|
|
||
| static bool check(const vector<string>& tokens) { | ||
| bool token = false; | ||
| int bracketCount = 0; |
Owner
There was a problem hiding this comment.
Это бесполезно здесь проверять, лучше это делать при разборе выражения.
| return token && bracketCount == 0; | ||
| } | ||
|
|
||
| vector<string>* tokens_create_and_read(ifstream& input) |
Dovgalyuk
reviewed
Oct 28, 2026
| else if (c == ')') { | ||
| if (!token) return nullptr; | ||
| bracketCount--; | ||
| if (bracketCount < 0) return nullptr; |
Owner
There was a problem hiding this comment.
Скобки считать бесполезно, а не функцию проверки делать.
Dovgalyuk
requested changes
Oct 29, 2026
| aux.push_back(t); | ||
| } | ||
| else if (t == "+" || t == "-" || t == "*" || t == "/") { | ||
| if (!pri) { |
Dovgalyuk
reviewed
Oct 30, 2026
|
|
||
| add_test(NAME RPN_Test20 | ||
| COMMAND RPN ${CMAKE_CURRENT_SOURCE_DIR}/Tests/Test2_10.txt) | ||
| set_property(TEST RPN_Test20 PROPERTY PASS_REGULAR_EXPRESSION "Invalid expression") No newline at end of file |
Owner
There was a problem hiding this comment.
Не все ошибочные ситуации проверяются.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.