# note: the requirements about geometry, connectedness etc. make it impossible # for a .ctd validator to properly validate. # # this validator only checks for proper character usage and a single A and B # initialize counts SET(na=0,nb=0) # get dimensions INT(7,100,r) SPACE INT(7,100,c) NEWLINE # get characters REP(r) REP(c) REGEX("[ABX\.]",ch) IF (ch=="A") SET(na=na+1) END IF (ch=="B") SET(nb=nb+1) END END NEWLINE END ASSERT(na==1) ASSERT(nb==1)