[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sat, 30 May 2015 15:28:27 -0500
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
I filed a bug because CLUSTER hangs on unknown subcommands. It turns
out that (for reasons I don't fully understand) the main parsing loop
never terminates when an unsupported or invalid subcommand is used. I
don't understand how the parsing works with all the lex_*() functions.
It looks like when any unexpected subcommand is present that the rest of
the command is ignored and the "lex_token (lexer) != T_ENDCMD" condition
is never met.
Is there a working template of how parsing is supposed to occur?
I can fix the issue by adding a final else at the end of parser:
$ diff quick-cluster.c quick-cluster.c.original
< lex_error (lexer, _("Invalid or unsupported subcommand"));
< goto error;
Is there a reason not to do this? One reason is that it will break any
SPSS syntax that uses unsupported subcommands but that seems better than
having PSPP hang.
Alan D. Mead, Ph.D.
President, Talent Algorithms Inc.
science + technology = better workers
Announcing the Journal of Computerized Adaptive Testing (JCAT), a
peer-reviewed electronic journal designed to advance the science and
practice of computerized adaptive testing: http://www.iacat.org/jcat
- parsing template?,
Alan Mead <=