Package dk.brics.string.grammar

Examples of dk.brics.string.grammar.UnaryProduction


                            removedProductions.add(prod);
                            addedProductions.add(new UnitProduction(bp.getNonterminal1()));
                        }
                    }
                    else if (prod instanceof UnaryProduction) {
                        UnaryProduction up = (UnaryProduction)prod;
                       
                        // only consider assertions
                        if (!up.getOperation().isAssertion())
                            continue;
                       
                        // if the destination node is also in a cycle
                        if (c.contains(up.getNonterminal())) {
                            removedProductions.add(prod);
                            addedProductions.add(new UnitProduction(up.getNonterminal()));
                        }
                    }
                }
                nt.getProductions().removeAll(removedProductions);
                nt.getProductions().addAll(addedProductions);
View Full Code Here

TOP

Related Classes of dk.brics.string.grammar.UnaryProduction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.