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

#133 refactor lexer #146

Merged
merged 19 commits into from
Oct 16, 2023
Merged

#133 refactor lexer #146

merged 19 commits into from
Oct 16, 2023

Conversation

fktn-k
Copy link
Owner

@fktn-k fktn-k commented Oct 15, 2023

In this PR, the lexical_analyzer class has been refactored by:

  • implementing the input_handler class as a handler of an input adapter,
  • implementing from_string template functions to generalize conversions from string tokens to native data type values,
  • and deleting duplicate conversion checks for resulting token values.

Furthermore, some small fixes have also been applied such as typos in test case labels or splitting some too complicated functions into somewhat understandably sized ones.

With the changes described above, backward compatibility is still guranteed since previous v0.1 releases.

@fktn-k fktn-k added the improvement refactoring or optimization without public API changes label Oct 15, 2023
@fktn-k fktn-k added this to the Release v0.1.2 milestone Oct 15, 2023
@fktn-k fktn-k self-assigned this Oct 15, 2023
@fktn-k
Copy link
Owner Author

fktn-k commented Oct 15, 2023

TODOs for myself:

  • Add doxygen comments for input_handler class and from_string template functions
  • Use std::strtoxxx() for signed/unsigned long types may increase performance

@fktn-k
Copy link
Owner Author

fktn-k commented Oct 16, 2023

TODOs for myself:

  • Add doxygen comments for input_handler class and from_string template functions
  • Use std::strtoxxx() for signed/unsigned long types may increase performance

I changed implementation to use std::stoxxx() instead of std::strtoxxx() to minimize differences among platforms/compilers in how to handle/express error cases.

@fktn-k fktn-k merged commit b19a23e into develop Oct 16, 2023
103 checks passed
@fktn-k fktn-k deleted the feature/133_refactor_lexer branch October 16, 2023 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement refactoring or optimization without public API changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant