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 optional local_parser_constants to Parser #1773

Merged
merged 2 commits into from
Apr 15, 2021

Conversation

lkeegan
Copy link
Member

@lkeegan lkeegan commented Apr 12, 2021

@isuruf-bot
Copy link

isuruf-bot commented Apr 12, 2021

Hi,

I've run clang-format and found that the code formatting is good.

Thanks for fixing the formatting.

- add parse_julia function that uses "im" for I
- implemented as described in symengine#1462
Copy link
Contributor

@rikardn rikardn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea and everything looks sane.

symengine/parser/parser.h Outdated Show resolved Hide resolved
Copy link
Member

@isuruf isuruf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Everything looks good except for a minor comment.

symengine/parser.h Outdated Show resolved Hide resolved
@@ -7,6 +7,7 @@ namespace SymEngine
{

RCP<const Basic> parse(const std::string &s, bool convert_xor = true);
RCP<const Basic> parse_julia(const std::string &s, bool convert_xor = true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a special function for julia, but we should add a function like basic_parse2 to expose sending local_parser_constants to parse C++ function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a string->basic map type in the cwrapper, should I add a CMapStrBasic for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. See also #1378

@isuruf isuruf merged commit f94a503 into symengine:master Apr 15, 2021
@lkeegan lkeegan deleted the fix_1462 branch April 15, 2021 11:56
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

Successfully merging this pull request may close these issues.

4 participants