use of org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.SynAbsorberNfaAdapter in project xtext-core by eclipse.
the class SemanticSequencerNfaProvider method createNfa.
protected SemNfa createNfa(Grammar grammar, ISynAbsorberState synState, EClass type) {
SynAbsorberNfaAdapter synNfa = new SynAbsorberNfaAdapter(synState);
// System.out.println(new NfaFormatter().format(synNfa));
Map<ISynAbsorberState, Integer> distanceMap = util.distanceToFinalStateMap(synNfa);
SemNfa nfa = util.create(util.sort(synNfa, distanceMap), new SemStateFactory());
// util.sortInplace(nfa, distanceMap);
if (type != null)
initContentValidationNeeded(type, nfa);
initRemainingFeatures(nfa.getStop(), util.inverse(nfa), Sets.<ISemState>newHashSet());
initOrderIDs(grammar, nfa);
// System.out.println(new NfaFormatter().format(nfa));
return nfa;
}
Aggregations