From 3d049d6de3899c54380ebfaf5080af65b3a3c35a Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Mon, 4 Jan 2016 15:23:28 +1100 Subject: [PATCH] ComponentRepeat: wire X{0,N} and (X?){N} the same --- src/parser/ComponentRepeat.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/parser/ComponentRepeat.cpp b/src/parser/ComponentRepeat.cpp index 5ce703ac..670cee37 100644 --- a/src/parser/ComponentRepeat.cpp +++ b/src/parser/ComponentRepeat.cpp @@ -349,18 +349,7 @@ void ComponentRepeat::precalc_firsts() { assert(!m_firsts.empty()); // notePositions should already have run const vector &f = m_firsts.front(); - - if (sub_comp->empty()) { - // Emptiable: all our repeats contribute to firsts. - // Each repeat's firsts is spliced in at the location of the epsilon - // (if any) in the previous repeat's firsts. - for (const auto &e : m_firsts) { - replaceEpsilons(firsts_cache, e); - } - } else { - // Not emptiable: firsts come from our first repeat only. - firsts_cache.insert(firsts_cache.end(), f.begin(), f.end()); - } + firsts_cache.insert(firsts_cache.end(), f.begin(), f.end()); } static