stevedlawrence commented on a change in pull request #176: Add better error
message for '/' vs 'div'
URL: https://github.com/apache/incubator-daffodil/pull/176#discussion_r251990530
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dpath/DFDLExpressionParser.scala
##########
@@ -235,6 +242,7 @@ class DFDLPathExpressionParser[T <: AnyRef](qn: NamedQName,
})("add")
def MultiplicativeExpr: Parser[Expression] = log(
+ UnaryExpr ~ (("/") ~ UnaryExpr) ^^ { _ => context.SDE("'/' is not a valid
operator in DFDL Expression Syntax. Did you mean to use 'div'?") } |
Review comment:
Yeah, I was afraid that would happen. I'm not sure this is really worth
fixing. The ambiguity with path expressions makes this difficult to resolve. I
believe we have a general bug to fix diagnostics coming out of DFDL expression
compilation. I suspect whatever is done to make that better will be the right
solution to also make this specific case better.
----------------------------------------------------------------
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