- 입력: target = operand1 + operand2 * 428
- 출력
~cpp
<identifier>: target parsed.
<assignment_operator> parsed.
<identifier>: operand1 parsed.
<factor> parsed.
<term> parsed.
<plus_operator> parsed.
<identifier>: operand2 parsed.
<factor> parsed.
<star_operator> parsed.
<constant>: 428 parsed.
<factor> parsed.
<term> parsed.
<term> parsed.
<expression> parsed.
<expression> parsed.
<statement> parsed.
<statements> parsed.
<start> parsed.
Yes!!
- 입력: target = operand1 + + operand2
- 출력
~cpp
<identifier>: target parsed.
<assignment_operator> parsed.
<identifier>: operand1 parsed.
<factor> parsed.
<term> parsed.
<plus_operator> parsed.
ERROR : plus-operator
<identifier>: operand2 parsed.
<factor> parsed.
<term> parsed.
<expression> parsed.
<expression> parsed.
<statement> parsed.
<statements> parsed.
<start> parsed.
No!!
- 입력: target = op1 > op2 ? op3 : op4 * op5
- 출력
~cpp
<identifier>: target parsed.
<assignment_operator> parsed.
<identifier>: op1 parsed.
<greater_keyword> parsed.
<condition> parsed.
<identifier>: op2 parsed.
<question_operator> parsed.
<identifier>: op3 parsed.
<colon> parsed.
<identifier>: op4 parsed
<compare_value> parsed.
<factor> parsed.
<star_operator> parsed.
<identifier>: op5 parsed.
<factor> parsed.
<term> parsed.
<term> parsed.
<expression> parsed.
<statement> parsed.
<statements> parsed.
<start> parsed.
YES!!
- 입력: target = op1 > op2 ? op3
- 출력
~cpp
<identifier>: target parsed.
<assignment_operator> parsed.
<identifier>: op1 parsed.
<greater_keyword> parsed.
<condition> parsed.
<identifier>: op2 parsed.
<question_operator> parsed.
<identifier>: op3 parsed.
ERROR : colon
<compare_value> parsed.
<factor> parsed.
<term> parsed.
<expression> parsed.
<statement> parsed.
<statements> parsed.
<start> parsed.
NO!!