//-------------------------CD FILE

Main = .
//DH-full
//--------------------
//  Copyright (C) 1991 Northeastern University.

//  Permission is granted to any individual or institution to use, copy, modify,
//  and distribute this class dictionary, provided that this complete copyright
//  and permission notice is maintained, intact, in all copies and supporting
//  documentation.

Cd_graph = < adjacencies > Nlist(Adjacency) EOF.
Adjacency =
  < source > Vertex
  < ns > Neighbors
  "." *l.
Neighbors :
  Neighbors_wc .
Neighbors_wc :
  Construct_ns |
  Alternat_ns
  common < construct_ns > List(Any_vertex).
Construct_ns = "=".
Alternat_ns = ":"
  < alternat_ns > Bar_list(Term) [<common> Common].
Common = "common".
Any_vertex :
  Opt_labeled_term
  | Optional_term
  | Syntax_vertex
  .
Vertex = < vertex_name > Ident.
Syntax_vertex :
  Regular_syntax
  common.
Regular_syntax  = < string > String .
Opt_labeled_term :
  Labeled
  | Regular
    common <vertex> Term.
Regular = .
Labeled = "<" < label_name > Ident ">" .
Term :
  Normal
  common <vertex> Vertex
  .
Normal = .
Optional_term = "[" <opt> Sandwich(Opt_labeled_term) "]".
// parameterized classes
List(S) ~ {S}.
Nlist(S) ~ S {S}.
Bar_list(S) ~ S {"|" S}.
Comma_list(S) ~ S {"," S}.
Sandwich(S) =
  <first> List(Syntax_vertex) <inner> S
  <second> List(Syntax_vertex)
  .
EditingVisitor = extends Visitor.
SandwichVisitor = extends Visitor.
SpecPrintVisitor= extends PrintVisitor.

//-------------------------END CD FILE