Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • R RagConnect
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • JastAdd
  • RagConnect
  • Issues
  • #12

Closed
Open
Created Jan 12, 2021 by René Schöne@rschoeneOwner

Endpoints on rootNode cause problems

Endpoints defined on the nonterminal either defined as rootNode or being a root, causes a generated, inherited attribute for the handler access to fail.

In case of mqtt, the handler attribute is currently generated using:

  {{#RootTypeComponents}}
  {{#first}}inh MqttServerHandler ASTNode.{{mqttHandlerAttribute}}();{{/first}}
  eq {{rootNodeName}}.get{{name}}().{{mqttHandlerAttribute}}() = {{mqttHandlerField}};
  {{/RootTypeComponents}}
  {{^RootTypeComponents}}
  syn MqttServerHandler {{rootNodeName}}.{{mqttHandlerAttribute}}() = {{mqttHandlerField}};
  {{/RootTypeComponents}}

Here, RootTypeComponents is initialized in RagConnect.toMustache in intermediate/Generation.jadd:

    for (Component child : rootNode.getComponentList()) {
      if (child.isTypeComponent()) {
        result.addRootTypeComponent(child.asTypeComponent().toMustache());
      }
    }

This fails for the example in the documentation, because RootTypeComponents is not empty containing the type component B:

A ::= <Input:String> /<OutputOnA:String>/ B* ;
B ::= /<OutputOnB:String>/ ;
Assignee
Assign to
Time tracking