| 590 | */ |
| 591 | |
| 592 | static LEX_STRING get_quoted_token(Lex_input_stream *lip, |
| 593 | uint skip, |
| 594 | uint length, char quote) |
| 595 | { |
| 596 | LEX_STRING tmp; |
| 597 | const char *from, *end; |
| 598 | char *to; |
| 599 | lip->yyUnget(); // ptr points now after last token char |
| 600 | tmp.length= lip->yytoklen=length; |
| 601 | tmp.str=(char*) lip->m_thd->alloc(tmp.length+1); |
| 602 | from= lip->get_tok_start() + skip; |
| 603 | to= tmp.str; |
| 604 | end= to+length; |
| 605 | |
| 606 | lip->m_cpp_text_start= lip->get_cpp_tok_start() + skip; |
| 607 | lip->m_cpp_text_end= lip->m_cpp_text_start + length; |
| 608 | |
| 609 | for ( ; to != end; ) |
| 610 | { |
| 611 | if ((*to++= *from++) == quote) |
| 612 | { |
| 613 | from++; // Skip double quotes |
| 614 | lip->m_cpp_text_start++; |
| 615 | } |
| 616 | } |
| 617 | *to= 0; // End null for safety |
| 618 | return tmp; |
| 619 | } |
| 620 | |
| 621 | |
| 622 | /* |
no test coverage detected