home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / tools / java / Scanner.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  12.0 KB  |  1,115 lines

  1. package sun.tools.java;
  2.  
  3. import java.io.IOException;
  4. import java.io.InputStream;
  5.  
  6. public class Scanner implements Constants {
  7.    public static final int OFFSETINC = 1;
  8.    public static final int LINEINC = 262144;
  9.    public static final int EOF = -1;
  10.    public Environment env;
  11.    // $FF: renamed from: in sun.tools.java.ScannerInputStream
  12.    protected ScannerInputStream field_0;
  13.    public boolean scanComments = false;
  14.    public int token;
  15.    public int pos;
  16.    public int prevPos;
  17.    // $FF: renamed from: ch int
  18.    protected int field_1;
  19.    public char charValue;
  20.    public int intValue;
  21.    public long longValue;
  22.    public float floatValue;
  23.    public double doubleValue;
  24.    public String stringValue;
  25.    public Identifier idValue;
  26.    public int radix;
  27.    public String docComment;
  28.    private int count;
  29.    private char[] buffer = new char[32];
  30.  
  31.    private void putc(int var1) {
  32.       if (this.count == this.buffer.length) {
  33.          char[] var2 = new char[this.buffer.length * 2];
  34.          System.arraycopy(this.buffer, 0, var2, 0, this.buffer.length);
  35.          this.buffer = var2;
  36.       }
  37.  
  38.       this.buffer[this.count++] = (char)var1;
  39.    }
  40.  
  41.    private String bufferString() {
  42.       char[] var1 = new char[this.count];
  43.       System.arraycopy(this.buffer, 0, var1, 0, this.count);
  44.       return new String(var1);
  45.    }
  46.  
  47.    public Scanner(Environment var1, InputStream var2) throws IOException {
  48.       this.env = var1;
  49.       this.useInputStream(var2);
  50.    }
  51.  
  52.    protected void useInputStream(InputStream var1) throws IOException {
  53.       try {
  54.          this.field_0 = new ScannerInputStream(this.env, var1);
  55.       } catch (Exception var2) {
  56.          this.env.setCharacterEncoding((String)null);
  57.          this.field_0 = new ScannerInputStream(this.env, var1);
  58.       }
  59.  
  60.       this.field_1 = this.field_0.read();
  61.       this.prevPos = this.field_0.pos;
  62.       this.scan();
  63.    }
  64.  
  65.    protected Scanner(Environment var1) {
  66.       this.env = var1;
  67.    }
  68.  
  69.    private static void defineKeyword(int var0) {
  70.       Identifier.lookup(Constants.opNames[var0]).setType(var0);
  71.    }
  72.  
  73.    private void skipComment() throws IOException {
  74.       while(true) {
  75.          switch (this.field_1) {
  76.             case -1:
  77.                this.env.error(this.pos, "eof.in.comment");
  78.                return;
  79.             case 42:
  80.                if ((this.field_1 = this.field_0.read()) != 47) {
  81.                   break;
  82.                }
  83.  
  84.                this.field_1 = this.field_0.read();
  85.                return;
  86.             default:
  87.                this.field_1 = this.field_0.read();
  88.          }
  89.       }
  90.    }
  91.  
  92.    private String scanDocComment() throws IOException {
  93.       this.count = 0;
  94.       if (this.field_1 == 42) {
  95.          do {
  96.             this.field_1 = this.field_0.read();
  97.          } while(this.field_1 == 42);
  98.  
  99.          if (this.field_1 == 47) {
  100.             this.field_1 = this.field_0.read();
  101.             return "";
  102.          }
  103.       }
  104.  
  105.       switch (this.field_1) {
  106.          case 10:
  107.          case 32:
  108.             this.field_1 = this.field_0.read();
  109.          default:
  110.             boolean var1 = false;
  111.             int var2 = this.count;
  112.  
  113.             while(true) {
  114.                switch (this.field_1) {
  115.                   case -1:
  116.                      this.env.error(this.pos, "eof.in.comment");
  117.                      return this.bufferString();
  118.                   case 9:
  119.                   case 32:
  120.                      if (var1) {
  121.                         this.putc(this.field_1);
  122.                      }
  123.  
  124.                      this.field_1 = this.field_0.read();
  125.                      break;
  126.                   case 10:
  127.                      this.putc(10);
  128.                      this.field_1 = this.field_0.read();
  129.                      var1 = false;
  130.                      var2 = this.count;
  131.                      break;
  132.                   case 42:
  133.                      if (var1) {
  134.                         if ((this.field_1 = this.field_0.read()) == 47) {
  135.                            this.field_1 = this.field_0.read();
  136.                            this.count = var2;
  137.                            return this.bufferString();
  138.                         }
  139.  
  140.                         this.putc(42);
  141.                         break;
  142.                      } else {
  143.                         var1 = true;
  144.                         this.count = var2;
  145.  
  146.                         while((this.field_1 = this.field_0.read()) == 42) {
  147.                         }
  148.  
  149.                         switch (this.field_1) {
  150.                            case 47:
  151.                               this.field_1 = this.field_0.read();
  152.                               this.count = var2;
  153.                               return this.bufferString();
  154.                         }
  155.                      }
  156.                   default:
  157.                      if (!var1) {
  158.                         var1 = true;
  159.                      }
  160.  
  161.                      this.putc(this.field_1);
  162.                      this.field_1 = this.field_0.read();
  163.                      var2 = this.count;
  164.                }
  165.             }
  166.       }
  167.    }
  168.  
  169.    private void scanNumber() throws IOException {
  170.       boolean var1 = false;
  171.       boolean var2 = false;
  172.       this.radix = this.field_1 == 48 ? 8 : 10;
  173.       long var3 = (long)(this.field_1 - 48);
  174.       this.count = 0;
  175.       this.putc(this.field_1);
  176.  
  177.       label136:
  178.       while(true) {
  179.          switch (this.field_1 = this.field_0.read()) {
  180.             case 46:
  181.                if (this.radix != 16) {
  182.                   this.scanReal();
  183.                   return;
  184.                }
  185.                break label136;
  186.             case 48:
  187.             case 49:
  188.             case 50:
  189.             case 51:
  190.             case 52:
  191.             case 53:
  192.             case 54:
  193.             case 55:
  194.                break;
  195.             case 56:
  196.             case 57:
  197.                var1 = true;
  198.                break;
  199.             case 68:
  200.             case 69:
  201.             case 70:
  202.             case 100:
  203.             case 101:
  204.             case 102:
  205.                if (this.radix != 16) {
  206.                   this.scanReal();
  207.                   return;
  208.                }
  209.             case 65:
  210.             case 66:
  211.             case 67:
  212.             case 97:
  213.             case 98:
  214.             case 99:
  215.                this.putc(this.field_1);
  216.                if (this.radix != 16) {
  217.                   break label136;
  218.                }
  219.  
  220.                var2 = var2 || var3 >>> 60 != 0L;
  221.                var3 = (var3 << 4) + 10L + (long)Character.toLowerCase((char)this.field_1) - 97L;
  222.                continue;
  223.             case 76:
  224.             case 108:
  225.                this.field_1 = this.field_0.read();
  226.                this.longValue = var3;
  227.                this.token = 66;
  228.                break label136;
  229.             case 88:
  230.             case 120:
  231.                if (this.count != 1 || this.radix != 8) {
  232.                   break label136;
  233.                }
  234.  
  235.                this.radix = 16;
  236.                continue;
  237.             default:
  238.                this.intValue = (int)var3;
  239.                this.token = 65;
  240.                break label136;
  241.          }
  242.  
  243.          this.putc(this.field_1);
  244.          if (this.radix == 10) {
  245.             var2 = var2 || var3 * 10L / 10L != var3;
  246.             var3 = var3 * 10L + (long)(this.field_1 - 48);
  247.             var2 = var2 || var3 - 1L < -1L;
  248.          } else if (this.radix == 8) {
  249.             var2 = var2 || var3 >>> 61 != 0L;
  250.             var3 = (var3 << 3) + (long)(this.field_1 - 48);
  251.          } else {
  252.             var2 = var2 || var3 >>> 60 != 0L;
  253.             var3 = (var3 << 4) + (long)(this.field_1 - 48);
  254.          }
  255.       }
  256.  
  257.       if (!Character.isJavaLetterOrDigit((char)this.field_1) && this.field_1 != 46) {
  258.          if (this.radix == 8 && var1) {
  259.             this.intValue = 0;
  260.             this.token = 65;
  261.             this.env.error(this.field_0.pos, "invalid.octal.number");
  262.          } else {
  263.             if (!var2) {
  264.                label145: {
  265.                   if (this.token != 65) {
  266.                      return;
  267.                   }
  268.  
  269.                   boolean var10000;
  270.                   if (this.radix == 10) {
  271.                      if (this.intValue - 1 < -1) {
  272.                         break label145;
  273.                      }
  274.  
  275.                      var10000 = false;
  276.                   } else {
  277.                      if ((var3 & -4294967296L) != 0L) {
  278.                         break label145;
  279.                      }
  280.  
  281.                      var10000 = false;
  282.                   }
  283.  
  284.                   if (!var10000) {
  285.                      return;
  286.                   }
  287.                }
  288.             }
  289.  
  290.             this.intValue = 0;
  291.             this.longValue = 0L;
  292.             this.env.error(this.pos, "overflow");
  293.          }
  294.       } else {
  295.          this.env.error(this.field_0.pos, "invalid.number");
  296.  
  297.          do {
  298.             this.field_1 = this.field_0.read();
  299.          } while(Character.isJavaLetterOrDigit((char)this.field_1) || this.field_1 == 46);
  300.  
  301.          this.intValue = 0;
  302.          this.token = 65;
  303.       }
  304.    }
  305.  
  306.    private void scanReal() throws IOException {
  307.       boolean var1 = false;
  308.       boolean var2 = false;
  309.       if (this.field_1 == 46) {
  310.          this.putc(this.field_1);
  311.          this.field_1 = this.field_0.read();
  312.       }
  313.  
  314.       label91:
  315.       while(true) {
  316.          switch (this.field_1) {
  317.             case 43:
  318.             case 45:
  319.                char var3 = this.buffer[this.count - 1];
  320.                if (var3 != 'e' && var3 != 'E') {
  321.                   break label91;
  322.                }
  323.  
  324.                this.putc(this.field_1);
  325.                break;
  326.             case 48:
  327.             case 49:
  328.             case 50:
  329.             case 51:
  330.             case 52:
  331.             case 53:
  332.             case 54:
  333.             case 55:
  334.             case 56:
  335.             case 57:
  336.                this.putc(this.field_1);
  337.                break;
  338.             case 68:
  339.             case 100:
  340.                this.field_1 = this.field_0.read();
  341.                break label91;
  342.             case 69:
  343.             case 101:
  344.                if (var1) {
  345.                   break label91;
  346.                }
  347.  
  348.                this.putc(this.field_1);
  349.                var1 = true;
  350.                break;
  351.             case 70:
  352.             case 102:
  353.                this.field_1 = this.field_0.read();
  354.                var2 = true;
  355.             default:
  356.                break label91;
  357.          }
  358.  
  359.          this.field_1 = this.field_0.read();
  360.       }
  361.  
  362.       if (!Character.isJavaLetterOrDigit((char)this.field_1) && this.field_1 != 46) {
  363.          this.token = var2 ? 67 : 68;
  364.  
  365.          try {
  366.             char var6 = this.buffer[this.count - 1];
  367.             if (var6 != 'e' && var6 != 'E' && var6 != '+' && var6 != '-') {
  368.                if (var2) {
  369.                   String var7 = this.bufferString();
  370.                   this.floatValue = Float.valueOf(var7);
  371.                   if (Float.isInfinite(this.floatValue)) {
  372.                      this.env.error(this.pos, "overflow");
  373.                      return;
  374.                   }
  375.  
  376.                   if (this.floatValue == 0.0F && !looksLikeZero(var7)) {
  377.                      this.env.error(this.pos, "underflow");
  378.                      return;
  379.                   }
  380.                } else {
  381.                   String var4 = this.bufferString();
  382.                   this.doubleValue = Double.valueOf(var4);
  383.                   if (Double.isInfinite(this.doubleValue)) {
  384.                      this.env.error(this.pos, "overflow");
  385.                      return;
  386.                   }
  387.  
  388.                   if (this.doubleValue != (double)0.0F || looksLikeZero(var4)) {
  389.                      return;
  390.                   }
  391.  
  392.                   this.env.error(this.pos, "underflow");
  393.                }
  394.  
  395.             } else {
  396.                this.env.error(this.field_0.pos - 1, "float.format");
  397.             }
  398.          } catch (NumberFormatException var5) {
  399.             this.env.error(this.pos, "float.format");
  400.             this.doubleValue = (double)0.0F;
  401.             this.floatValue = 0.0F;
  402.          }
  403.       } else {
  404.          this.env.error(this.field_0.pos, "invalid.number");
  405.  
  406.          do {
  407.             this.field_1 = this.field_0.read();
  408.          } while(Character.isJavaLetterOrDigit((char)this.field_1) || this.field_1 == 46);
  409.  
  410.          this.doubleValue = (double)0.0F;
  411.          this.token = 68;
  412.       }
  413.    }
  414.  
  415.    private static boolean looksLikeZero(String var0) {
  416.       int var1 = var0.length();
  417.  
  418.       for(int var2 = 0; var2 < var1; ++var2) {
  419.          switch (var0.charAt(var2)) {
  420.             case '\u0000':
  421.             case '.':
  422.             default:
  423.             case '1':
  424.             case '2':
  425.             case '3':
  426.             case '4':
  427.             case '5':
  428.             case '6':
  429.             case '7':
  430.             case '8':
  431.             case '9':
  432.                return false;
  433.             case 'E':
  434.             case 'F':
  435.             case 'e':
  436.             case 'f':
  437.                return true;
  438.          }
  439.       }
  440.  
  441.       return true;
  442.    }
  443.  
  444.    private int scanEscapeChar() throws IOException {
  445.       int var1 = this.field_0.pos;
  446.       switch (this.field_1 = this.field_0.read()) {
  447.          case 34:
  448.             this.field_1 = this.field_0.read();
  449.             return 34;
  450.          case 39:
  451.             this.field_1 = this.field_0.read();
  452.             return 39;
  453.          case 48:
  454.          case 49:
  455.          case 50:
  456.          case 51:
  457.          case 52:
  458.          case 53:
  459.          case 54:
  460.          case 55:
  461.             int var2 = this.field_1 - 48;
  462.             int var3 = 2;
  463.  
  464.             while(var3 > 0) {
  465.                switch (this.field_1 = this.field_0.read()) {
  466.                   case 48:
  467.                   case 49:
  468.                   case 50:
  469.                   case 51:
  470.                   case 52:
  471.                   case 53:
  472.                   case 54:
  473.                   case 55:
  474.                      var2 = (var2 << 3) + this.field_1 - 48;
  475.                      --var3;
  476.                      break;
  477.                   default:
  478.                      if (var2 > 255) {
  479.                         this.env.error(var1, "invalid.escape.char");
  480.                      }
  481.  
  482.                      return var2;
  483.                }
  484.             }
  485.  
  486.             this.field_1 = this.field_0.read();
  487.             if (var2 > 255) {
  488.                this.env.error(var1, "invalid.escape.char");
  489.             }
  490.  
  491.             return var2;
  492.          case 92:
  493.             this.field_1 = this.field_0.read();
  494.             return 92;
  495.          case 98:
  496.             this.field_1 = this.field_0.read();
  497.             return 8;
  498.          case 102:
  499.             this.field_1 = this.field_0.read();
  500.             return 12;
  501.          case 110:
  502.             this.field_1 = this.field_0.read();
  503.             return 10;
  504.          case 114:
  505.             this.field_1 = this.field_0.read();
  506.             return 13;
  507.          case 116:
  508.             this.field_1 = this.field_0.read();
  509.             return 9;
  510.          default:
  511.             this.env.error(var1, "invalid.escape.char");
  512.             this.field_1 = this.field_0.read();
  513.             return -1;
  514.       }
  515.    }
  516.  
  517.    private void scanString() throws IOException {
  518.       this.token = 69;
  519.       this.count = 0;
  520.       this.field_1 = this.field_0.read();
  521.  
  522.       while(true) {
  523.          switch (this.field_1) {
  524.             case -1:
  525.                this.env.error(this.pos, "eof.in.string");
  526.                this.stringValue = this.bufferString();
  527.                return;
  528.             case 10:
  529.                this.field_1 = this.field_0.read();
  530.                this.env.error(this.pos, "newline.in.string");
  531.                this.stringValue = this.bufferString();
  532.                return;
  533.             case 34:
  534.                this.field_1 = this.field_0.read();
  535.                this.stringValue = this.bufferString();
  536.                return;
  537.             case 92:
  538.                int var1 = this.scanEscapeChar();
  539.                if (var1 >= 0) {
  540.                   this.putc((char)var1);
  541.                }
  542.                break;
  543.             default:
  544.                this.putc(this.field_1);
  545.                this.field_1 = this.field_0.read();
  546.          }
  547.       }
  548.    }
  549.  
  550.    private void scanCharacter() throws IOException {
  551.       this.token = 63;
  552.       switch (this.field_1 = this.field_0.read()) {
  553.          case 10:
  554.             this.charValue = 0;
  555.             this.env.error(this.pos, "invalid.char.constant");
  556.             return;
  557.          case 92:
  558.             int var1 = this.scanEscapeChar();
  559.             this.charValue = (char)(var1 >= 0 ? var1 : 0);
  560.             break;
  561.          default:
  562.             this.charValue = (char)this.field_1;
  563.             this.field_1 = this.field_0.read();
  564.       }
  565.  
  566.       if (this.field_1 == 39) {
  567.          this.field_1 = this.field_0.read();
  568.       } else {
  569.          this.env.error(this.pos, "invalid.char.constant");
  570.  
  571.          while(true) {
  572.             switch (this.field_1) {
  573.                case -1:
  574.                case 10:
  575.                case 59:
  576.                   return;
  577.                case 39:
  578.                   this.field_1 = this.field_0.read();
  579.                   return;
  580.                default:
  581.                   this.field_1 = this.field_0.read();
  582.             }
  583.          }
  584.       }
  585.    }
  586.  
  587.    private void scanIdentifier() throws IOException {
  588.       this.count = 0;
  589.  
  590.       while(true) {
  591.          this.putc(this.field_1);
  592.          switch (this.field_1 = this.field_0.read()) {
  593.             case 36:
  594.             case 48:
  595.             case 49:
  596.             case 50:
  597.             case 51:
  598.             case 52:
  599.             case 53:
  600.             case 54:
  601.             case 55:
  602.             case 56:
  603.             case 57:
  604.             case 65:
  605.             case 66:
  606.             case 67:
  607.             case 68:
  608.             case 69:
  609.             case 70:
  610.             case 71:
  611.             case 72:
  612.             case 73:
  613.             case 74:
  614.             case 75:
  615.             case 76:
  616.             case 77:
  617.             case 78:
  618.             case 79:
  619.             case 80:
  620.             case 81:
  621.             case 82:
  622.             case 83:
  623.             case 84:
  624.             case 85:
  625.             case 86:
  626.             case 87:
  627.             case 88:
  628.             case 89:
  629.             case 90:
  630.             case 95:
  631.             case 97:
  632.             case 98:
  633.             case 99:
  634.             case 100:
  635.             case 101:
  636.             case 102:
  637.             case 103:
  638.             case 104:
  639.             case 105:
  640.             case 106:
  641.             case 107:
  642.             case 108:
  643.             case 109:
  644.             case 110:
  645.             case 111:
  646.             case 112:
  647.             case 113:
  648.             case 114:
  649.             case 115:
  650.             case 116:
  651.             case 117:
  652.             case 118:
  653.             case 119:
  654.             case 120:
  655.             case 121:
  656.             case 122:
  657.                continue;
  658.          }
  659.  
  660.          if (!Character.isJavaLetterOrDigit((char)this.field_1)) {
  661.             this.idValue = Identifier.lookup(this.bufferString());
  662.             this.token = this.idValue.getType();
  663.             return;
  664.          }
  665.       }
  666.    }
  667.  
  668.    public int getEndPos() {
  669.       return this.field_0.pos;
  670.    }
  671.  
  672.    public IdentifierToken getIdToken() {
  673.       return this.token != 60 ? null : new IdentifierToken(this.pos, this.idValue);
  674.    }
  675.  
  676.    public int scan() throws IOException {
  677.       int var1 = this.xscan();
  678.       return var1;
  679.    }
  680.  
  681.    protected int xscan() throws IOException {
  682.       int var1 = this.pos;
  683.       this.prevPos = this.field_0.pos;
  684.       this.docComment = null;
  685.  
  686.       while(true) {
  687.          this.pos = this.field_0.pos;
  688.          switch (this.field_1) {
  689.             case -1:
  690.                this.token = -1;
  691.                return var1;
  692.             case 10:
  693.                if (this.scanComments) {
  694.                   this.field_1 = 32;
  695.                   this.token = 146;
  696.                   return var1;
  697.                }
  698.             case 9:
  699.             case 12:
  700.             case 32:
  701.                this.field_1 = this.field_0.read();
  702.                break;
  703.             case 26:
  704.                if ((this.field_1 = this.field_0.read()) == -1) {
  705.                   this.token = -1;
  706.                   return var1;
  707.                }
  708.  
  709.                this.env.error(this.pos, "funny.char");
  710.                this.field_1 = this.field_0.read();
  711.                break;
  712.             case 33:
  713.                if ((this.field_1 = this.field_0.read()) == 61) {
  714.                   this.field_1 = this.field_0.read();
  715.                   this.token = 19;
  716.                   return var1;
  717.                }
  718.  
  719.                this.token = 37;
  720.                return var1;
  721.             case 34:
  722.                this.scanString();
  723.                return var1;
  724.             case 36:
  725.             case 65:
  726.             case 66:
  727.             case 67:
  728.             case 68:
  729.             case 69:
  730.             case 70:
  731.             case 71:
  732.             case 72:
  733.             case 73:
  734.             case 74:
  735.             case 75:
  736.             case 76:
  737.             case 77:
  738.             case 78:
  739.             case 79:
  740.             case 80:
  741.             case 81:
  742.             case 82:
  743.             case 83:
  744.             case 84:
  745.             case 85:
  746.             case 86:
  747.             case 87:
  748.             case 88:
  749.             case 89:
  750.             case 90:
  751.             case 95:
  752.             case 97:
  753.             case 98:
  754.             case 99:
  755.             case 100:
  756.             case 101:
  757.             case 102:
  758.             case 103:
  759.             case 104:
  760.             case 105:
  761.             case 106:
  762.             case 107:
  763.             case 108:
  764.             case 109:
  765.             case 110:
  766.             case 111:
  767.             case 112:
  768.             case 113:
  769.             case 114:
  770.             case 115:
  771.             case 116:
  772.             case 117:
  773.             case 118:
  774.             case 119:
  775.             case 120:
  776.             case 121:
  777.             case 122:
  778.                this.scanIdentifier();
  779.                return var1;
  780.             case 37:
  781.                if ((this.field_1 = this.field_0.read()) == 61) {
  782.                   this.field_1 = this.field_0.read();
  783.                   this.token = 4;
  784.                   return var1;
  785.                }
  786.  
  787.                this.token = 32;
  788.                return var1;
  789.             case 38:
  790.                switch (this.field_1 = this.field_0.read()) {
  791.                   case 38:
  792.                      this.field_1 = this.field_0.read();
  793.                      this.token = 15;
  794.                      return var1;
  795.                   case 61:
  796.                      this.field_1 = this.field_0.read();
  797.                      this.token = 10;
  798.                      return var1;
  799.                   default:
  800.                      this.token = 18;
  801.                      return var1;
  802.                }
  803.             case 39:
  804.                this.scanCharacter();
  805.                return var1;
  806.             case 40:
  807.                this.field_1 = this.field_0.read();
  808.                this.token = 140;
  809.                return var1;
  810.             case 41:
  811.                this.field_1 = this.field_0.read();
  812.                this.token = 141;
  813.                return var1;
  814.             case 42:
  815.                if ((this.field_1 = this.field_0.read()) == 61) {
  816.                   this.field_1 = this.field_0.read();
  817.                   this.token = 2;
  818.                   return var1;
  819.                }
  820.  
  821.                this.token = 33;
  822.                return var1;
  823.             case 43:
  824.                switch (this.field_1 = this.field_0.read()) {
  825.                   case 43:
  826.                      this.field_1 = this.field_0.read();
  827.                      this.token = 50;
  828.                      return var1;
  829.                   case 61:
  830.                      this.field_1 = this.field_0.read();
  831.                      this.token = 5;
  832.                      return var1;
  833.                   default:
  834.                      this.token = 29;
  835.                      return var1;
  836.                }
  837.             case 44:
  838.                this.field_1 = this.field_0.read();
  839.                this.token = 0;
  840.                return var1;
  841.             case 45:
  842.                switch (this.field_1 = this.field_0.read()) {
  843.                   case 45:
  844.                      this.field_1 = this.field_0.read();
  845.                      this.token = 51;
  846.                      return var1;
  847.                   case 61:
  848.                      this.field_1 = this.field_0.read();
  849.                      this.token = 6;
  850.                      return var1;
  851.                   default:
  852.                      this.token = 30;
  853.                      return var1;
  854.                }
  855.             case 46:
  856.                switch (this.field_1 = this.field_0.read()) {
  857.                   case 48:
  858.                   case 49:
  859.                   case 50:
  860.                   case 51:
  861.                   case 52:
  862.                   case 53:
  863.                   case 54:
  864.                   case 55:
  865.                   case 56:
  866.                   case 57:
  867.                      this.count = 0;
  868.                      this.putc(46);
  869.                      this.scanReal();
  870.                      break;
  871.                   default:
  872.                      this.token = 46;
  873.                }
  874.  
  875.                return var1;
  876.             case 47:
  877.                switch (this.field_1 = this.field_0.read()) {
  878.                   case 42:
  879.                      this.field_1 = this.field_0.read();
  880.                      if (this.field_1 == 42) {
  881.                         this.docComment = this.scanDocComment();
  882.                      } else {
  883.                         this.skipComment();
  884.                      }
  885.  
  886.                      if (this.scanComments) {
  887.                         return var1;
  888.                      }
  889.                      continue;
  890.                   case 47:
  891.                      while((this.field_1 = this.field_0.read()) != -1 && this.field_1 != 10) {
  892.                      }
  893.  
  894.                      if (this.scanComments) {
  895.                         this.token = 146;
  896.                         return var1;
  897.                      }
  898.                      continue;
  899.                   case 61:
  900.                      this.field_1 = this.field_0.read();
  901.                      this.token = 3;
  902.                      return var1;
  903.                   default:
  904.                      this.token = 31;
  905.                      return var1;
  906.                }
  907.             case 48:
  908.             case 49:
  909.             case 50:
  910.             case 51:
  911.             case 52:
  912.             case 53:
  913.             case 54:
  914.             case 55:
  915.             case 56:
  916.             case 57:
  917.                this.scanNumber();
  918.                return var1;
  919.             case 58:
  920.                this.field_1 = this.field_0.read();
  921.                this.token = 136;
  922.                return var1;
  923.             case 59:
  924.                this.field_1 = this.field_0.read();
  925.                this.token = 135;
  926.                return var1;
  927.             case 60:
  928.                switch (this.field_1 = this.field_0.read()) {
  929.                   case 60:
  930.                      if ((this.field_1 = this.field_0.read()) == 61) {
  931.                         this.field_1 = this.field_0.read();
  932.                         this.token = 7;
  933.                         return var1;
  934.                      }
  935.  
  936.                      this.token = 26;
  937.                      return var1;
  938.                   case 61:
  939.                      this.field_1 = this.field_0.read();
  940.                      this.token = 23;
  941.                      return var1;
  942.                   default:
  943.                      this.token = 24;
  944.                      return var1;
  945.                }
  946.             case 61:
  947.                if ((this.field_1 = this.field_0.read()) == 61) {
  948.                   this.field_1 = this.field_0.read();
  949.                   this.token = 20;
  950.                   return var1;
  951.                }
  952.  
  953.                this.token = 1;
  954.                return var1;
  955.             case 62:
  956.                switch (this.field_1 = this.field_0.read()) {
  957.                   case 61:
  958.                      this.field_1 = this.field_0.read();
  959.                      this.token = 21;
  960.                      return var1;
  961.                   case 62:
  962.                      switch (this.field_1 = this.field_0.read()) {
  963.                         case 61:
  964.                            this.field_1 = this.field_0.read();
  965.                            this.token = 8;
  966.                            return var1;
  967.                         case 62:
  968.                            if ((this.field_1 = this.field_0.read()) == 61) {
  969.                               this.field_1 = this.field_0.read();
  970.                               this.token = 9;
  971.                               return var1;
  972.                            }
  973.  
  974.                            this.token = 28;
  975.                            return var1;
  976.                         default:
  977.                            this.token = 27;
  978.                            return var1;
  979.                      }
  980.                   default:
  981.                      this.token = 22;
  982.                      return var1;
  983.                }
  984.             case 63:
  985.                this.field_1 = this.field_0.read();
  986.                this.token = 137;
  987.                return var1;
  988.             case 91:
  989.                this.field_1 = this.field_0.read();
  990.                this.token = 142;
  991.                return var1;
  992.             case 93:
  993.                this.field_1 = this.field_0.read();
  994.                this.token = 143;
  995.                return var1;
  996.             case 94:
  997.                if ((this.field_1 = this.field_0.read()) == 61) {
  998.                   this.field_1 = this.field_0.read();
  999.                   this.token = 12;
  1000.                   return var1;
  1001.                }
  1002.  
  1003.                this.token = 17;
  1004.                return var1;
  1005.             case 123:
  1006.                this.field_1 = this.field_0.read();
  1007.                this.token = 138;
  1008.                return var1;
  1009.             case 124:
  1010.                switch (this.field_1 = this.field_0.read()) {
  1011.                   case 61:
  1012.                      this.field_1 = this.field_0.read();
  1013.                      this.token = 11;
  1014.                      return var1;
  1015.                   case 124:
  1016.                      this.field_1 = this.field_0.read();
  1017.                      this.token = 14;
  1018.                      return var1;
  1019.                   default:
  1020.                      this.token = 16;
  1021.                      return var1;
  1022.                }
  1023.             case 125:
  1024.                this.field_1 = this.field_0.read();
  1025.                this.token = 139;
  1026.                return var1;
  1027.             case 126:
  1028.                this.field_1 = this.field_0.read();
  1029.                this.token = 38;
  1030.                return var1;
  1031.             default:
  1032.                if (Character.isJavaLetter((char)this.field_1)) {
  1033.                   this.scanIdentifier();
  1034.                   return var1;
  1035.                }
  1036.  
  1037.                this.env.error(this.pos, "funny.char");
  1038.                this.field_1 = this.field_0.read();
  1039.          }
  1040.       }
  1041.    }
  1042.  
  1043.    public void match(int var1, int var2) throws IOException {
  1044.       int var3 = 1;
  1045.  
  1046.       while(true) {
  1047.          this.scan();
  1048.          if (this.token == var1) {
  1049.             ++var3;
  1050.          } else if (this.token == var2) {
  1051.             --var3;
  1052.             if (var3 == 0) {
  1053.                return;
  1054.             }
  1055.          } else if (this.token == -1) {
  1056.             this.env.error(this.pos, "unbalanced.paren");
  1057.             return;
  1058.          }
  1059.       }
  1060.    }
  1061.  
  1062.    static {
  1063.       defineKeyword(92);
  1064.       defineKeyword(90);
  1065.       defineKeyword(91);
  1066.       defineKeyword(93);
  1067.       defineKeyword(94);
  1068.       defineKeyword(95);
  1069.       defineKeyword(96);
  1070.       defineKeyword(97);
  1071.       defineKeyword(98);
  1072.       defineKeyword(99);
  1073.       defineKeyword(100);
  1074.       defineKeyword(101);
  1075.       defineKeyword(102);
  1076.       defineKeyword(103);
  1077.       defineKeyword(104);
  1078.       defineKeyword(70);
  1079.       defineKeyword(71);
  1080.       defineKeyword(72);
  1081.       defineKeyword(73);
  1082.       defineKeyword(74);
  1083.       defineKeyword(75);
  1084.       defineKeyword(76);
  1085.       defineKeyword(77);
  1086.       defineKeyword(78);
  1087.       defineKeyword(25);
  1088.       defineKeyword(80);
  1089.       defineKeyword(81);
  1090.       defineKeyword(49);
  1091.       defineKeyword(82);
  1092.       defineKeyword(83);
  1093.       defineKeyword(84);
  1094.       defineKeyword(110);
  1095.       defineKeyword(111);
  1096.       defineKeyword(112);
  1097.       defineKeyword(113);
  1098.       defineKeyword(114);
  1099.       defineKeyword(115);
  1100.       defineKeyword(144);
  1101.       defineKeyword(120);
  1102.       defineKeyword(121);
  1103.       defineKeyword(122);
  1104.       defineKeyword(124);
  1105.       defineKeyword(125);
  1106.       defineKeyword(126);
  1107.       defineKeyword(127);
  1108.       defineKeyword(130);
  1109.       defineKeyword(129);
  1110.       defineKeyword(128);
  1111.       defineKeyword(123);
  1112.       defineKeyword(58);
  1113.    }
  1114. }
  1115.