Семантика языков программирования. Семантический анализ и элементы генерации объектного кода или интерпретации, страница 10

   <action>prog=prog+" "+currentLexem.textOfWord+" ";</action>

   <string>,</string>

   <symbol>identifier</symbol>

   <symbol>otherparams</symbol>

  </rightPart>

  <comment>параметры функции</comment>

 </rule>

 <rule for='Classes' leftPart='otherparams'>

  <rightPart>

  </rightPart>

  <comment>у функции кончились параметры</comment>

 </rule>

 <rule for='Classes' leftPart='BasePart'>

  <rightPart>

   <symbol>CycleConstruction</symbol>

  </rightPart>

  <comment>Цикл (в конце пусто или ;)</comment>

 </rule>

 <rule for='Classes' leftPart='BasePart'>

  <rightPart>

   <symbol>SelectConstuction</symbol>

  </rightPart>

  <comment>Селект</comment>

 </rule>

 <rule for='Classes' leftPart='BasePart'>

  <rightPart>

   <symbol>IfConstruction</symbol>

  </rightPart>

  <comment>if</comment>

 </rule>

 <rule for='Classes' leftPart='BasePart'>

  <rightPart>

   <action>postFix.push(currentLexem.textOfWord);</action>

   <symbol>TypeId</symbol>

   <action>if(ct.Resolved(currentLexem.textOfWord.toString())){

ti.put(0,0,0,0,"type fail");

return false;

}tetrades.add(new Tetrade("MALLOC",postFix.peek().toString(), "",currentLexem.textOfWord.toString()));

postFix.push(currentLexem.textOfWord);

prog=prog+" "+currentLexem.textOfWord+";";</action>

   <symbol>id</symbol>

   <action>postFix.push("define_perem");</action>

   <string>;</string>

  </rightPart>

  <comment>объявление</comment>

 </rule>

 <rule for='Classes' leftPart='BasePart'>

  <rightPart>

   <action>prog=prog+" "+currentLexem.textOfWord+" ";</action>

   <string>return</string>

   <symbol>NowOrExp</symbol>

   <action>postFix.push("return");

 tetrades.add(new Tetrade("RET","","","")); prog=prog+";";</action>

   <string>;</string>

  </rightPart>

 </rule>

 <rule for='Classes' leftPart='BasePart'>

  <rightPart>

   <string>drop</string>

   <action>tetrades.add(new Tetrade("DELETE",currentLexem.textOfWord.toString(),"",""));

postFix.push(currentLexem.textOfWord);

postFix.push("drop");</action>

   <symbol>id</symbol>

   <string>;</string>

  </rightPart>

 </rule>

 <rule for='Classes' leftPart='BasePart'>

  <rightPart>

   <action>funcCall.push(postFix.size());postFix.push(currentLexem.textOfWord);prog=prog+" "+currentLexem.textOfWord+" ";</action>

   <symbol>id</symbol>

   <symbol>RestAnyOp</symbol>

   <string>;</string>

   <action>prog=prog+";";</action>

  </rightPart>

  <comment>непонятная непонятность может быть( вызов функции,  объявление функции из класса, и много чего еще =( вот печаль</comment>

 </rule>

 <rule for='Classes' leftPart='CycleConstruction'>

  <rightPart>

   <action>prog=prog+" for( ";</action>

   <string>cycle</string>

   <string>(</string>

   <symbol>O</symbol>

   <action>prog=prog+";";</action>

   <string>;</string>

   <action>labels.push(++forCount);

  postFix.push(" Label_IfStart"+forCount+":");</action>

   <symbol>LV</symbol>

   <string>;</string>