Hi Christophe,
I would like to illustrate the process with an example. If the input string 
is "Sqrt[x]", since such a format for square root function belongs only in 
Mathematica spec, we can then proceed to convert the string to its sympy 
equivalent. If the string is "\sqrt[x]", the leading "\" distinguishes the 
string to belong to the Latex spec. 

What my point is that we can pre-analyze the commonly occurring keywords 
and functions such as sqrt or sin and make a list of them for the language 
for which you want to write the parser. Then when the input string comes, 
we can match the string to the lists and decide on the language after which 
it can be passed to a relevant parser. 

I propose this because this framework can be extended. All the developer 
has to do is write a list of commonly occurring words(keywords and common 
functions) and also the function style( [] vs () ) and then can proceed to 
write the parser for the language. This way the parser module in sympy can 
be made modular and extensible as suggested by Aaron previously.

So the structure will look like:

Language Recognizer ====> Relevant Language Parser ====> FInal sympy parser 
to evaluate the expressions.

Thanks,
Aditya Shah

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to