Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

com/ohrasys/cad/bnf/validator/EscapedSymbolValidator.java

Go to the documentation of this file.
00001 package com.ohrasys.cad.bnf.validator;
00002 import com.ohrasys.cad.bnf.*;
00003 
00004 public class EscapedSymbolValidator
00005   extends BNFOneOfManyRequiredTest {
00006   public EscapedSymbolValidator()
00007     throws BNFTestException {super(createTests());}
00008 
00009   private static BNFTestImplementor createEscapedBackslashTest()
00010     throws BNFTestException {
00011     return new BNFRequiredTest(
00012         new BNFTestImplementor[] {
00013           new BNFNoFallthruTest('\\'), new BNFNoFallthruTest('\\')
00014         }
00015         );
00016   }
00017 
00018   private static BNFTestImplementor createEscapedNewlineTest()
00019     throws BNFTestException {
00020     return new BNFRequiredTest(
00021         new BNFTestImplementor[] {
00022           new BNFNoFallthruTest('\\'), new BNFNoFallthruTest('n')
00023         }
00024         );
00025   }
00026 
00027   private static BNFTestImplementor createEscapedQuoteTest()
00028     throws BNFTestException {
00029     return new BNFRequiredTest(
00030         new BNFTestImplementor[] {
00031           new BNFNoFallthruTest('\\'), new BNFNoFallthruTest('"')
00032         }
00033         );
00034   }
00035 
00036   private static BNFTestImplementor createEscapedTabTest()
00037     throws BNFTestException {
00038     return new BNFRequiredTest(
00039         new BNFTestImplementor[] {
00040           new BNFNoFallthruTest('\\'), new BNFNoFallthruTest('t')
00041         }
00042         );
00043   }
00044 
00045   private static BNFTestImplementor[] createTests()
00046     throws BNFTestException {
00047     BNFTestImplementor result[] = new BNFTestImplementor[] {
00048         createEscapedQuoteTest(), createEscapedBackslashTest(),
00049         createEscapedNewlineTest(), createEscapedTabTest()
00050       };
00051     return result;
00052   }
00053 }

Generated on Sun Nov 13 10:13:03 2005 for JavaBackus-NaurTestAPI(JBNT) by  doxygen 1.4.2