<html> <body bgcolog=#ffffff> <h1>Map to the BeanShell Source</h1> This is a rough guide to the BeanShell source code. See comments in the individual files for more information. <p> <h2>Package Areas</h2> <ul> <li><b>bsh</b> Primary bsh source package <li><b>bsh/util</b> Optional bsh utilities <li><b>bsh/commands</b> Bsh scripts and Java code which implement Bsh commands <li><b>bsh/lib</b> Bsh support files </ul> <h3>The bsh package</h3> <b>Parse Tree Classes</b> <ul> <li><b>BSH*.java</b> <br> <em>e.g. BSHAllocationExpression.java, BSHAmbiguousName.java, BSHArguments.java</em> <p> These are the abstract syntax tree nodes (subclasses of SimpleNode) - the internally compiled form of a bsh script. Instances of these nodes are created by the parser to represent the bsh syntax read from a script. <p> The original class structure was created by JJTree but these files are *not* automatically generated any longer. They have been implemented with the real code that executes their syntax. <p> Most BSH nodes are referenced only through their eval() method which causes them to evaluate any child nodes and execute their behavior, returning an object to the caller. <p> <li><b>SimpleNode.java</b> Base class for BSH nodes. <li><b>ReturnControl.java</b> Support for control flow of a return statement. </ul> <b>I/O support</b> <ul> <li><b>CommandLineInputStream.java</b> Basic support for command line input. <li><b>Console.java</b> Support for starting a GUI console. <li><b>ConsoleInterface.java</b> <li><b>File.java</b> File I/O that works relative to the bsh notion of the working directory. <li><b>ExternalVars.java</b> Interface for setting/getting variables on a bsh interpreter. </ul> <b>Exceptions</b> <ul> <li><b>EvalError.java</b> A problem occurred while parsing or running a bsh script. <li><b>InterpreterError.java</b> A fatal internal error occurred. <li><b>TargetError.java</b> The target of a bsh operation threw an exception which the script is allowed to handle. </ul> <b>Name Resolution Support</b> <ul> <li><b>Name.java</b> <li><b>NameSpace.java</b> <li><b>ForBodyNameSpace.java</b> </ul> <b>Object / Primitive Wrappers</b> <ul> <li><b>Primitive.java</b> Wraps a primitive numeric value, char, boolean, void, or null. <li><b>LHS.java</b> Wraps the left hand side of an assignment </ul> <b>Reflection Support</b> <ul> <li><b>Reflect.java</b> <li><b>ReflectError.java</b> </ul> <b>Bsh Scripted Object Support</b> <ul> <li><b>This.java</b> The type of a bsh scripted object (a 'this' reference). <li><b>JThis.java</b> For backwards compatability with jdk1.2. Adds explicit Swing support. <li><b>XThis.java</b> Extended 'this' with support for the new jdk1.3 proxy mechanism. </ul> <b>Automatically Generated Files</b> <br> The following files are automatically generated by JTree or JavaCC and should *not* be modified directly. <ul> <li><b>Interpreter.java</b> This is the actual parser class. <li><b>ASCII_UCodeESC_CharStream.java</b> <li><b>TokenMgrError.java</b> <li><b>Token.java</b> <li><b>ParseException.java</b> <li><b>InterpreterConstants.java</b> <li><b>InterpreterTokenManager.java</b> <li><b>InterpreterTreeConstants.java</b> <li><b>JJTInterpreterState.java</b> <li><b>Node.java</b> </ul> <p>