As you have stated previously, the framework need not detect the language 
that it is parsing from and the user provides input regarding that. Now, 
since this is a Mathematica string, we directly specify it to be so. In the 
specification for Mathematica, we define that functions take arguments via 
[ ] instead of the normal ( ). Also, we define that the built in functions 
start with a capital letter and so their Sympy equivalent includes 
converting them to lower case. And lastly the information about the inverse 
trignometric function is given telling the framework to drop the 'Arc' and 
add 'a' as a suffix to the function name. As for the framework, once the 
specification is given we can construct a form of Earley parser to parse 
the strings.

So in this case, the flow will be something of the form:

ArcSin[Sqrt[x]] ==> asin(Sqrt[x]) ==> asin(sqrt(x)) (which is the final 
string)

So actually there would be a module that will generate a parser given a 
specification. The actual parsing takes place using the generated parser.

I think that Sympy needs a proper parsing framework so that it can be 
extended very easily to other languages. I will work on the exact details 
of the specification file (what input should be taken from the user 
regarding the specification of the new language).

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/cb5e7257-b8ac-430f-a9b0-3825cfe35b45%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to