-dnl some of these have two tokt_ bits set, because they can be several
-dnl things.
-nametypelexpatexec(`ordinal',`tokt_number|tokt_fdrange|tokr_word',`[0-9]{1,8}',
-`{ char *ep;
- lr_min=lr_max= (int)strtoul(yytext,&ep,10);
- assert(!*ep); }; ')
-nametypelexpatexec(`fdrange',`tokt_fdrange|tokr_punct',`[0-9]{1,8}-[0-9]{1,8}',
-`{ char *ep;
- lr_min=(int)strtoul(yytext,&ep,10);
- assert(*ep == HYPHEN); assert(*++ep);
- lr_max=(int)strtoul(ep,&ep,10);
- if (lr_max < lr_min) {
- atnewline= 0; parseerrprint("fd range has min > max"); return tokv_error;
- }
- assert(!*ep); }; ')
-nametypelexpatexec(`fdstoend',`tokt_fdrange|tokr_punct',`[0-9]{1,8}-',
-`{ char *ep;
- lr_min= (int)strtoul(yytext,&ep,10); lr_max=-1;
- assert(*ep == HYPHEN); assert(!*++ep); }; ')
+dnl some of these have two tokt_ bits set, because they can be several things.
+autovalistype(`ordinal', `tokt_number|tokt_fdrange|tokr_word')
+autovalistype(`fdrange', `tokt_fdrange|tokr_punct')
+autovalistype(`fdstoend', `tokt_fdrange|tokr_punct')