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

Add more comments to make the code clear #1

Open
isabelafoth opened this issue Aug 1, 2020 · 1 comment
Open

Add more comments to make the code clear #1

isabelafoth opened this issue Aug 1, 2020 · 1 comment

Comments

@isabelafoth
Copy link

Could you comment the code to be more clear about what does what? I'm having trouble modifying it and using it for my own needs.

@pengbo-learn
Copy link
Owner

  1. Tokenizer do lexical analysis, generate a sequence of tokens defined by regular expression.
  2. Parser do syntax analysis, parse the token sequence into a Tree.
  3. Interpreter traverse the tree and execute the math expressions, which should be motified to satisfy your own needs.

The total lines of code is less than 700, most of which is quite straight forward.
If you could make your question more specific, I would be glad to help.

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

2 participants