Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Tree.h"
- User::User(Tree_node * Top)
- {
- Start_source_tree = Top;
- Top_ = *Top;
- }
- void User::Select(Tree_node Top_node_source, string Rule)
- {
- if (Top_node_source.Name_of_node == Rule)
- {
- Buf_.Down.insert(Buf_.Down.end(), &Top_node_source);
- }
- else
- {
- for (int n =0; n < Top_node_source.Down.size(); ++n)
- {
- Select(*Top_node_source.Down[n], Rule);
- }
- }
- }
- void User::Print(Tree_node Tree_node_source, vector<string> Rule_print)
- {
- if(Tree_node_source.IsAHum_ == 1)
- {
- }
- for(int n = 0; n < Tree_node_source.Down.size(); n++)
- {
- Print(*Tree_node_source.Down[n], Rule_print);
- }
- }
- int User::Parse (string Inp_str)
- {
- Buf_ = Empty;
- Select(Top_, "pravilo");
- vector<string> sooqa;
- sooqa.insert(sooqa.end(), "sooqa");
- Print (Top_, sooqa);
- Top_ = Buf_;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement