From 260c87942a668b5730e36de68b14fc7b62e17860 Mon Sep 17 00:00:00 2001
From: "Sven M. Hallberg" <pesco@khjk.org>
Date: Mon, 10 Feb 2020 18:56:29 +0100
Subject: [PATCH] note another accept-and-warn case

---
 pdf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pdf.c b/pdf.c
index 2729f9a..8afa868 100644
--- a/pdf.c
+++ b/pdf.c
@@ -657,6 +657,12 @@ init_parser(struct Env *aux)
 	H_RULE(startxr,	SEQ(nl, KW("startxref"), nl,
 			    lws, nat, nl,
 			    LIT("%%EOF"), CHX(nl, end)));
+		// XXX the real world sometimes omits nl after %%EOF inside the file.
+		//     the next 'tail' would be appended right after the 'F',
+		//     presumably because the previous version of the file
+		//     ended without a trailing newline. m)
+		//     this is invalid per spec, because it creates a run-on 
+		//     comment, but we should probably accept-and-warn.
 		// XXX should lws be allowed before EOF marker?
 		// NB: lws before xref offset is allowed, cf. p.48 (example 4)
 	H_RULE(xr_td,	SEQ(xrefs, KW("trailer"), ws, dict));
-- 
GitLab