FA-3516 / Lexical grammars / Open access
A line continuation consumes a bare carriage return · case 01
A line continuation consumes a bare carriage return.
ROOT CAUSE
The recognizer uses '\\\\[\\r\\n]+', which admits or omits a token shape forbidden by the stated grammar.
VERIFIED REPAIR
Implement the complete stated contract, including the boundary fixtures: Accept backslash followed by LF or CRLF, and nothing else.
Unsuccessful approach: The candidate grammar '\\\\\\n' still disagrees with the explicit boundary fixtures.
Case contract
Accept backslash followed by LF or CRLF, and nothing else.
Why this case matters
A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap
N = 1
observations = []
def solve(x):
try:
return bool(re.fullmatch('\\\\[\\r\\n]+',x))
except Exception as exc:
return {"error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('\\\r'), False)
check('boundary 2', solve('\\\r\n'), True)
check('boundary 3', solve('\\\n'), True)
check('boundary 4', solve('\\\n\n'), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| boundary 1 | True | False | Failed |
| boundary 2 | True | True | Passed |
| boundary 3 | True | True | Passed |
| boundary 4 | True | False | Failed |
SHA-256 / f467834829b2dca4ec79224a533b9551bea83ec666ead8e22f2c96d2d6b28fce
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap
N = 1
observations = []
def solve(x):
try:
return bool(re.fullmatch('\\\\\\n',x))
except Exception as exc:
return {"error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('\\\r'), False)
check('boundary 2', solve('\\\r\n'), True)
check('boundary 3', solve('\\\n'), True)
check('boundary 4', solve('\\\n\n'), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| boundary 1 | False | False | Passed |
| boundary 2 | False | True | Failed |
| boundary 3 | True | True | Passed |
| boundary 4 | False | False | Passed |
SHA-256 / f3fc38483544234ad5e3accbb9b208e12455597accb1f8c852ade5e7a3edd56b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap
N = 1
observations = []
def solve(x):
try:
return bool(re.fullmatch('\\\\\\r?\\n',x))
except Exception as exc:
return {"error": type(exc).__name__}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('\\\r'), False)
check('boundary 2', solve('\\\r\n'), True)
check('boundary 3', solve('\\\n'), True)
check('boundary 4', solve('\\\n\n'), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| boundary 1 | False | False | Passed |
| boundary 2 | True | True | Passed |
| boundary 3 | True | True | Passed |
| boundary 4 | False | False | Passed |
SHA-256 / fe0aaffb5891cb865454b28fd4a6ee15194117f8a5859d24ceb07ae3b24525d6
Verification & scope
This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:37:26.927771+00:00.
Case digest / a22440b895f60e35e528852d5370a94e8d6732f8f06507b7e80009d7e22b3890