Package antlr

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


  }

  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

    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

  }

  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

      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

  }

  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

  }

  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

            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

TOP

Related Classes of antlr.ANTLRException

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.