BNF for Parser.jj

NON-TERMINALS

dtd ::= ( elementDecl | attListDecl )* <EOF>
elementDecl ::= "<!ELEMENT" Name contentSpec ">"
contentSpec ::= <EMPTY>
| <ANY>
| mixed
| children
mixed ::= "(" <PCDATA> ( ( "|" Name )* ")*" | ")" )
children ::= seqchoice ( modifier )?
seqchoice ::= "(" cp ( choice | seq ) ")"
choice ::= ( "|" cp )+
seq ::= ( "," cp )*
cp ::= ( Name | seqchoice ) ( modifier )?
modifier ::= "*"
| "+"
| "?"
attListDecl ::= "<!ATTLIST" Name ( attribDef )* ">"
attribDef ::= Name attribType defaultDecl
attribType ::= stringType
| tokenizedType
| enumeratedType
stringType ::= <CDATA>
tokenizedType ::= <ID>
| <IDREF>
| <IDREFS>
| <ENTITY>
| <ENTITIES>
| <NMTOKEN>
| <NMTOKENS>
enumeratedType ::= ( notationType | enumeration )
notationType ::= <NOTATION> "(" Name ( "|" Name )* ")"
enumeration ::= "(" Name ( "|" Name )* ")"
defaultDecl ::= <REQUIRED>
| <IMPLIED>
| ( ( <FIXED> )? attribValue )
attribValue ::= <QUOTEDSTR>
Name ::= <NAME>