Examples of Interpreter


Examples of Analyzer.Syntax.Interpreter

    public void paint(Graphics g) {
        super.paint(g);
        g.setColor(Color.black);
        Turtle t = new Turtle(g);
        if (instrucciones.size() > 0) {
            Interpreter interprete = new Interpreter(t);
            try {
                interprete.interpretar(instrucciones);
                Window.ponerAnalizarAceptado();
            }
            catch (RuntimeException ei) {
                Window.ponerAnalizarFallido(ei.getLocalizedMessage());
                //Si encuentra fallo, borra todo lo ejecutado
View Full Code Here

Examples of abstrasy.Interpreter

            });

            this.lockCaretPos();
            while (caretpos >= 0) {
                Interpreter myself = Interpreter.mySelf();
                Interpreter.getSemaphore().sleep(100);
                if (myself.isThreadRaising()) {
                    this.unlockCaretPos();
                    SwingUtilities.invokeLater(new Runnable() {

                        public void run() {
                            fout.setCaretColor(getBackground());
View Full Code Here

Examples of bsh.Interpreter

    /**
     * @param bshFile
     */
    private void loadScript(File bshFile) {
        try {
            mScript = (BeanShellScriptIf) new Interpreter().source(bshFile.getAbsolutePath());
        } catch (Exception e) {
            e.printStackTrace();
            mScript = null;
        }
    }
View Full Code Here

Examples of bsh.Interpreter

        + "return (BeanShellProgramFilterIf) this;";
  }

  private void compileSource() throws EvalError {
    if (mScriptSource != null && mScript == null) {
      mScript = (BeanShellProgramFilterIf) new Interpreter()
          .eval(mScriptSource);
    }
  }
View Full Code Here

Examples of bsh.Interpreter

  protected void testScript() {
    boolean error = false;
    try {
      BeanShellProgramFilterIf filter;
      filter = (BeanShellProgramFilterIf) new Interpreter().eval(mScriptEditor
          .getText());
      filter.accept(Plugin.getPluginManager().getExampleProgram());
    } catch (Exception e) {
      ErrorHandler.handle(mLocalizer.msg("errorParsing",
          "Error while parsing Script"), e);
View Full Code Here

Examples of bsh.Interpreter


    synchronized void createInterpreter() {
        // create interpreter just-in-time
        if(interpreter == null) {
            interpreter=new Interpreter();
            try {
                interpreter.set("bsh_prot", this);
            }
            catch(EvalError evalError) {
            }
View Full Code Here

Examples of bsh.Interpreter

   */
  protected Interpreter createInterpreter()
  {
    try
    {
      final Interpreter interpreter = new Interpreter();
      initializeInterpreter(interpreter);
      return interpreter;
    }
    catch (Throwable e)
    {
View Full Code Here

Examples of bsh.Interpreter

  {
    super();
   
    this.bshScript = bshScript;

    interpreter = new Interpreter();
   
    interpreter.setClassLoader(Thread.currentThread().getContextClassLoader());

    try
    {
View Full Code Here

Examples of bsh.Interpreter

     */
    private final Interpreter initialize(
        Object stub,
        String scriptPath)
    {
        final Interpreter interpreter = new Interpreter();
        interpreter.setClassLoader(stub.getClass().getClassLoader());
        return interpreter;
    }
View Full Code Here

Examples of bsh.Interpreter

    if (DebugFile.trace) {
      DebugFile.writeln("Begin ModelManager.dropDomain(" + sDomainNm + ")");
      DebugFile.incIdent();
    }

    Interpreter oInterpreter = new Interpreter();

    oInterpreter.set ("DomainNm", sDomainNm);
    oInterpreter.set ("DefaultConnection", oConn);

    oInterpreter.eval(getResourceAsString("scripts/domain_drop.js", sEncoding));

    Object obj = oInterpreter.get("ErrorCode");

    Integer oCodError = (Integer) oInterpreter.get("ErrorCode");

    if (oCodError.compareTo(new Integer (0))!=0) {
      iErrors++;
      if (null!=oStrLog) oStrLog.append("EvalError: " + oInterpreter.get("ErrorMessage") + "\n");

      throw new SQLException((String) oInterpreter.get("ErrorMessage"));
    }

    if (DebugFile.trace) {
      DebugFile.decIdent();
      DebugFile.writeln("End ModelManager.dropDomain()");
    }

    if  (oInterpreter.get("ReturnValue")!=null)
      return ( (Integer) oInterpreter.get("ReturnValue")).intValue();
    else
      return 0;
  } // dropDomain
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.