aboutsummaryrefslogtreecommitdiff
path: root/json-lexer.h
diff options
context:
space:
mode:
authorMichael Roth <mdroth@linux.vnet.ibm.com>2011-06-01 12:14:57 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-06-07 13:52:11 -0500
commitbd3924a33a66c40065a8fa73b4d7a27aca3b0e04 (patch)
tree1f5858de694e809fd9275c23701a63fba02f40d6 /json-lexer.h
parent529a0ef5f30e28a801d6527a3556adcaa4959669 (diff)
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 'json-lexer.h')
0 files changed, 0 insertions, 0 deletions