private List<RegexNode> generateNodes(Map<Integer, List<Symbol>> table)
    {
        List<RegexNode> singles = new ArrayList<>();
        List<RegexNode> parens = new ArrayList<>();
        for (Entry<Integer, List<Symbol>> entry : table.entrySet())
        {
            List<Symbol> symbols = entry.getValue();
            
            //endeavoring to match nodes that have open and close parens
            int open = -1;
            for (int i = 0; i < symbols.size(); ++i)
            {
                Symbol current = symbols.get(i);
                switch (current.getSymbol())
                {
                    case '(':
                        open = i;
                        break;
                    case ')':
                        Symbol nextSymbol = peekAtNextSymbol(symbols, i);
                        if (nextSymbol != null && nextSymbol.getSymbol() == '*')
                        {
                            ++i;
                            parens.add(new StarNode(symbols.get(open), current, nextSymbol, entry.getKey()));
                        }
                        else
                            parens.add(new ParenNode(symbols.get(open), current, entry.getKey()));
                        break;
                    case '*':
                        //should have already been handled
                        break;
                    case '|':
                        singles.add(new OrNode(current, entry.getKey()));
                        break;
                    default:
                        singles.add(new SimpleNode(current, entry.getKey()));
                        break;
                }
            }
        }
        //for ordering purposes
        parens.addAll(singles);
        return parens;
    }