Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/19/13 08:48:19 (11 years ago)
Author:
gkronber
Message:

#2026 attributes for NT- and T-symbols are optional (incorrectly translated from Coco-2 yesterday)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/Parser.cs

    r9724 r9727  
    129129  void NonterminalDecl() {
    130130    Expect(1);
    131     Expect(4);
    132     while (StartOf(1)) {
    133       Get();
    134     }
    135     Expect(5);
     131    if (la.kind == 4) {
     132      Get();
     133      while (StartOf(1)) {
     134        Get();
     135      }
     136      Expect(5);
     137    }
    136138    Expect(13);
    137139  }
     
    139141  void TerminalDecl() {
    140142    Expect(1);
    141     Expect(4);
    142     while (StartOf(1)) {
    143       Get();
    144     }
    145     Expect(5);
     143    if (la.kind == 4) {
     144      Get();
     145      while (StartOf(1)) {
     146        Get();
     147      }
     148      Expect(5);
     149    }
    146150    if (la.kind == 16) {
    147151      Get();
     
    153157  void RuleDef() {
    154158    Expect(1);
    155     Expect(4);
    156     while (StartOf(1)) {
    157       Get();
    158     }
    159     Expect(5);
     159    if (la.kind == 4) {
     160      Get();
     161      while (StartOf(1)) {
     162        Get();
     163      }
     164      Expect(5);
     165    }
    160166    Expect(21);
    161167    if (la.kind == 14) {
     
    239245    case 1: {
    240246      Get();
    241       Expect(4);
    242       while (StartOf(1)) {
    243         Get();
    244       }
    245       Expect(5);
     247      if (la.kind == 4) {
     248        Get();
     249        while (StartOf(1)) {
     250          Get();
     251        }
     252        Expect(5);
     253      }
    246254      break;
    247255    }
Note: See TracChangeset for help on using the changeset viewer.