Examples of ANTLRException


Examples of antlr.ANTLRException

            if(line.length()==0 || line.startsWith("#"))
                continue;   // ignorable line
            try {
                r.add(new CronTab(line,lineNumber,hash));
            } catch (ANTLRException e) {
                throw new ANTLRException(Messages.CronTabList_InvalidInput(line,e.toString()),e);
            }
        }
        return new CronTabList(r);
    }
View Full Code Here

Examples of antlr.ANTLRException

  }

  public ExampleStringFunction createStringFunction(String name, List<RutaExpression> args)
          throws ANTLRException {
    if(args == null || args.size() != 1 || !(args.get(0) instanceof TypeExpression)) {
      throw new ANTLRException("ExampleStringFunction accepts only one TypeExpression as argument!");
    }
    return new ExampleStringFunction((TypeExpression) args.get(0));
  }
View Full Code Here

Examples of antlr.ANTLRException

    if (args != null) {
      for (RutaExpression each : args) {
        if (each instanceof NumberExpression) {
          arguments.add((NumberExpression) each);
        } else {
          throw new ANTLRException("ExampleAction accepts only NumberExpressions as arguments");
        }
      }
    }
    return new ExampleAction(arguments);
  }
View Full Code Here

Examples of antlr.ANTLRException

  }

  public NumberFunctionExpression createNumberFunction(String name, List<RutaExpression> args)
          throws ANTLRException {
    if(args == null || args.size() != 1 || !(args.get(0) instanceof TypeExpression)) {
      throw new ANTLRException("ExampleNumberFunction accepts only one TypeExpression as argument!");
    }
    return new ExampleNumberFunction((TypeExpression) args.get(0));
  }
View Full Code Here

Examples of antlr.ANTLRException

      if (!(args.get(0) instanceof StringExpression)) {
      }
      if (!(args.get(1) instanceof StringExpression)) {
      }
    } else {
      throw new ANTLRException(
              "ExampleCondition accepts exactly two StringExpressions as arguments");
    }
    return new ExampleCondition((StringExpression) args.get(0), (StringExpression) args.get(1));
  }
View Full Code Here

Examples of antlr.ANTLRException

  }

  public TypeFunctionExpression createTypeFunction(String name, List<RutaExpression> args)
          throws ANTLRException {
    if(args == null || args.size() != 1 || !(args.get(0) instanceof StringExpression)) {
      throw new ANTLRException("ExampleTypeFunction accepts only one StringExpression as argument!");
    }
    return new ExampleTypeFunction((StringExpression) args.get(0));
  }
View Full Code Here

Examples of antlr.ANTLRException

  }

  public ExampleBooleanFunction createBooleanFunction(String name, List<RutaExpression> args)
          throws ANTLRException {
    if(args == null || args.size() != 1 || !(args.get(0) instanceof TypeExpression)) {
      throw new ANTLRException("ExampleBooleanFunction accepts only one TypeExpression as argument!");
    }
    return new ExampleBooleanFunction((TypeExpression) args.get(0));
  }
View Full Code Here

Examples of antlr.ANTLRException

            if(line.length()==0 || line.startsWith("#"))
                continue;   // ignorable line
            try {
                r.add(new CronTab(line,lineNumber));
            } catch (ANTLRException e) {
                throw new ANTLRException(Messages.CronTabList_InvalidInput(line,e.toString()),e);
            }
        }
        return new CronTabList(r);
    }
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.AntlrException

    return !errors.isEmpty();
  }

  public void reportError(RecognitionException e) {
    HiddenTokenAwareTreeAdaptor treeAdaptor = (HiddenTokenAwareTreeAdaptor)getTreeAdaptor();
    errors.add(new AntlrException(treeAdaptor.getSource(), e, getErrorMessage(e, tokenErrorNames)));
  }
View Full Code Here

Examples of org.woped.metrics.exceptions.AntlrException

     //This Method stores all the error messages at the error-List
     //At the Method evaluate, there will be decided if a nestedParserAutoRecoveryException should be thrown
      String hdr = ErrorMessageProcessing.getErrorHeader(e);
           String msg = ErrorMessageProcessing.getErrorMessage(e, tokenNames, this);
           String shortMessage = hdr + " " + msg;
           ErrorList.getInstance().addException(new AntlrException(e,shortMessage, tokenNames));
   }
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.