Input = List(Module) ConcreteCd EOF. Module = "module" DI List(Aspect) // list of visitor classes "end". DI = "di" DIName [ParameterDI] "{" Cd_Graph "}". // DI name becomes module name ParameterDI = "(" DIName DIVariable ")". Aspect = "aspect" AspectName CList(Declaration). Declaration: Strategy | Traversal| Constraints. Strategy = "declare strategy". Traversal = "declare traversal". Constraints = "declare constraints". ConcreteCd = "cd" CDName "implements" DIName [ActualDI] "{" Cd_Graph List(Map)"}". ActualDI = "(" DIName ")". Map = "map" MapName "=" "for" DIName CList(Basic). Basic = "use" Cd_Vertex "as" Cd_Vertex. Cd_Graph = < adjacencies > Cd_Adj_List . Cd_Adj_List ~ { Cd_Adjacency } . Cd_Adjacency = < source > Cd_Vertex < ns > Cd_Neighbors "." . Cd_Neighbors : Cd_Construct | Cd_Alternat *common* < construct_ns > Cd_LV_List . Cd_Construct = "=" . Cd_Alternat = ":" < alternat_ns > Cd_V_BarList . Cd_LV_List ~ { Cd_LVertex } . Cd_V_BarList ~ Cd_Vertex { "|" Cd_Vertex } . Cd_LVertex = ["<" < label_name > Cd_Label ">"] < vertex > Cd_Vertex . Cd_Vertex = < vertex_name > Cd_ClassName ["@" DIName] . Cd_Label = Ident. Cd_ClassName = Ident. DIName = Ident. DIVariable = Ident. AspectName = Ident. CDName = Ident. MapName = Ident. List(S) ~ {S}. CList(S) ~ "{" {S} "}". Main = String.