Beispiel #1
0
 private int GoToInitialState(int i)
 {
     CurrentState = MathExpressionStateType.Initial;
     IsToAdd      = false;
     i--;
     return(i);
 }
Beispiel #2
0
 private void HandleInitialState(string value)
 {
     if (value.IsDigit())
     {
         CurrentState = MathExpressionStateType.Digit;
     }
     else if (value.IsOperation())
     {
         CurrentState = MathExpressionStateType.Operation;
     }
     else if (value.IsParentheses())
     {
         CurrentState = MathExpressionStateType.Parentheses;
     }
     else
     {
         CurrentState = MathExpressionStateType.Final;
     }
 }
Beispiel #3
0
 public MathExpressionLexicalAnalyzer()
 {
     CurrentState = MathExpressionStateType.Initial;
 }