I tested the package for some basic syntax and it seems to provide a parse tree representation for the syntax. But, does it provide any support for traversing the tree and accessing the children nodes, or would you need to implement that on your own?
Also, you should check out the SymPyExpression class at sym_expr.py <https://github.com/sympy/sympy/blob/master/sympy/parsing/sym_expr.py>. I created it as a wrapper to act as a front-end for all the parsers so that the user doesn't have to learn about all the parsers and their APIs differently. The parser you create which will be in the parsing/java module should be called from the SymPyExpression class and the users shouldn't need to interact with the parser directly. You should also check out asy.py <https://github.com/sympy/sympy/blob/master/sympy/codegen/ast.py> to get familiar with SymPy's AST. On Monday, March 16, 2020 at 7:46:57 AM UTC+5:30, Gajjar Smit wrote: > > Hello everyone, > I am Smit Gajjar, a third year undergraduate student pursuing Computer > Engineering at LD College of Engineering, Ahmedabad, India. > > I have been exploring sympy since last year by reading codebase, trying > out examples as well as solving issues recently. I am looking forward to > contribute to sympy through a GSOC project, if I am lucky enough. I have > been using Python, C++ for 3 years in contests and projects as well as Java > for 4 years in school and college practicals and mini-projects. > > I am highly motivated to work towards *creating a Java language Parser*, > which would convert a Java code to corresponding Sympy code. I went through > the codebase of C and Fortran Parser under the parsing module(implemented > by Nikhil Maan last year). I thoroughly read it and tried to grasp how it > works. > > I believe, I can do the same for Java language, since I am quite > comfortable with Java. I am currently revising the concepts of parser and > lexer from our college curriculum of System Programming, Theory of > Computation and Compiler Design and also working on examples involving > *javalang* pip package and *antlr4,* which would make it possible. > > (Overview: C Parser converts C syntax to AST using Clang(external optional > dependency) and Fortran Parser converts Fortran syntax to ASR using > lfortran(external optional dependency). After that, Sympy's own Codegen is > responsible to generate Sympy syntax from AST or ASR. Similar will be case > for Java.) > > Lastly, my question is: Is it okay to carry this forward? If it is, then > is there any other documentation/codebase/issues I should go through to > better familiarize myself with the current status of parsing module? > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/d89ed1bf-f356-4360-9cbf-b0721e332451%40googlegroups.com.
