stevedlawrence commented on a change in pull request #12: Revised daffodil-io 
module to require passing in a FormatInfo object.
URL: https://github.com/apache/incubator-daffodil/pull/12#discussion_r158045866
 
 

 ##########
 File path: 
daffodil-runtime1/src/main/scala/edu/illinois/ncsa/daffodil/processors/parsers/Parser.scala
 ##########
 @@ -173,31 +141,38 @@ class SeqCompParser(context: RuntimeData, val 
childParsers: Array[Parser])
 
 }
 
-class AltCompParser(context: RuntimeData, val childParsers: Seq[Parser])
-  extends ParserObject(context) {
+class AltCompParser(ctxt: RuntimeData, val childParsers: Seq[Parser])
+  extends ParserObject(ctxt) {
 
   override lazy val childProcessors = childParsers
 
   override def nom = "alt"
 
   def parse(pstate: PState): Unit = {
     var pBefore: PState.Mark = null
-
-    pstate.pushDiscriminator
-    var diagnostics: Seq[Diagnostic] = Nil
-    var i = 0
-    var parser: Parser = null
-    val limit = childParsers.length
-    var returnFlag = false
-    while (!returnFlag && i < limit) {
-      parser = childParsers(i)
-      i += 1
-      log(LogLevel.Debug, "Trying choice alternative: %s", parser)
-      pBefore = pstate.mark("AltCompParser1")
-      try {
-        parser.parse1(pstate)
-      } catch {
-        case d: SchemaDefinitionDiagnosticBase => {
+    try {
+      pstate.pushDiscriminator
+      var diagnostics: Seq[Diagnostic] = Nil
+      var i = 0
+      var parser: Parser = null
+      val limit = childParsers.length
+      var returnFlag = false
+      while (!returnFlag && i < limit) {
+        parser = childParsers(i)
+        i += 1
+        log(LogLevel.Debug, "Trying choice alternative: %s", parser)
+        pBefore = pstate.mark("AltCompParser1")
+        try {
+          pstate.parse1(parser)
 
 Review comment:
   Not sure what this change is? Maybe something failed with rebasing with the 
commit to clean up Mark Pools?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to