Compiler : Finite State Machine code sample
Sample 0 : import java.io.*; import java.util.*; /* String containing an even number of one 0 1 ------------ A* A B B B A ------------ */ public class FSM { final static int STATES=2, INPUTS=2; public static void main (String[] args) throws IOException{ boolean [] accept = new boolean[STATES]; int [][] fsm = new int[STATES][INPUTS]; accept[0] = true; accept[1] = false; fsm[0][0] = 0; fsm[0][1] = 1; fsm[1][0] = 1; fsm[1][1] = 0; ...