}
}
static private void writeStaticReturns(Grammar grammar, Writer out) throws IOException
{
BitSet ret_elems = new BitSet();
for (int i = 0; i < grammar.rules.length; i++)
{
Production rule = grammar.rules[i];
if (rule.code == null && rule.rhs.size() > 1)
{
int n = indexOfLastReferencedSymbol(rule.rhs);
if (n == 0)
continue;
if (n < 0)
n = rule.rhs.size() - 1;
if (ret_elems.add(n))
{
out.write("\n\tstatic final Action RETURN");
out.write(String.valueOf(n + 1));
out.write(" = new Action() {\n");
out.write("\t\tpublic Symbol reduce(Symbol[] _symbols, int offset) {\n");