3

I am in need of a DSL which has some known structure and a lot of only known at runtime structure.

for eg:

test "name goes here"{
  description : """ description """
  create user {
    id : 1
    fn : """ x """
    ln : """ y """
  }
  assert user.name == "x"
  delete user { 
    id = 1
  }
  user1 = GET user (1)
  assert user1 == null
}

in the above snippet, the keywords test, create, GET, delete etc are known during the development of the DSL/tooling. But, when user invokes content assist after create. I want to download some schema files (rather, I would have downloaded the schema as first step of my processing and cache the schema) and offer the entities, of which user is one of the entities. And when user invokes content assist for properties, I again look into the entity definition and offer fn, ln etc as possible entries there.

Is this doable with Groovy and GDSL? thank you

Atul Dwivedi
  • 1,452
  • 16
  • 29
user19937
  • 587
  • 1
  • 7
  • 25

0 Answers0