Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 511 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 511 Bytes

Calculator using ANTLR

only use .g4 file

This calculator saves the value to be stored in the variable in the Map.

In addition, each statement can be separated by ;, and the last statement does not have to be ;. (similar to Rust)

Supports multi-line calculations and storing result in variables.

input

a = 13;
a + 2;
1 + 3 * 2 - 3 * 7
15
-14

input code

code

result

result

It also guarantees operator precedence.