matrix used in BNFC translated into Java