mbeckerle commented on a change in pull request #422:
URL: https://github.com/apache/incubator-daffodil/pull/422#discussion_r498505729
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/GrammarTerm.scala
##########
@@ -51,7 +52,8 @@ import org.apache.daffodil.dsom.Term
abstract class Gram(contextArg: SchemaComponent)
extends OOLAGHostImpl(contextArg)
with BasicComponent
- with GramRuntime1Mixin {
+ with GramRuntime1Mixin
+ with GramRuntime2Mixin {
Review comment:
I am coming around to brandon's way of thinking here. The various kinds
of code aren't in the same spot file-wise, they're in mixins, and the mixins
separate the concerns into different files. But they are hanging off the same
classes, so in that sense, all in the same place.
So for runtime2, we can try treating the grammar objects as just a data
structure passed to the runtime2 back end "compiler", which then dispatches on
type of grammar object.
The class duplication I was worrying about is a false issue. The
backend-specific functions don't have to mirror the grammar object
constructors. The backend compiler functions just get passed the grammar
object and access things off of it.
----------------------------------------------------------------
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]