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

[FEATURE] Command-line interface (CLI) and Read-Eval-Print loop (REPL) #7

Open
2 tasks
tommens opened this issue Dec 29, 2024 · 0 comments
Open
2 tasks
Labels
enhancement New feature or request

Comments

@tommens
Copy link
Collaborator

tommens commented Dec 29, 2024

Describe the new functionality you would like to see

  • In order to make the Calculator usable in practice, a command-line interface (CLI) should be implemented to introduce and evaluate arithmetic expressions from the console or terminal. To do so, we need support for a a Read-Eval-Print Loop (REPL): when running the application, the user gets a command-line prompt on his console, where he can enter an arbitrary string. This string will be read, parsed and converted into a syntactically valid expression, or a syntax error will be returned if the string does not respect the correct syntax. Valid expressions will be evaluated, and the result of the evaluation will be printed on the console. Then, we can continue with entering a new string to repeat the same process over and over again.
  • The CLI should come with a built-in help function with instructions on how to use the different functionalities of the calculator.

Prerequisite
A prerequisite for realising this feature is the presence of an expression parser, as described in issue #8 .

@tommens tommens added the enhancement New feature or request label Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant