You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the first homework you will download antlr and build a calculator. Your calculator should have the following features:
The power function: ^; for example, 4 ^ 2 is 16
The modulo function: %; for example, 5 % 2 is 1
The assignment operator = ; for example, a = 5 or a = b + c.
Note that for this assignment, your program does not need implement the actual calculation. It only needs to recognize the syntax and output any syntax errors.
Task
Please create Calc.g4 and run the example with the -gui option. We will test out the three requirements above and we will also test for syntax errors.
Grading Scale/Criteria
5 completed correctly + enhancements
4 all requirements are met
3 all but a few requirements are met
2 significant number of requires are missing
0 not completed
Submission
Students will need to demonstrate their homework assignment in class.
The text was updated successfully, but these errors were encountered:
Overview
For the first homework you will download
antlr
and build a calculator. Your calculator should have the following features:power
function:^
; for example,4 ^ 2
is16
modulo
function:%
; for example,5 % 2
is1
=
; for example,a = 5
ora = b + c
.Note that for this assignment, your program does not need implement the actual calculation. It only needs to recognize the syntax and output any syntax errors.
Task
Please create
Calc.g4
and run the example with the-gui
option. We will test out the three requirements above and we will also test for syntax errors.Grading Scale/Criteria
Submission
Students will need to demonstrate their homework assignment in class.
The text was updated successfully, but these errors were encountered: