Ignore:
Timestamp:
10/07/13 08:49:34 (9 years ago)
Author:
jkarder
Message:

#2069:

  • merged IfStat and ElseStat into IfThenElseStat
  • changed the font of the suffixCode text box in the CodeNodeView
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Grammar.cs

    r10014 r10028  
    5757      var block = new Block();
    5858      var stat = new Stat();
    59       var ifStat = new IfStat();
    60       var elseStat = new ElseStat();
     59      var ifThenElseStat = new IfThenElseStat();
    6160      var whileStat = new WhileStat();
    6261
     
    122121
    123122      #region Symbol Collections
    124       var controlSymbols = new ISymbol[] { ifStat, whileStat };
     123      var controlSymbols = new ISymbol[] { ifThenElseStat, whileStat };
    125124      var actionSymbols = new ISymbol[] {
    126125        ahead, back, fire, turnGunLeft, turnGunRight, turnLeft, turnRadarLeft, turnRadarRight, turnRight
     
    132131
    133132      var events = new GroupSymbol(EventsName, new ISymbol[] { onScannedRobot, onBulletHit, onBulletMissed, onHitByBullet, onHitRobot, onHitWall });
    134       var controlStatements = new GroupSymbol(ControlStatementsName, controlSymbols.Concat(new[] { elseStat }));
     133      var controlStatements = new GroupSymbol(ControlStatementsName, controlSymbols);
    135134      var expressions = new GroupSymbol(ExpressionsName, new ISymbol[] { logicalExpr, numericalExpr });
    136135      var robocodeFunctions = new GroupSymbol(RobocodeFunctionsName, actionSymbols.Concat(functionSymbols));
     
    193192
    194193      // IfStat
    195       AddAllowedChildSymbol(ifStat, logicalExpr, 0);
    196       AddAllowedChildSymbol(ifStat, stat, 1);
    197       AddAllowedChildSymbol(ifStat, emptyEvent, 1);
    198       AddAllowedChildSymbol(ifStat, doNothing, 1);
    199       AddAllowedChildSymbol(ifStat, elseStat, 2);
    200       AddAllowedChildSymbol(ifStat, emptyEvent, 2);
    201       AddAllowedChildSymbol(ifStat, doNothing, 2);
    202 
    203       // ElseStat
    204       AddAllowedChildSymbol(elseStat, stat);
    205       AddAllowedChildSymbol(elseStat, emptyEvent);
    206       AddAllowedChildSymbol(elseStat, doNothing);
     194      AddAllowedChildSymbol(ifThenElseStat, logicalExpr, 0);
     195      AddAllowedChildSymbol(ifThenElseStat, stat, 1);
     196      AddAllowedChildSymbol(ifThenElseStat, emptyEvent, 1);
     197      AddAllowedChildSymbol(ifThenElseStat, doNothing, 1);
     198      AddAllowedChildSymbol(ifThenElseStat, stat, 2);
     199      AddAllowedChildSymbol(ifThenElseStat, emptyEvent, 2);
     200      AddAllowedChildSymbol(ifThenElseStat, doNothing, 2);
    207201
    208202      // WhileStat
Note: See TracChangeset for help on using the changeset viewer.