Probleme with these Rule

Apr 3, 2012 at 8:17 AM

Hi,

how to combine the two rules :

  • blockIfElse.Rule = ToTerm("if") + generalExpr + NewLine + "begin" + NewLine + listStatement + NewLine + "end" + NewLine + "else" + NewLine + "begin" + NewLine + listStatement + NewLine + "end" + NewLine;           
  • blockIf.Rule = ToTerm("if") + Expr + NewLine + "begin" + NewLine + AssignmentStmt+NewLine+"end";
Coordinator
Apr 4, 2012 at 4:25 PM

look at c# grammar, you need to create smth like 

else_clause_opt.Rule = Empty | PreferShiftHere() + "else" + statement;