Demonstration of groff .psbb request handling code, for EPS and PDF input files
リビジョン | 7ec0d92662ecacb29e8a2a6dccbb52e0f028bd76 (tree) |
---|---|
日時 | 2017-10-11 21:21:13 |
作者 | ![]() |
コミッター | Keith Marshall |
Improve lexer suppression of unmatched content.
* psbblex.l (PDFIGNORE): Actively discard end-of-line markers; revert
to prior state, when detected. Identify dictionary start markers, and
handle by pushing a subsidiary change of lexer state, to...
(PDFDICT): ...this, to ensure properly nested handling, otherwise...
(PDFIGNORE): ...stop at [</>] characters; leave in input queue, and
revert to prior state.
@@ -444,8 +444,10 @@ static int pdf_trailer( void ) | ||
444 | 444 | * or the next PDF dictionary key, or possible dictionary terminator. |
445 | 445 | */ |
446 | 446 | <PDFIGNORE>{ |
447 | -./({EOL}|[/>]) { DEBUG_ECHO; yy_pop_state(); } | |
448 | -. { yymore(); } | |
447 | +[^</>\r\n]+ { DEBUG_ECHO; } | |
448 | +"<<" { DEBUG_PUSH_STATE( PDFDICT ); } | |
449 | +[</>] { yyless(0); yy_pop_state(); } | |
450 | +{EOL} { yy_pop_state(); } | |
449 | 451 | } |
450 | 452 | |
451 | 453 | /* State: PDFXREF |