From 983ee966da621c39042eaca4f13894feb294db1b Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Sat, 7 Jul 2007 16:48:43 +0000 Subject: [PATCH] Correction to bug 8797 svn: r6839 --- .../combinator-parser/private-combinator/combinator.scm | 9 ++++++++- collects/profj/comb-parsers/parser-units.scm | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/collects/combinator-parser/private-combinator/combinator.scm b/collects/combinator-parser/private-combinator/combinator.scm index 0ed086af01..86b125ac0f 100644 --- a/collects/combinator-parser/private-combinator/combinator.scm +++ b/collects/combinator-parser/private-combinator/combinator.scm @@ -426,7 +426,14 @@ (cond [(null? corrects) (fail-res input - (make-choice-fail (rank-choice (map fail-type-chance fails)) #f name + (make-choice-fail (rank-choice (map fail-type-chance fails)) + (if (or (null? input) + (not (position-token? (car input)))) + last-src + (update-src-end + last-src + (position-token-end-pos (car input)))) + name (rank-choice (map fail-type-used fails)) (rank-choice (map fail-type-may-use fails)) num-choices choice-names fails))] diff --git a/collects/profj/comb-parsers/parser-units.scm b/collects/profj/comb-parsers/parser-units.scm index aa143bea84..96bb558fac 100644 --- a/collects/profj/comb-parsers/parser-units.scm +++ b/collects/profj/comb-parsers/parser-units.scm @@ -91,7 +91,7 @@ (instanceof "instancef" "instanceo" "intsanceof") (if "fi") (else "lse" "ese" "els" "eles") - (return "eturn" "rturn" "reurn" "retrn" "retun" "retur" "reutrn" "retrun" "returns") + (return "eturn" "rturn" "reurn" "retrn" "retun" "retur" "reutrn" "retrun" "returns" "raturn") (true "rue" "tue" "tre" "tru" "ture" "treu") (false "flse" "fase" "fale" "fals" "flase" "fasle") (interface