postFix.push("define_class");
if(!ct.AddClass(currentLexem.textOfWord.toString())){
ti.put(0,0,0,0,"Сlass "+currentLexem.textOfWord.toString()+" redefinition");
return false;
}
tetrades.add(new Tetrade("DEFINE_CLASS", currentLexem.textOfWord.toString(),"",""));
prog=prog+"class "+currentLexem.textOfWord.toString()+"{";</action>
<symbol>id</symbol>
<string>{</string>
<symbol>dataAndMethods</symbol>
<string>}</string>
<string>;</string>
<action>prog=prog+"} ";
postFix.push("define_class_end");</action>
</rightPart>
<comment>Класс</comment>
</rule>
<rule for='Classes' leftPart='dataAndMethods'>
<rightPart>
</rightPart>
</rule>
<rule for='Classes' leftPart='dataAndMethods'>
<rightPart>
<action>labels.push(currentLexem.textOfWord);prog=prog+" "+currentLexem.textOfWord+" ";</action>
<symbol>Modifier</symbol>
<symbol>ClassPart</symbol>
<symbol>dataAndMethods</symbol>
</rightPart>
</rule>
<rule for='Classes' leftPart='Modifier'>
<rightPart>
<string>private</string>
</rightPart>
</rule>
<rule for='Classes' leftPart='Modifier'>
<rightPart>
<string>public</string>
</rightPart>
</rule>
<rule for='Classes' leftPart='ClassPart'>
<rightPart>
<action>postFix.push(currentLexem.textOfWord);</action>
<symbol>TypeId</symbol>
<action>postFix.push(currentLexem.textOfWord); prog=prog+" "+currentLexem.textOfWord+" ";</action>
<symbol>id</symbol>
<symbol>BasicEnd</symbol>
</rightPart>
</rule>
<rule for='Classes' leftPart='ClassPart'>
<rightPart>
<action>postFix.push(currentLexem.textOfWord); prog=prog+" "+currentLexem.textOfWord+" ";</action>
<string>void</string>
<action>postFix.push(currentLexem.textOfWord); prog=prog+" "+currentLexem.textOfWord+" ";</action>
<symbol>id</symbol>
<action>if(!ct.AddMethod((postFix.get(postFix.size()-3).toString().compareTo("public")==0)?true:false, postFix.get(postFix.size()-2).toString(),postFix.get(postFix.size()-1).toString())){ ti.put(0,0,0,0,"method redefinition");return false;}
postFix.push("define_method");MetCon=true;</action>
<symbol>FuncBody</symbol>
<action>postFix.push("define_method_end");</action>
</rightPart>
</rule>
<rule for='Classes' leftPart='ClassPart'>
<rightPart>
<action>postFix.push(currentLexem.textOfWord); prog=prog+" "+currentLexem.textOfWord+" ";</action>
<symbol>id</symbol>
<symbol>MethodOrConstrunctor</symbol>
</rightPart>
</rule>
<rule for='Classes' leftPart='TypeId'>
<rightPart>
<string>card</string>
<action>prog=prog+"int ";</action>
</rightPart>
</rule>
<rule for='Classes' leftPart='TypeId'>
<rightPart>
<string>char</string>
<action>prog=prog+"char";</action>
</rightPart>
</rule>
<rule for='Classes' leftPart='TypeId'>
<rightPart>
<string>float</string>
<action>prog=prog+"float";</action>
</rightPart>
</rule>
<rule for='Classes' leftPart='TypeId'>
<rightPart>
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.