# File Automatenalt.rb, line 133 def berechneZustaende(grammatik) grammatik.getRules.each_value do |x| links = x.getSymbol tmpMenge = Menge.new(x.getAlts) tmpMenge.each do |i| for b in 0..i.getSymbols.length do str=Zustand.new(links.to_s+" ->") for c in 0..i.getSymbols.length-1 do str+=Zustand.new(".") if ((c==b)) str+=Zustand.new(i.getSymbols[c].to_s) end str+=Zustand.new(".") if (b==i.getSymbols.length) @zustaende.add(str) end end end end