node* get_P(){ node* val = node_new(); if (syntax_errno) return 0; if (*cur_c == '(') { ++cur_c; val = get_E(); if (*cur_c != ')') { syntax_errno = cur_c; return 0; } ++cur_c; return val; } else { val = get_N(); return val; } return 0; }
void sync_const() { String s; Form2->Edit1->Text = get_nb(); Form2->Edit2->Text = get_k(); Form2->Edit3->Text = make_name(get_Pb()); Form2->Edit4->Text = make_name(get_E()); Form2->Edit5->Text = make_name(get_G()); }
node* get_G0(char* input_string){ node* val = node_new(); cur_c = input_string; val = get_E(); if (*cur_c == '\0' && syntax_errno == 0) return val; return val; }
node* get_E(){ node* val = node_new(); val = get_T(); if (syntax_errno) return 0; if (*cur_c == '+' || *cur_c == '-'){ node* operation = node_new(); operation -> data = *cur_c; ++cur_c; operation -> left = val; operation -> right = get_E(); return operation; } return val; }