Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homework 1 #1

Open
john-csula opened this issue Sep 12, 2017 · 0 comments
Open

Homework 1 #1

john-csula opened this issue Sep 12, 2017 · 0 comments

Comments

@john-csula
Copy link
Contributor

john-csula commented Sep 12, 2017

Overview

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant