Examples of lt()


Examples of lipstone.joshua.parser.types.BigDec.lt()

        break;
      }
   
    if (((operation.equals("arcsin") || operation.equals("arccos")) && !(inp.gteq(new BigDec(-1.0)) && inp.lteq(new BigDec(1.0))))
        || ((operation.equals("arcsec") || operation.equals("arccsc")) && (inp.gteq(new BigDec(-1.0)) && inp.lteq(new BigDec(1.0))))
        || (operation.equals("arccosh") && (inp.lt(BigDec.ONE))) || (operation.equals("arctanh") && (inp.abs().gteq(BigDec.ONE)))
        || (operation.equals("arccoth") && (inp.abs().lteq(BigDec.ONE)))
        || (operation.equals("arcsech") && !(inp.gt(BigDec.ZERO) && inp.lteq(BigDec.ONE)))
        || (operation.equals("arccsch") && (inp.eq(BigDec.ZERO)))) {
      return new ConsCell(BigDec.ZERO, ConsType.NUMBER);
    }
View Full Code Here

Examples of org.antlr.runtime.CommonTokenStream.LT()

      "WS : (' ')+ {channel=99;};\n");
    CharStream input = new ANTLRStringStream("123 139.52");
    Interpreter lexEngine = new Interpreter(g, input);

    CommonTokenStream tokens = new CommonTokenStream(lexEngine);
        tokens.LT(5); // make sure it grabs all tokens
    String result = tokens.toString();
    //System.out.println(result);
    String expecting = "123 139.52";
    assertEquals(expecting, result);
  }
View Full Code Here

Examples of org.antlr.runtime.TokenRewriteStream.LT()

      "B : 'b';\n" +
      "C : 'c';\n");
    CharStream input = new ANTLRStringStream("abc");
    Interpreter lexEngine = new Interpreter(g, input);
    TokenRewriteStream tokens = new TokenRewriteStream(lexEngine);
    tokens.LT(1); // fill buffer
    tokens.insertBefore(0, "0");
    String result = tokens.toString();
    String expecting = "0abc";
    assertEquals(expecting, result);
  }
View Full Code Here

Examples of org.antlr.runtime.tree.CommonTreeNodeStream.LT()

    CharStream input = this.token.getInputStream();
    GrammarASTAdaptor adaptor = new GrammarASTAdaptor(input);
    CommonTreeNodeStream nodes =
      new CommonTreeNodeStream(adaptor, this);
    StringBuilder buf = new StringBuilder();
    GrammarAST o = (GrammarAST)nodes.LT(1);
    int type = adaptor.getType(o);
    while ( type!=Token.EOF ) {
      buf.append(" ");
      buf.append(o.getText());
      nodes.consume();
View Full Code Here

Examples of org.antlr.runtime.tree.CommonTreeNodeStream.LT()

    int type = adaptor.getType(o);
    while ( type!=Token.EOF ) {
      buf.append(" ");
      buf.append(o.getText());
      nodes.consume();
      o = (GrammarAST)nodes.LT(1);
      type = adaptor.getType(o);
    }
    return buf.toString();
  }
View Full Code Here

Examples of org.antlr.runtime.tree.TreeNodeStream.LT()

        TreeNodeStream stream = newStream(r0);
        stream.consume(); // consume 101
        stream.consume(); // consume DN
        stream.consume(); // consume 102
        stream.seek(7);   // seek to 107
        assertEquals(107, ((Tree)stream.LT(1)).getType());
        stream.consume(); // consume 107
        stream.consume(); // consume UP
        stream.consume(); // consume UP
        assertEquals(104, ((Tree)stream.LT(1)).getType());
    }   
View Full Code Here

Examples of org.antlr.runtime.tree.TreeNodeStream.LT()

        stream.seek(7);   // seek to 107
        assertEquals(107, ((Tree)stream.LT(1)).getType());
        stream.consume(); // consume 107
        stream.consume(); // consume UP
        stream.consume(); // consume UP
        assertEquals(104, ((Tree)stream.LT(1)).getType());
    }   
}
View Full Code Here

Examples of org.antlr.runtime3_3_0.tree.TreeNodeStream.LT()

    }
  }

  protected void extractInformationFromTreeNodeStream(IntStream input) {
    TreeNodeStream nodes = (TreeNodeStream)input;
    this.node = nodes.LT(1);
    TreeAdaptor adaptor = nodes.getTreeAdaptor();
    Token payload = adaptor.getToken(node);
    if ( payload!=null ) {
      this.token = payload;
      if ( payload.getLine()<= 0 ) {
View Full Code Here

Examples of org.antlr.v4.runtime.CommonTokenStream.LT()

        }
      };

        CommonTokenStream tokens = new CommonTokenStream(lexer);

        assertEquals("x", tokens.LT(1).getText()); // must skip first off channel token
        tokens.consume();
        assertEquals("=", tokens.LT(1).getText());
        assertEquals("x", tokens.LT(-1).getText());

        tokens.consume();
View Full Code Here

Examples of org.antlr.v4.runtime.CommonTokenStream.LT()

        CommonTokenStream tokens = new CommonTokenStream(lexer);

        assertEquals("x", tokens.LT(1).getText()); // must skip first off channel token
        tokens.consume();
        assertEquals("=", tokens.LT(1).getText());
        assertEquals("x", tokens.LT(-1).getText());

        tokens.consume();
        assertEquals("34", tokens.LT(1).getText());
        assertEquals("=", tokens.LT(-1).getText());
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.