3.3 Formal specification syntax

We introduced the classgen specification language in a rather informal way. The table gives a formal description of the specification syntax. Please be aware that this specification has preliminary status and is not 100% correct.

specification ::= [package] [attribute]* [production]* [method]*

package       ::= "package" Ident ["." Ident]* ";"

production    ::= Ident "::=" alternatives [attribute]*
                  | Ident "::=" "one" "of" Ident ["," Ident]*
                  
alternatives  ::= [ alternative ["|" alternative]* ]      
                  
alternative   ::= "{" Ident "}" [item]*

item          ::= Ident [":" Ident]
                  | Ident "*" [":" Ident]
                         
attribute     ::= ("inherited"|"synthesized"|"attribute")
                      Ident Ident ["," Ident]* ["with" [Ident]*] ";"
                      
method        ::= "methods" "of" Ident "{" [line]* "}"

line          ::= [legal Character]*

This is graphical representation of classgen specification language syntax created with visual classgen.

© copyright 2000, 2001, 2002 Sebastian Winter (winterse@in.tum.de) and Florian Deissenboeck (flo@deissenboeck.de)

© copyright 2000, 2001, 2002 Technical University of Munich, Germany