mbeckerle commented on a change in pull request #102: Added tests that exercise 
ambiguous separator/terminator case.
URL: https://github.com/apache/incubator-daffodil/pull/102#discussion_r210319862
 
 

 ##########
 File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/PState.scala
 ##########
 @@ -323,6 +329,26 @@ final class PState private (
   }
 
   override lazy val (regexMatchBuffer, regexMatchBitPositionBuffer) = 
dataProcArg.regexMatchState.get
+
+  /**
+   * Verify that the state is left where we expect it to be after
+   * a normal parse. I.e., stacks have been popped back to their original 
state,
+   * pools - all items returned, etc.
+   *
+   * If for some reason parsing ends with a throw (not supposed to, but just 
if)
+   * then all bets are off, so this must be called ONLY on a normal return 
from parse call.
+   * That is, the parse can succeed or fail with diagnostics, but it must have 
returned normally.
+   */
+  def verifyFinalState(wasThrow: Boolean): Unit = {
+    if (!wasThrow) {
+      markPool.finalCheck
 
 Review comment:
   Concur. Mark pool check should happen either way. 

----------------------------------------------------------------
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