Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangString


  /** Bar 2. */
  @Test
  public void testParse2j()
  {
    String text = "  \" a |\"   ";
    OtpErlangString string = (OtpErlangString)ErlangLabel.parseText(text);
    Assert.assertEquals(" a |",string.stringValue());
    checkResponse(runner, "\" a |\"",text);
 
View Full Code Here


    final String text = "{\'this is an atom\',\"this is a string\",[[-234],{}]}";
    OtpErlangObject obtained = ErlangLabel.parseText(text);
    checkResponse(runner, text, text);
    Assert.assertEquals(new OtpErlangTuple(new OtpErlangObject[]{
            new OtpErlangAtom("this is an atom"),
            new OtpErlangString("this is a string"),
            new OtpErlangList(new OtpErlangObject[]{
                new OtpErlangList(new OtpErlangObject[]{
                    new OtpErlangInt(-234)
                }),
                new OtpErlangTuple(new OtpErlangObject[]{
View Full Code Here

        whatToQuoteForString.add(ch);
    }

    @Override
    public void dump(OtpErlangObject arg, StringBuffer resultHolder) {
      OtpErlangString atom = (OtpErlangString) arg;
      dump(atom.stringValue(), resultHolder);
    }
View Full Code Here

              + currentMatch + " in parsing tuple, looking at "
              + lexer.getMatch());
        }
      }

      return new OtpErlangString(stringText.toString());
    }
View Full Code Here

    // Only modify paths if we are running a private instance of Erlang runtime
    if (!myEvalCnf.config.getUseExternalErlangRuntime())
      ErlangRunner.getRunner(myEvalCnf.config.getErlangMboxName()).call(
          new OtpErlangObject[] {
              new OtpErlangAtom("addPath"),
              new OtpErlangString(
                  module.sourceFolder.getAbsolutePath()) },
          "addPath");

  }
View Full Code Here

    // Only modify paths if we are running a private instance of Erlang runtime
    if (!myEvalCnf.config.getUseExternalErlangRuntime())
      ErlangRunner.getRunner(myEvalCnf.config.getErlangMboxName()).call(
          new OtpErlangObject[] {
              new OtpErlangAtom("delPath"),
              new OtpErlangString(
                  module.sourceFolder.getAbsolutePath()) },
          "delPath");
  }
View Full Code Here

  protected final boolean nonEmpty;
   
  public StringSignature(OtpErlangList attributes)
  {
    nonEmpty = attributes.elementAt(0).equals(ListSignature.NonEmptyAtom);
    values = new LinkedList<OtpErlangObject>();values.add(new OtpErlangString("wibble"));
    if (!nonEmpty)
      values.add(new OtpErlangString(""));
  }
View Full Code Here

    {
      ErlangRunner erl = ErlangRunner.getRunner();
      ErlangRunner.compileErl(f, erl);
      OtpErlangObject otpArgs[] = new OtpErlangObject[]{
            null,
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.BEAM))}),
        new OtpErlangString(ErlangRunner.getName(f, ERL.PLT)),
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.ERL))}),
        new OtpErlangAtom("text")
      };
      otpArgs[0]=new OtpErlangAtom("dialyzer");
      erl.call(otpArgs,"Could not run dialyzer");
      otpArgs[0]=new OtpErlangAtom("typer");
View Full Code Here

    {
      ErlangRunner erl = ErlangRunner.getRunner();
      ErlangRunner.compileErl(f, erl);
      OtpErlangObject otpArgs[] = new OtpErlangObject[]{
            null,
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.BEAM))}),
        new OtpErlangString(ErlangRunner.getName(f, ERL.PLT)),
        new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.ERL))}),
        new OtpErlangAtom("text")
      };
      otpArgs[0]=new OtpErlangAtom("typer");
      OtpErlangTuple response = erl.call(otpArgs,"Could not run typer");
      return ((OtpErlangString)response.elementAt(1)).stringValue();
View Full Code Here

    // Almost the same arguments for dialyzer and typer, the first argument
    // determines which of the two to run.
    OtpErlangObject otpArgs[] = new OtpErlangObject[] {
        null, // either Dialyzer or typer

        new OtpErlangList(new OtpErlangObject[] { new OtpErlangString(
            ErlangRunner.getName(f, ERL.BEAM)) }),
        new OtpErlangString(ErlangRunner.getName(f, ERL.PLT)),
        new OtpErlangList(new OtpErlangObject[] { new OtpErlangString(
            ErlangRunner.getName(f, ERL.ERL)) }),
        new OtpErlangAtom("types") };

    if (!pltFile.canRead() || f.lastModified() > pltFile.lastModified()) {// rebuild the PLT file since the source was modified or the plt file does not exist
      pltFile.delete();
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangString

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.