stevedlawrence commented on a change in pull request #56: Improved toString of
grammar and parser/unparser objects.
URL: https://github.com/apache/incubator-daffodil/pull/56#discussion_r179206358
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/PrimitivesElementKinds.scala
##########
@@ -81,7 +82,14 @@ case class DelimiterStackCombinatorElement(e: ElementBase,
body: Gram) extends T
lazy val uInit = if (e.initiatorParseEv.isKnownNonEmpty)
One(e.initiatorUnparseEv) else Nope
lazy val uTerm = if (e.terminatorParseEv.isKnownNonEmpty)
One(e.terminatorUnparseEv) else Nope
- lazy val parser: DaffodilParser = new DelimiterStackParser((pInit.toList ++
pTerm.toList).toArray, e.termRuntimeData, body.parser)
+ lazy val delims = (pInit.toList ++ pTerm.toList)
+
+ override def toString() =
+ "<" + Misc.getNameFromClass(this) + " delims='" + delims.mkString(" ") +
"'>" +
Review comment:
In the past we've had issues where delimters aren't correctly escaped
according to HTML standards. This makes running things through xmllint to see a
pretty indented version difficult. Shoud/can we run the delims through some
sort of HTML-ifier so they are more friendly to such tools?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services