コード例 #1
0
ファイル: Parser.java プロジェクト: peter-maday/patus
 public void SemErr(int line, int col, String s) {
   printMsg(line, col, s);
   count++;
 }
コード例 #2
0
ファイル: Parser.java プロジェクト: peter-maday/patus
 public void Warning(int line, int col, String s) {
   printMsg(line, col, s);
 }
コード例 #3
0
ファイル: Parser.java プロジェクト: peter-maday/patus
 public void SynErr(int line, int col, int n) {
   String s;
   switch (n) {
     case 0:
       s = "EOF expected";
       break;
     case 1:
       s = "ident expected";
       break;
     case 2:
       s = "integer expected";
       break;
     case 3:
       s = "float expected";
       break;
     case 4:
       s = "\"=\" expected";
       break;
     case 5:
       s = "\"#\" expected";
       break;
     case 6:
       s = "\"<=\" expected";
       break;
     case 7:
       s = "\">=\" expected";
       break;
     case 8:
       s = "\"<\" expected";
       break;
     case 9:
       s = "\">\" expected";
       break;
     case 10:
       s = "\"+\" expected";
       break;
     case 11:
       s = "\"-\" expected";
       break;
     case 12:
       s = "\"*\" expected";
       break;
     case 13:
       s = "\"/\" expected";
       break;
     case 14:
       s = "\"^\" expected";
       break;
     case 15:
       s = "\"(\" expected";
       break;
     case 16:
       s = "\")\" expected";
       break;
     case 17:
       s = "\"int\" expected";
       break;
     case 18:
       s = "\"float\" expected";
       break;
     case 19:
       s = "\"double\" expected";
       break;
     case 20:
       s = "\",\" expected";
       break;
     case 21:
       s = "\".\" expected";
       break;
     case 22:
       s = "\"[\" expected";
       break;
     case 23:
       s = "\"]\" expected";
       break;
     case 24:
       s = "??? expected";
       break;
     case 25:
       s = "invalid UnaryExpression";
       break;
     case 26:
       s = "invalid TypeCast";
       break;
     default:
       s = "error " + n;
       break;
   }
   printMsg(line, col, s);
   count++;
 }