diff options
author | Michael Roth <mdroth@linux.vnet.ibm.com> | 2011-06-01 12:14:57 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-06-07 13:52:11 -0500 |
commit | 20a18b698efaf9c220eae6614aa07cdc5d0c07bc (patch) | |
tree | 1f5858de694e809fd9275c23701a63fba02f40d6 /configure | |
parent | 802aba23d2ee3995a70d0647ebb3eece5d78c7b7 (diff) | |
download | qemu-20a18b698efaf9c220eae6614aa07cdc5d0c07bc.tar.gz qemu-20a18b698efaf9c220eae6614aa07cdc5d0c07bc.tar.bz2 qemu-20a18b698efaf9c220eae6614aa07cdc5d0c07bc.zip |
json-lexer: fix flushing logic to not always go to error state
Currently we flush the lexer by passing in a NULL character. This
generally forces the lexer to go to the corresponding TERMINAL() state
for whatever token type it is currently parsing, emits the token to the
parser, then puts the lexer back into IN_START state. However, since a
NULL character causes char_consumed to be 0, we always do a second pass
after this, which puts us in the IN_ERROR state. Fix this behavior by
adding a "flush" flag that tells the lexer not to do a more than 1
iteration.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions