西南交大-編譯原理課程設計二-賦值語句的解釋程序設計 - 下載本文

case 7: case 9: case 10: } break;

switch (j + 1) { case 12: } break;

relation.setRelation(Relation.REL_GREATER); break;

relation.setRelation(Relation.REL_NULL); break;

relation.setRelation(Relation.REL_LESS); break;

relation.setRelation(Relation.REL_GREATER); break;

case 12:

case 2:

default:

case 3: case 4:

switch (j + 1) { case 1: case 11:

relation.setRelation(Relation.REL_NULL); break;

case 2: case 3: case 4: case 8: case 12: } break;

relation.setRelation(Relation.REL_GREATER); break;

relation.setRelation(Relation.REL_LESS); break;

default:

case 5: case 6:

switch (j + 1) { case 1: case 11:

11

relation.setRelation(Relation.REL_NULL); break;

case 7: case 9: case 10: } break;

switch (j + 1) { case 1: case 2: case 11: } break;

switch (j + 1) { case 1: case 7: case 9: case 10: case 11: } break;

12

relation.setRelation(Relation.REL_LESS); break;

relation.setRelation(Relation.REL_GREATER); break;

default:

case 7:

relation.setRelation(Relation.REL_NULL); break;

relation.setRelation(Relation.REL_EQUAL); break;

relation.setRelation(Relation.REL_GREATER); break;

relation.setRelation(Relation.REL_LESS); break;

case 8:

case 12:

default:

case 8:

relation.setRelation(Relation.REL_NULL); break;

relation.setRelation(Relation.REL_GREATER); break;

default:

case 9:

switch (j + 1) { case 1:

relation.setRelation(Relation.REL_EQUAL); break;

case 7: case 9: case 10: case 11: } break;

switch (j + 1) { case 1: case 7: case 9: case 10: case 11: } break;

switch (j + 1) { case 12: } break;

switch (j + 1) { case 12:

relation.setRelation(Relation.REL_EQUAL);

13

relation.setRelation(Relation.REL_NULL); break;

relation.setRelation(Relation.REL_GREATER); break;

default:

case 10:

relation.setRelation(Relation.REL_NULL); break;

relation.setRelation(Relation.REL_GREATER); break;

default:

case 11:

relation.setRelation(Relation.REL_GREATER); break;

relation.setRelation(Relation.REL_NULL); break;

default:

case 12:

{

}

}

}

}

}

break;

relation.setRelation(Relation.REL_LESS); break;

default:

break;

relations[i][j] = relation;

// 掃描緩沖區,求得二元組

publicvoid getDoubleGroup(String inputStr) throws Exception {

wordSymbols.clear();

inputStr = \ + inputStr + \; index = 0;

while (index

{

String ch = \;

while ((ch = inputStr.substring(index, index + 1)).equals(\\)) }

if (ch.equals(\)) { }

if (Character.isLetter(ch.charAt(0))) {

if (!recognizeIdentifier(inputStr)) { } index++;

if (!recognizeInteger(inputStr)) { } index++; intcode = -1; switch (ch) { case\:

14

index++;

if (index>= inputStr.length())

break;

index++; continue;

new Exception(\不能識別的標識符\);

} elseif (Character.isDigit(ch.charAt(0))) {

new Exception(\不能識別的整數\);

} else {

code = codeOfWord(\); if (code == -1) } break;

code = codeOfWord(\); if (code == -1) } break;

code = codeOfWord(\); if (code == -1) } break;

code = codeOfWord(\); if (code == -1) } break;

code = codeOfWord(\); if (code == -1)

System.out.println(\找不到該單詞符號的種別碼\); else {

15

System.out.println(\找不到該單詞符號的種別碼\); WordSymbol symbol = new WordSymbol(code, wordSymbols.add(symbol);

else {

WordSymbol.TYPE_NULL, \);

case\:

System.out.println(\找不到該單詞符號的種別碼\); WordSymbol symbol = new WordSymbol(code, wordSymbols.add(symbol);

else {

WordSymbol.TYPE_NULL, \);

case\:

System.out.println(\找不到該單詞符號的種別碼\); WordSymbol symbol = new WordSymbol(code, wordSymbols.add(symbol);

else {

WordSymbol.TYPE_NULL, \);

case\:

System.out.println(\找不到該單詞符號的種別碼\); WordSymbol symbol = new WordSymbol(code, wordSymbols.add(symbol);

else {

WordSymbol.TYPE_NULL, \);

case\:





宁夏11选5(任六)