Skip to content
Snippets Groups Projects
Commit 46525ede authored by Sven M. Hallberg's avatar Sven M. Hallberg
Browse files

remove some left-over dead code that I think is bullshit

parent 475d0ea9
No related branches found
No related tags found
No related merge requests found
......@@ -260,25 +260,6 @@ const HCFStringMap *h_first(size_t k, HCFGrammar *g, const HCFChoice *x)
// shortcut: first_0(X) is always {""}
if(k==0)
return g->singleton_epsilon;
#if 0
// XXX this is bullshit?
// shortcut: first_0(X) is {""} if X derives anything
if(k==0) {
switch(x->type) {
case HCF_END:
case HCF_CHAR:
return g->singleton_epsilon;
case HCF_CHARSET:
c=0;
do {
if(charset_isset(x->charset, c))
return g->singleton_epsilon;
} while(c++ < 255);
break;
// HCF_CHOICE is handled by the general case below
}
}
#endif
// memoize via g->first
ensure_k(g, k);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment