string.c, gettok_instance(), insane workaround

reason:
  failure to swallow
     q ..... modelname m={(expr)}
  in
     get_number_terminals(char *c)
This commit is contained in:
rlar 2017-04-03 19:51:41 +02:00
parent 19d8ea894a
commit 5a4d934725
1 changed files with 12 additions and 0 deletions

View File

@ -414,6 +414,11 @@ gettok_noparens(char **s)
}
/*
* consider m={(nf*multi)}
* shall be parsed as one token
*/
char *
gettok_instance(char **s)
{
@ -431,6 +436,13 @@ gettok_instance(char **s)
(**s != '(') &&
(**s != ')')
) {
if (**s == '{') {
char *close = strchr(*s, '}');
if (close) {
*s = close;
continue;
}
}
(*s)++;
}
token_e = *s;