Examples of parseExpression()

Examples of anvil.script.parser.ExpressionParser.parseExpression()

  public static final Expression doParseExpression(int type, String expression, Location location, TemplateParser parser)
    if (expression != null) {
      ExpressionParser expressionParser =
        new ExpressionParser(parser, location, expression);
      return expressionParser.parseExpression(type);
    } else {
      parser.error(location, "Expression attribute missing");
      return Expression.NULL;
View Full Code Here

Examples of anvil.script.parser.ExpressionParser.parseExpression()

        case Attribute.TYPE_EXPR:
          value = value.trim();
          if (value.length() > 0) {
            ExpressionParser p = new ExpressionParser(parser, parser.getLocation(), value);
            node = p.parseExpression(p.TYPE_VALUE).getChild();
          } else {
            node = ConstantNode.UNDEFINED;
View Full Code Here

Examples of anvil.script.parser.NestedParser.parseExpression()

          NestedParser expressionParser =
            new NestedParser(parser, location, buffer.toString(), startIndex);
          Expression expression = expressionParser.parseExpression();
          if (expression.isConstant()) {
            sections.add(new ConstantNode(expression.eval().toString()));
          } else {
            Node child = expression.getChild(0);
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseExpression()

public class ExpressionGrammarTest {

  public void sequenceNumbersLong() {
    ANTLRParser compiler = new ANTLRParser();
    ParseResult result = compiler.parseExpression("12-34 56+7 8*90 ", null);
    assertChilds(result.getTree(), LessLexer.NUMBER, LessLexer.MINUS, LessLexer.NUMBER, LessLexer.EMPTY_SEPARATOR, LessLexer.NUMBER, LessLexer.PLUS, LessLexer.NUMBER, LessLexer.EMPTY_SEPARATOR, LessLexer.NUMBER, LessLexer.STAR, LessLexer.NUMBER);

View Full Code Here

Examples of com.google.caja.parser.js.Parser.parseExpression()

      throws ParseException {
    JsLexer lexer = new JsLexer(cp);
    JsTokenQueue tq = new JsTokenQueue(
        lexer, sourceOf(cp), JsTokenQueue.NO_COMMENT);
    Parser p = new Parser(tq, mq, quasi);
    Expression e = p.parseExpression(true);
    return e;

  protected Block quasi(CharProducer cp) throws ParseException {
View Full Code Here

Examples of com.google.dart.engine.parser.Parser.parseExpression()

   * @return the Dart expression that was parsed
  public static Expression parseEmbeddedExpression(Source source,
      com.google.dart.engine.scanner.Token token, AnalysisErrorListener errorListener) {
    Parser parser = new Parser(source, errorListener);
    return parser.parseExpression(token);

   * Given the contents of an embedded expression that occurs at the given offset, scans it as a
   * Dart code.
View Full Code Here

Examples of com.redspr.redquerybuilder.core.client.command.Parser.parseExpression()

public class GwtTestBasics extends AbstractTest {
    public void testComparison() throws Exception {
        Parser p = new Parser(getSession());
        Comparison c = (Comparison) p.parseExpression("id = ?");
        ExpressionColumn left = (ExpressionColumn) c.getLeft();
        Parameter param = (Parameter) c.getRight();

View Full Code Here

Examples of com.sun.tools.javac.parser.JavacParser.parseExpression()

  public static JCTree.JCExpression parseString(String guardedByString, Context context) {
    JavacParser parser =
        ParserFactory.instance(context).newParser(guardedByString, false, true, false);
    JCTree.JCExpression exp;
    try {
      exp = parser.parseExpression();
    } catch (Throwable e) {
      throw new IllegalGuardedBy(e.getMessage());
    int len = (parser.getEndPos(exp) - exp.getStartPosition());
    if (len != guardedByString.length()) {
View Full Code Here

Examples of javarepl.Evaluator.parseExpression()

        return context.get(Completer.class).apply(expression);

    public ExpressionTemplate template(String expression) {
        Evaluator evaluator = context.get(Evaluator.class);
        Expression parsedExpression = evaluator.parseExpression(expression).right();

        return new ExpressionTemplate(renderExpressionClass(evaluator.context(), randomIdentifier("Evaluation"), parsedExpression), EXPRESSION_TOKEN);

    private ConsoleResult executeExpression(String expression) {
View Full Code Here

Examples of javax.servlet.jsp.el.ExpressionEvaluator.parseExpression()

    StringBuffer s = new StringBuffer();
    try {
      expression = evaluator.parseExpression(s.toString(), Boolean.class, this);
    } catch (Exception e) {
      throw new ConfigException("Parse error in '" + test + "'", e);
View Full Code Here
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.