00001 package com.ohrasys.cad.bnf.validator; 00002 import com.ohrasys.cad.bnf.*; 00003 00004 public class WhitespaceValidator 00005 extends BNFOneOrMoreOptionalTest { 00006 private static final String symbols = "\t\n\r\f "; 00007 00008 public WhitespaceValidator() 00009 throws BNFTestException {super(createTests());} 00010 00011 private static BNFTestImplementor[] createTests() 00012 throws BNFTestException { 00013 BNFTestImplementor result[] = new BNFTestImplementor[symbols.length()]; 00014 for(int i = 0; i < symbols.length(); i++) 00015 result[i] = new BNFNoFallthruTest(symbols.charAt(i)); 00016 result = new BNFTestImplementor[] { 00017 new BNFOneOfManyRequiredTest(result) 00018 }; 00019 return result; 00020 } 00021 00022 }