tags:

views:

73

answers:

1

Hello... I am using rhino and Scripting for the Java Platform in order to allow the user extend my application.

However the user can write some cases eg (ASTO.value>440) || (ASTO.bellowNormal) etc... The problem is that before running the script from my JAVA application using ScriptEngine i want to get the names of all the variables! Because i should know which variables are required for the script to run... I know that a regular expression would do the job but i amnt sure... Please i somebody could help me figure out the java regexp to get the variables i would really appriciate it..

A: 

I found a solution cx.getDebuggableView(result).getParamAndVarCount() But it doesnt return undeclared variables:(

Parhs