I´m reading how to make a transition table for a NFA. I´m using java and according to my book in order to make the transition table for my NFA I need a two-dimensional array move[s,a] I assume a state s will be an integer and a a symbol from the input (Correct me if I´m wrong). The entries in this table, which are sets of states, are represented by linked lists.
I don´t really know how to declare this on java because arrays can only be of one type.
I´ve been trying with
int[][] move
and
Arraylist<Integer>[][]
But I can´t find the way to map a string symbol to a set of integers. What I would ideally want to accomplish is that I enter for example: move[5,"a"]
and get back a set of states (ints) like [5,6,7,9]
Can anyone help me out?