visiting all nodes/subnodes of Ecore model generated by DSL

52 views Asked by At

I know basics of xtext, and I have written a grammar(which works fine). I know that an Ecore model is generated. But I have problem in visiting all rules/sub-rules(nodes) of grammar in AST (programmatically). Whenever I am applying some validation checks(or others) I always find it difficult to navigate to that particular rule on which check is to be applied. (to some extent I do it by hit and trail).

I want to ask that is there any way to print all the nodes sub-nodes of your grammar(programmatically) just to clarify in my mind how each node is being accessed.

0

There are 0 answers