mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-31 14:01:59 +00:00
Add private method QPDFTokenizer::inHexstring
This commit is contained in:
parent
f9530a5815
commit
2697ba49bc
@ -197,7 +197,6 @@ class QPDFTokenizer
|
||||
bool isSpace(char);
|
||||
bool isDelimiter(char);
|
||||
void findEI(std::shared_ptr<InputSource> input);
|
||||
void handleCharacter(char);
|
||||
|
||||
enum state_e {
|
||||
st_top,
|
||||
@ -212,6 +211,8 @@ class QPDFTokenizer
|
||||
st_token_ready
|
||||
};
|
||||
|
||||
void handleCharacter(char);
|
||||
void inHexstring(char);
|
||||
void reset();
|
||||
|
||||
// Lexer state
|
||||
|
@ -331,7 +331,8 @@ QPDFTokenizer::handleCharacter(char ch)
|
||||
return;
|
||||
}
|
||||
this->state = st_in_hexstring;
|
||||
break;
|
||||
inHexstring(ch);
|
||||
return;
|
||||
|
||||
case st_gt:
|
||||
if (ch == '>') {
|
||||
@ -469,13 +470,18 @@ QPDFTokenizer::handleCharacter(char ch)
|
||||
return;
|
||||
|
||||
case (st_in_hexstring):
|
||||
break;
|
||||
inHexstring(ch);
|
||||
return;
|
||||
|
||||
default:
|
||||
throw std::logic_error(
|
||||
"INTERNAL ERROR: invalid state while reading token");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
QPDFTokenizer::inHexstring(char ch)
|
||||
{
|
||||
if (ch == '>') {
|
||||
this->type = tt_string;
|
||||
this->state = st_token_ready;
|
||||
|
Loading…
Reference in New Issue
Block a user