stevedlawrence commented on pull request #481:
URL: https://github.com/apache/daffodil/pull/481#issuecomment-804849585
> I removed the call to testRaw from DelimiterCookerNoSoleES. I had to
define noCharClassEntities() otherwise the compiler complained that "context"
and "raw" did not exist.
I'm not sure why you get this error, but nothing calls
``noCharClassEntities``. You have removed all calls of it, which I think is
correct. The ``testRaw`` function is the only that that does anything now. So
adding the ``noCharClassEntities`` probably isn't the right solution, and we
need to bring the ``testRaw`` function back, since that's what actually does
tests.
In your current pull request that you've pushed, if I change
```scala
protected def noCharClassEntities(...)
```
to
```scala
override def testRaw(...)
```
then it compiles without any errors. And if I update ``Cookers.scala`` to
use this new cooker:
```scala
object TerminatorCookerNoES extends DelimiterCookerNoSoleES("terminator")
```
and run the test you mention, then I do get the error error:
> The ES entity cannot appear on its own when dfdl:lengthKind="delimited
Which seems right to me. Unfortunately, the test still fails because the
TDML test expects ``dfdl:terminator`` in the error message, but that's expected
since the new error message no longer includes that information (we should
probably add that back to the error message). But with those changes I
mentioned, it does seem to be doing the right test and detecting the sole ES.
One additional suggestion that I just noticed: In the new
``DelimiterCookerNoSoleES``, the ``oneLiteralCooker`` member is a
``StringLiteralNoCharClassEntities``. That class implies that there are some
char class entities that are never allowed. But that isn't really the case with
our new ``NoSoleES`` cooker. That new cooker allows all entities, but just has
a special restriction on how some can be used. Since we don't need any of the
logic associated with ``StringLiteralNoCharClassEntities``, we should just make
it a ``StringLiteralBase``, for the new ``NoSoleES`` cooker:
```scala
override val oneLiteralCooker: StringLiteralBase =
new StringLiteralBase(propName, true) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]