summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/scala/xml/parsing/ConstructingParser.scala11
1 files changed, 8 insertions, 3 deletions
diff --git a/sources/scala/xml/parsing/ConstructingParser.scala b/sources/scala/xml/parsing/ConstructingParser.scala
index 9e142483a0..04bcba3c9d 100644
--- a/sources/scala/xml/parsing/ConstructingParser.scala
+++ b/sources/scala/xml/parsing/ConstructingParser.scala
@@ -5,11 +5,19 @@ object ConstructingParser {
fromSource(new ConstructingHandler(), inp);
def fromSource(theHandle: ConstructingHandler, inp: scala.io.Source): ConstructingParser = {
+
+
val p = new ConstructingParser() {
val input = inp;
override val handle = theHandle;
def nextch = { ch = input.next; pos = input.pos; }
override val preserveWS = true;
+
+ /** report a syntax error */
+ def reportSyntaxError(str: String): Unit = {
+ Console.println(inp.descr+":"+scala.io.Position.toString(pos)+":"+str);
+ }
+
};
p.nextch;
p
@@ -22,9 +30,6 @@ abstract class ConstructingParser extends MarkupParser[Node] {
val handle = new ConstructingHandler();
- /** report a syntax error */
- def reportSyntaxError(str: String): Unit = throw FatalError(str);
-
/** this method assign the next character to ch and advances in input */
def nextch: Unit;