// do line comments work? Root ::= A* B*; A ::= /SomeNTA:A/; B ::= ; rel A.Di1 -> B; rel A.Di2? -> B; rel A.Di3* -> B; /* do multiline comments work */ /**/ /* * work? */ /** * The root of a Java AST. * *

A Java program consists of multiple compilation units that represent the * source files of the program. */ rel A.Bi1 <-> B.Bi1; rel A.Bi2 <-> B.Bi2?; rel A.Bi3 <-> B.Bi3*; rel A.Bi4? <-> B.Bi4; rel A.Bi5? <-> B.Bi5?; rel A.Bi6? <-> B.Bi6*; rel A.Bi7* <-> B.Bi7; rel A.Bi8* <-> B.Bi8?; rel A.Bi9* <-> B.Bi9*; rel A <- Root.AaLeft?; rel B <- A.Di1Left ; rel B <- A.Di2Left?; rel B <- A.Di3Left*; // empty productions C ; // production with nonterminals of different kinds D ::= SingleA:A ListOfA:A* [OptionalA:A] /NTAA:A/ ; // production with tokens, nonterminal-tokens, multi-line E ::= // // // // // // ; // inheritance and empty F : A ; // inheritance and more on RHS G : C ::= [D] ; // line comment with special symbols like |, *, ->, <-, <->, [A], B ::= C, :, \n, \r, ~, #, /A/ /* block comment with special symbols like |, *, ->, <-, <->, [A], B ::= C, :, \n, \r, ~, #, /A/ */