-
Notifications
You must be signed in to change notification settings - Fork 7
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
Initial parser implementation #74
Conversation
The parser and AST was taken from LPython. In subsequent commits we will start modifying it to parse C++.
TODO: get |
@czgdp1807, @Shaikh-Ubaid I don't have time to completely finish it. Go ahead and take it from here, if this is good enough, you can merge it. We need to get |
src/libasr/asdl_cpp.py
Outdated
elif subs["MOD"] == "LC": | ||
subs["MOD"] = "LC::AST" | ||
subs["mod"] = "ast" | ||
subs["lcompiler"] = "lpython" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be subs["lcompiler"] = "lc"
.
src/bin/lc.cpp
Outdated
@@ -713,7 +713,7 @@ int mainApp(int argc, const char **argv) { | |||
app.add_flag("--ast-print", ast_print, "Build ASTs and then pretty-print them"); | |||
app.add_flag("--ast-dump-filter", ast_dump_filter, "Use with -ast-dump or -ast-print to dump/print" | |||
" only AST declaration nodes having a certain substring in a qualified name."); | |||
app.add_flag("--show-ast", show_ast, "Show AST for the given file and exit"); | |||
app.add_flag("--show-clang-ast", show_clang_ast, "Show AST for the given file and exit"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app.add_flag("--show-clang-ast", show_clang_ast, "Show AST for the given file and exit"); | |
app.add_flag("--show-clang-ast", show_clang_ast, "Show Clang AST for the given file and exit"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. Thank you so much for this. We can iterate on this.
The parser and AST was taken from LPython. In subsequent commits we will start modifying it to parse C++.