Search in sources :

Example 1 with SynAbsorberNfaAdapter

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;
}
Also used : ISynAbsorberState(org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynAbsorberState) SynAbsorberNfaAdapter(org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.SynAbsorberNfaAdapter)

Aggregations

ISynAbsorberState (org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynAbsorberState)1 SynAbsorberNfaAdapter (org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.SynAbsorberNfaAdapter)1