I can try to explain: If you use Interpreter#eval you have the following:
1st interpreted int Function(){...}
Then interpreted return 1;
Interpretation stops. Remainning } is not interpreted.
In order to make syntaxis validation of the whole script try this:
          Parser parser = new Parser(new StringBufferInputStream(script));
          while (! (parser.Line())) {
Best regards
-----Original Message-----
From: beanshell-users-admin@lists.sourceforge.net [mailto:beanshell-users-admin@lists.sourceforge.net]On Behalf Of Achyuth
Sent: Friday, December 17, 2004 8:56 AM
To: beanshell-users@lists.sourceforge.net
Subject: [Beanshell-users] How much java syntax validation is supported?



I am using beanshell to validate some scripts. I want to know to what extent beanshell is validating the script(syntactically)?


I tried this: (just a sample)

int Function()


            int a = 10;

            b = 10 + a;


return 1;



Beanshell takes this to be valid. Is there any document that can help me out with this?


Thank you,

Kind Regards,