private void State_34() { if (ActionStack.Last() != ActionStack.WrongLexem) { Action returnState = ActionStack.Pop(); returnState(); } }
private void State_29() { if (CurrentLexemValue() == "next") { Action returnState = ActionStack.Pop(); lexemsIterator++; returnState(); } else { throw new LexemException(CurrentLineNumber(), "Missed next"); } }
private void State_53() { if (CurrentLexemValue() == "or" || CurrentLexemValue() == "and") { CurrentState = 51; lexemsIterator++; State_51(); } else { Action returnState = ActionStack.Pop(); returnState(); } }
private void State_33() { if (CurrentLexemValue() == "}") { Action returnState = ActionStack.Pop(); lexemsIterator++; returnState(); } else { ActionStack.Push(State_32); HalfAutomatOperator(); } }
private void State_42() { HashSet <string> operators = new HashSet <string>() { "+", "-", "*", "/", "^" }; if (operators.Contains(CurrentLexemValue())) { CurrentState = 41; lexemsIterator++; State_41(); } else { Action returnState = ActionStack.Pop(); returnState(); } }
private void State_16() { if (CurrentLexemValue() == ",") { CurrentState = 15; lexemsIterator++; State_15(); } else if (CurrentLexemValue() == ")") { Action returnState = ActionStack.Pop(); lexemsIterator++; returnState(); } else { throw new LexemException(CurrentLineNumber(), "Missed ) or ,"); } }