Package com.google.minijoe.compiler

Examples of com.google.minijoe.compiler.CompilerException


      dos.write('J');
      dos.write('o');
      dos.write('e');
      dos.write(0x00); // version
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here


      if (comment != null) {
        dos.write(BLOCK_COMMENT);
        dos.writeUTF(comment);
      }
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here

        for (int i = 0; i < globalStringTable.size(); i++) {
          dos.writeUTF((String) globalStringTable.elementAt(i));
        }
      }
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here

        for (int i = 0; i < numberLiterals.size(); i++) {
          dos.writeDouble(((Double) numberLiterals.elementAt(i)).doubleValue());
        }
      }
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here

          dos.writeShort((short) ((Integer) globalStringMap.get(stringLiterals
              .elementAt(i))).intValue());
        }
      }
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here

        for (int i = 0; i < variables.length; i++) {
          dos.writeShort((short) ((Integer) globalStringMap.get(variables[i].string)).intValue());
        }
      }
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here

        for (int i = 0; i < functionLiterals.size(); i++) {
          dos.write((byte[]) functionLiterals.elementAt(i));
        }
      }
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here

        String label = (String) unresolvedJumps.elementAt(i);
        int address = ((Integer) unresolvedJumps.elementAt(i + 1)).intValue();
        Integer target = (Integer) jumpLabels.get(label);

        if (target == null) {
          throw new CompilerException("Unresolved Jump Label: " + label);
        }

        int delta = target.intValue() - address - 2;

        code[address + 0] = (byte) (delta >> 8);
        code[address + 1] = (byte) (delta & 255);
      }

      dos.write(code);
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here

        LineNumber lineNumber = (LineNumber) lineNumberVector.elementAt(i);
        dos.writeShort(lineNumber.programCounter & 0xffff);
        dos.writeShort(lineNumber.lineNumber & 0xffff);
      }
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here

  private void writeEndMarker() throws CompilerException {
    try {
      dos.write(BLOCK_END);
    } catch (IOException e) {
      throw new CompilerException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.minijoe.compiler.CompilerException

Copyright © 2018 www.massapicom. 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.