remove some left-over dead code that I think is bullshit
This commit is contained in:
parent
475d0ea9f3
commit
46525ede2d
1 changed files with 0 additions and 19 deletions
|
|
@ -260,25 +260,6 @@ const HCFStringMap *h_first(size_t k, HCFGrammar *g, const HCFChoice *x)
|
||||||
// shortcut: first_0(X) is always {""}
|
// shortcut: first_0(X) is always {""}
|
||||||
if(k==0)
|
if(k==0)
|
||||||
return g->singleton_epsilon;
|
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
|
// memoize via g->first
|
||||||
ensure_k(g, k);
|
ensure_k(g, k);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue