tokenNames_ = TOKEN_NAMES;
}
public final Grammar class_def(Hierarchy hier) throws ParserException
{
Token preamble = null;
Token sub = null;
Token sup = null;
Token memberA = null;
Grammar gr = null;
IndexedVector rules = new IndexedVector(100);
IndexedVector classOptions = null;
try
{
if (la_1 == 5)
{
preamble = LT(1);
match(5);
}
match(6);
sub = LT(1);
match(7);
match(8);
sup = LT(1);
match(7);
match(9);
gr = hier.getGrammar(sub.getText());
if (gr != null)
{
net.sf.jcontracts.antlr.Tool.toolError("redefinition of grammar " + gr.getName() + " ignored");
gr = null;
}
else
{
gr = new Grammar(sub.getText(), sup.getText(), rules);
if (preamble != null)
{
gr.setPreambleAction(preamble.getText());
}
}
if (la_1 == 17)
{
classOptions = optionSpec(gr);
}
if (gr != null)
{
gr.setOptions(classOptions);
}
if (la_1 == 10)
{
tokensSpec();
}
if (la_1 == 5)
{
memberA = LT(1);
match(5);
gr.setMemberAction(memberA.getText());
}
int _cnt = 0;
do
{
if (_tokenSet_2.member(la_1))