Changeset 9727 for branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer
- Timestamp:
- 07/19/13 08:48:19 (11 years ago)
- Location:
- branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/GPDef.atg
r9724 r9727 33 33 . 34 34 35 NonterminalDecl = ident "<<" {ANY} ">>"'.'35 NonterminalDecl = ident [ "<<" {ANY} ">>" ] '.' 36 36 . 37 37 38 TerminalDecl = ident "<<" {ANY} ">>"38 TerminalDecl = ident [ "<<" {ANY} ">>" ] 39 39 [ "CONSTRAINTS" ConstraintDef ] 40 40 '.' … … 48 48 . 49 49 50 RuleDef = ident "<<" {ANY} ">>"'=' [SemDecl] SynExpr '.'50 RuleDef = ident [ "<<" {ANY} ">>" ] '=' [SemDecl] SynExpr '.' 51 51 . 52 52 … … 58 58 59 59 SynFact = 60 ident "<<" {ANY} ">>"60 ident [ "<<" {ANY} ">>" ] 61 61 | "EPS" 62 62 | '(' SynExpr ')' -
branches/HeuristicLab.Problems.GPDL/SyntaxAnalyzer/Parser.cs
r9724 r9727 129 129 void NonterminalDecl() { 130 130 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 } 136 138 Expect(13); 137 139 } … … 139 141 void TerminalDecl() { 140 142 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 } 146 150 if (la.kind == 16) { 147 151 Get(); … … 153 157 void RuleDef() { 154 158 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 } 160 166 Expect(21); 161 167 if (la.kind == 14) { … … 239 245 case 1: { 240 246 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 } 246 254 break; 247 255 }
Note: See TracChangeset
for help on using the changeset viewer.