Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Lexer.java

00001 package edu.ksu.cis.bandera.birp.lexer;
00002 
00003 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00004  * Bandera, a Java(TM) analysis and transformation toolkit           *
00005  * Copyright (C) 1998-2001 SAnToS Laboratories (santos@cis.ksu.edu)  *
00006 
00007  * All rights reserved.                                              *
00008  *                                                                   *
00009  * This work was done as a project in the SAnToS Laboratory,         *
00010  * Department of Computing and Information Sciences, Kansas State    *
00011  * University, USA (http://www.cis.ksu.edu/santos).                  *
00012  * It is understood that any modification not identified as such is  *
00013  * not covered by the preceding statement.                           *
00014  *                                                                   *
00015  * This work is free software; you can redistribute it and/or        *
00016  * modify it under the terms of the GNU Library General Public       *
00017  * License as published by the Free Software Foundation; either      *
00018  * version 2 of the License, or (at your option) any later version.  *
00019  *                                                                   *
00020  * This work is distributed in the hope that it will be useful,      *
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of    *
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *
00023  * Library General Public License for more details.                  *
00024  *                                                                   *
00025  * You should have received a copy of the GNU Library General Public *
00026  * License along with this toolkit; if not, write to the             *
00027  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,      *
00028  * Boston, MA  02111-1307, USA.                                      *
00029  *                                                                   *
00030  * Java is a trademark of Sun Microsystems, Inc.                     *
00031  *                                                                   *
00032  * To submit a bug report, send a comment, or get the latest news on *
00033  * this project and other SAnToS projects, please visit the web-site *
00034  *                http://www.cis.ksu.edu/santos                      *
00035  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00036 import java.io.*;
00037 import ca.mcgill.sable.util.*;
00038 import edu.ksu.cis.bandera.birp.node.*;
00039 
00040 public class Lexer
00041 {
00042     protected Token token;
00043     protected State state = State.INITIAL;
00044 
00045     private PushbackReader in;
00046     private int line;
00047     private int pos;
00048     private boolean cr;
00049     private boolean eof;
00050     private final StringBuffer text = new StringBuffer();
00051 
00052     private static int[][][] gotoTable;
00053 /*  {
00054         {{10, 10, 1}, {13, 13, 2}, {32, 32, 3}, {33, 33, 4}, {34, 34, 5}, {37, 37, 6}, {38, 38, 7}, {40, 40, 8}, {41, 41, 9}, {42, 42, 10}, {43, 43, 11}, {44, 44, 12}, {45, 45, 13}, {46, 46, 14}, {47, 47, 15}, {48, 57, 16}, {58, 58, 17}, {59, 59, 18}, {60, 60, 19}, {61, 61, 20}, {62, 62, 21}, {64, 64, 22}, {65, 90, 23}, {91, 91, 24}, {93, 93, 25}, {95, 95, 23}, {97, 97, 26}, {98, 98, 27}, {99, 99, 28}, {100, 100, 29}, {101, 101, 30}, {102, 102, 31}, {103, 103, 32}, {104, 104, 33}, {105, 105, 34}, {106, 106, 35}, {107, 107, 23}, {108, 108, 36}, {109, 109, 37}, {110, 110, 38}, {111, 111, 39}, {112, 112, 40}, {113, 113, 23}, {114, 114, 41}, {115, 115, 42}, {116, 116, 43}, {117, 117, 44}, {118, 118, 23}, {119, 119, 45}, {120, 122, 23}, {123, 123, 46}, {124, 124, 47}, {125, 125, 48}, },
00055         {{10, 32, -2}, },
00056         {{10, 32, -2}, },
00057         {{10, 32, -2}, },
00058         {{61, 61, 49}, },
00059         {{0, 33, 50}, {34, 34, 51}, {35, 91, 50}, {92, 92, 52}, {93, 65535, 50}, },
00060         {},
00061         {{38, 38, 53}, },
00062         {},
00063         {},
00064         {},
00065         {},
00066         {},
00067         {{45, 45, 54}, {48, 57, 16}, },
00068         {{46, 46, 55}, },
00069         {},
00070         {{48, 57, 16}, },
00071         {{61, 61, 56}, },
00072         {},
00073         {{61, 61, 57}, },
00074         {{61, 61, 58}, },
00075         {{61, 61, 59}, },
00076         {},
00077         {{48, 57, 60}, {65, 90, 61}, {95, 95, 61}, {97, 122, 61}, },
00078         {},
00079         {},
00080         {{48, 95, -25}, {97, 113, 61}, {114, 114, 62}, {115, 115, 63}, {116, 122, 61}, },
00081         {{48, 95, -25}, {97, 110, 61}, {111, 111, 64}, {112, 122, 61}, },
00082         {{48, 95, -25}, {97, 103, 61}, {104, 104, 65}, {105, 110, 61}, {111, 111, 66}, {112, 122, 61}, },
00083         {{48, 110, -29}, {111, 111, 67}, {112, 122, 61}, },
00084         {{48, 95, -25}, {97, 109, 61}, {110, 110, 68}, {111, 119, 61}, {120, 120, 69}, {121, 122, 61}, },
00085         {{48, 95, -25}, {97, 97, 70}, {98, 122, 61}, },
00086         {{48, 110, -29}, {111, 111, 71}, {112, 122, 61}, },
00087         {{48, 95, -25}, {97, 97, 72}, {98, 122, 61}, },
00088         {{48, 109, -32}, {110, 110, 73}, {111, 122, 61}, },
00089         {{48, 110, -29}, {111, 111, 74}, {112, 122, 61}, },
00090         {{48, 95, -25}, {97, 100, 61}, {101, 101, 75}, {102, 104, 61}, {105, 105, 76}, {106, 110, 61}, {111, 111, 77}, {112, 122, 61}, },
00091         {{48, 95, -25}, {97, 97, 78}, {98, 122, 61}, },
00092         {{48, 100, -38}, {101, 101, 79}, {102, 110, 61}, {111, 111, 80}, {112, 116, 61}, {117, 117, 81}, {118, 122, 61}, },
00093         {{48, 95, -25}, {97, 101, 61}, {102, 102, 82}, {103, 122, 61}, },
00094         {{48, 113, -28}, {114, 114, 83}, {115, 122, 61}, },
00095         {{48, 95, -25}, {97, 97, 84}, {98, 100, 61}, {101, 101, 85}, {102, 122, 61}, },
00096         {{48, 95, -25}, {97, 115, 61}, {116, 116, 86}, {117, 122, 61}, },
00097         {{48, 103, -30}, {104, 104, 87}, {105, 113, 61}, {114, 114, 88}, {115, 122, 61}, },
00098         {{48, 109, -32}, {110, 110, 89}, {111, 122, 61}, },
00099         {{48, 95, -25}, {97, 97, 90}, {98, 103, 61}, {104, 104, 91}, {105, 122, 61}, },
00100         {},
00101         {{124, 124, 92}, },
00102         {},
00103         {},
00104         {{0, 65535, -7}, },
00105         {},
00106         {{0, 33, 50}, {34, 34, 93}, {35, 65535, -7}, },
00107         {},
00108         {{0, 9, 94}, {11, 12, 94}, {14, 65535, 94}, },
00109         {},
00110         {},
00111         {},
00112         {},
00113         {},
00114         {{48, 122, -25}, },
00115         {{48, 122, -25}, },
00116         {{48, 113, -28}, {114, 114, 95}, {115, 122, 61}, },
00117         {{48, 95, -25}, {97, 114, 61}, {115, 115, 96}, {116, 122, 61}, },
00118         {{48, 110, -29}, {111, 111, 97}, {112, 122, 61}, },
00119         {{48, 110, -29}, {111, 111, 98}, {112, 122, 61}, },
00120         {{48, 95, -25}, {97, 107, 61}, {108, 108, 99}, {109, 122, 61}, },
00121         {{48, 122, -25}, },
00122         {{48, 95, -25}, {97, 99, 61}, {100, 100, 100}, {101, 116, 61}, {117, 117, 101}, {118, 122, 61}, },
00123         {{48, 95, -25}, {97, 104, 61}, {105, 105, 102}, {106, 122, 61}, },
00124         {{48, 107, -68}, {108, 108, 103}, {109, 122, 61}, },
00125         {{48, 115, -44}, {116, 116, 104}, {117, 122, 61}, },
00126         {{48, 114, -65}, {115, 115, 105}, {116, 122, 61}, },
00127         {{48, 114, -65}, {115, 115, 106}, {116, 117, 61}, {118, 118, 107}, {119, 122, 61}, },
00128         {{48, 104, -71}, {105, 105, 108}, {106, 122, 61}, },
00129         {{48, 109, -32}, {110, 110, 109}, {111, 122, 61}, },
00130         {{48, 95, -25}, {97, 117, 61}, {118, 118, 110}, {119, 122, 61}, },
00131         {{48, 95, -25}, {97, 98, 61}, {99, 99, 111}, {100, 122, 61}, },
00132         {{48, 104, -71}, {105, 105, 112}, {106, 122, 61}, },
00133         {{48, 95, -25}, {97, 118, 61}, {119, 119, 113}, {120, 122, 61}, },
00134         {{48, 115, -44}, {116, 116, 114}, {117, 122, 61}, },
00135         {{48, 107, -68}, {108, 108, 115}, {109, 122, 61}, },
00136         {{48, 122, -25}, },
00137         {{48, 100, -38}, {101, 101, 116}, {102, 104, 61}, {105, 105, 117}, {106, 110, 61}, {111, 111, 118}, {112, 122, 61}, },
00138         {{48, 109, -32}, {110, 110, 119}, {111, 122, 61}, },
00139         {{48, 98, -79}, {99, 99, 120}, {100, 100, 61}, {101, 101, 121}, {102, 102, 122}, {103, 122, 61}, },
00140         {{48, 95, -25}, {97, 97, 123}, {98, 122, 61}, },
00141         {{48, 113, -28}, {114, 114, 124}, {115, 122, 61}, },
00142         {{48, 95, -25}, {97, 116, 61}, {117, 117, 125}, {118, 122, 61}, },
00143         {{48, 107, -68}, {108, 108, 126}, {109, 118, 61}, {119, 119, 127}, {120, 122, 61}, },
00144         {{48, 104, -71}, {105, 105, 128}, {106, 114, 61}, {115, 115, 129}, {116, 122, 61}, },
00145         {{48, 100, -38}, {101, 101, 130}, {102, 122, 61}, },
00146         {},
00147         {{0, 65535, -7}, },
00148         {{0, 65535, -56}, },
00149         {{48, 95, -25}, {97, 97, 131}, {98, 122, 61}, },
00150         {{48, 100, -38}, {101, 101, 132}, {102, 122, 61}, },
00151         {{48, 107, -68}, {108, 108, 133}, {109, 122, 61}, },
00152         {{48, 110, -29}, {111, 111, 134}, {112, 122, 61}, },
00153         {{48, 107, -68}, {108, 108, 135}, {109, 122, 61}, },
00154         {{48, 122, -25}, },
00155         {{48, 95, -25}, {97, 108, 61}, {109, 109, 136}, {110, 122, 61}, },
00156         {{48, 115, -44}, {116, 116, 137}, {117, 122, 61}, },
00157         {{48, 114, -65}, {115, 115, 138}, {116, 122, 61}, },
00158         {{48, 110, -29}, {111, 111, 139}, {112, 122, 61}, },
00159         {{48, 57, 60}, {65, 75, 61}, {76, 76, 140}, {77, 90, 61}, {95, 122, -25}, },
00160         {{48, 115, -44}, {116, 116, 141}, {117, 122, 61}, },
00161         {{48, 104, -71}, {105, 105, 142}, {106, 122, 61}, },
00162         {{48, 109, -32}, {110, 110, 143}, {111, 122, 61}, },
00163         {{48, 95, -25}, {97, 102, 61}, {103, 103, 144}, {104, 122, 61}, },
00164         {{48, 100, -38}, {101, 101, 145}, {102, 122, 61}, },
00165         {{48, 95, -25}, {97, 106, 61}, {107, 107, 146}, {108, 122, 61}, },
00166         {{48, 109, -32}, {110, 110, 147}, {111, 122, 61}, },
00167         {{48, 122, -25}, },
00168         {{48, 104, -71}, {105, 105, 148}, {106, 122, 61}, },
00169         {{48, 107, -68}, {108, 108, 149}, {109, 122, 61}, },
00170         {{48, 99, -70}, {100, 100, 150}, {101, 122, 61}, },
00171         {{48, 109, -32}, {110, 110, 151}, {111, 122, 61}, },
00172         {{48, 98, -79}, {99, 99, 152}, {100, 122, 61}, },
00173         {{48, 102, -111}, {103, 103, 153}, {104, 122, 61}, },
00174         {{48, 110, -29}, {111, 111, 154}, {112, 122, 61}, },
00175         {{48, 109, -32}, {110, 110, 155}, {111, 122, 61}, },
00176         {{48, 122, -25}, },
00177         {{48, 113, -28}, {114, 114, 156}, {115, 122, 61}, },
00178         {{48, 100, -38}, {101, 101, 157}, {102, 122, 61}, },
00179         {{48, 100, -38}, {101, 101, 158}, {102, 122, 61}, },
00180         {{48, 110, -29}, {111, 111, 159}, {112, 122, 61}, },
00181         {{48, 95, -25}, {97, 97, 160}, {98, 122, 61}, },
00182         {{48, 115, -44}, {116, 116, 161}, {117, 122, 61}, },
00183         {{48, 57, 60}, {65, 77, 61}, {78, 78, 162}, {79, 90, 61}, {95, 122, -25}, },
00184         {{48, 109, -32}, {110, 110, 163}, {111, 122, 61}, },
00185         {{48, 95, -25}, {97, 120, 61}, {121, 121, 164}, {122, 122, 61}, },
00186         {{48, 113, -28}, {114, 114, 165}, {115, 122, 61}, },
00187         {{48, 100, -38}, {101, 101, 166}, {102, 122, 61}, },
00188         {{48, 114, -65}, {115, 115, 167}, {116, 122, 61}, },
00189         {{48, 100, -38}, {101, 101, 168}, {102, 122, 61}, },
00190         {{48, 122, -25}, },
00191         {{48, 122, -25}, },
00192         {{48, 100, -38}, {101, 101, 169}, {102, 122, 61}, },
00193         {{48, 122, -25}, },
00194         {{48, 110, -29}, {111, 111, 170}, {112, 122, 61}, },
00195         {{48, 95, -25}, {97, 97, 171}, {98, 122, 61}, },
00196         {{48, 114, -65}, {115, 115, 172}, {116, 122, 61}, },
00197         {{48, 122, -25}, },
00198         {{48, 115, -44}, {116, 116, 173}, {117, 122, 61}, },
00199         {{48, 122, -25}, },
00200         {{48, 57, 60}, {65, 65, 174}, {66, 90, 61}, {95, 122, -25}, },
00201         {{48, 122, -25}, },
00202         {{48, 101, -41}, {102, 102, 175}, {103, 122, 61}, },
00203         {{48, 122, -25}, },
00204         {{48, 104, -71}, {105, 105, 176}, {106, 122, 61}, },
00205         {{48, 115, -44}, {116, 116, 177}, {117, 122, 61}, },
00206         {{48, 100, -38}, {101, 101, 178}, {102, 122, 61}, },
00207         {{48, 100, -38}, {101, 101, 179}, {102, 122, 61}, },
00208         {{48, 113, -28}, {114, 114, 180}, {115, 122, 61}, },
00209         {{48, 115, -44}, {116, 116, 181}, {117, 122, 61}, },
00210         {{48, 115, -44}, {116, 116, 182}, {117, 122, 61}, },
00211         {{48, 95, -25}, {97, 97, 183}, {98, 122, 61}, },
00212         {{48, 122, -25}, },
00213         {{48, 98, -79}, {99, 99, 184}, {100, 122, 61}, },
00214         {{48, 104, -71}, {105, 105, 185}, {106, 122, 61}, },
00215         {{48, 122, -25}, },
00216         {{48, 110, -29}, {111, 111, 186}, {112, 122, 61}, },
00217         {{48, 122, -25}, },
00218         {{48, 122, -25}, },
00219         {{48, 115, -44}, {116, 116, 187}, {117, 122, 61}, },
00220         {{48, 95, -25}, {97, 97, 188}, {98, 122, 61}, },
00221         {{48, 100, -38}, {101, 101, 189}, {102, 122, 61}, },
00222         {{48, 98, -79}, {99, 99, 190}, {100, 122, 61}, },
00223         {{48, 122, -25}, },
00224         {{48, 98, -79}, {99, 99, 191}, {100, 122, 61}, },
00225         {{48, 109, -32}, {110, 110, 192}, {111, 122, 61}, },
00226         {{48, 104, -71}, {105, 105, 193}, {106, 122, 61}, },
00227         {{48, 103, -30}, {104, 104, 194}, {105, 122, 61}, },
00228         {{48, 117, -78}, {118, 118, 195}, {119, 122, 61}, },
00229         {{48, 120, -133}, {121, 121, 196}, {122, 122, 61}, },
00230         {{48, 98, -79}, {99, 99, 197}, {100, 122, 61}, },
00231         {{48, 107, -68}, {108, 108, 198}, {109, 122, 61}, },
00232         {{48, 114, -65}, {115, 115, 199}, {116, 122, 61}, },
00233         {{48, 122, -25}, },
00234         {{48, 99, -70}, {100, 100, 200}, {101, 122, 61}, },
00235         {{48, 113, -28}, {114, 114, 201}, {115, 122, 61}, },
00236         {{48, 122, -25}, },
00237         {{48, 99, -70}, {100, 100, 202}, {101, 122, 61}, },
00238         {{48, 106, -113}, {107, 107, 203}, {108, 122, 61}, },
00239         {{48, 115, -44}, {116, 116, 204}, {117, 122, 61}, },
00240         {{48, 115, -44}, {116, 116, 205}, {117, 122, 61}, },
00241         {{48, 122, -25}, },
00242         {{48, 109, -32}, {110, 110, 206}, {111, 122, 61}, },
00243         {{48, 122, -25}, },
00244         {{48, 115, -44}, {116, 116, 207}, {117, 122, 61}, },
00245         {{48, 106, -113}, {107, 107, 208}, {108, 122, 61}, },
00246         {{48, 98, -79}, {99, 99, 209}, {100, 122, 61}, },
00247         {{48, 95, -25}, {97, 97, 61}, {98, 98, 210}, {99, 122, 61}, },
00248         {{48, 122, -25}, },
00249         {{48, 95, -25}, {97, 97, 211}, {98, 122, 61}, },
00250         {{48, 57, 60}, {65, 65, 212}, {66, 122, -148}, },
00251         {{48, 95, -25}, {97, 97, 213}, {98, 122, 61}, },
00252         {{48, 109, -32}, {110, 110, 214}, {111, 122, 61}, },
00253         {{48, 114, -65}, {115, 115, 215}, {116, 122, 61}, },
00254         {{48, 122, -25}, },
00255         {{48, 95, -25}, {97, 97, 216}, {98, 122, 61}, },
00256         {{48, 57, 60}, {65, 83, 61}, {84, 84, 217}, {85, 90, 61}, {95, 122, -25}, },
00257         {{48, 122, -25}, },
00258         {{48, 122, -25}, },
00259         {{48, 104, -71}, {105, 105, 218}, {106, 122, 61}, },
00260         {{48, 122, -25}, },
00261         {{48, 104, -71}, {105, 105, 219}, {106, 122, 61}, },
00262         {{48, 122, -25}, },
00263         {{48, 100, -38}, {101, 101, 220}, {102, 122, 61}, },
00264         {{48, 107, -68}, {108, 108, 221}, {109, 122, 61}, },
00265         {{48, 104, -71}, {105, 105, 222}, {106, 122, 61}, },
00266         {{48, 107, -68}, {108, 108, 223}, {109, 122, 61}, },
00267         {{48, 115, -44}, {116, 116, 224}, {117, 122, 61}, },
00268         {{48, 122, -25}, },
00269         {{48, 122, -25}, },
00270         {{48, 109, -32}, {110, 110, 225}, {111, 122, 61}, },
00271         {{48, 100, -38}, {101, 101, 226}, {102, 122, 61}, },
00272         {{48, 101, -41}, {102, 102, 227}, {103, 122, 61}, },
00273         {{48, 110, -29}, {111, 111, 228}, {112, 122, 61}, },
00274         {{48, 110, -29}, {111, 111, 229}, {112, 122, 61}, },
00275         {{48, 100, -38}, {101, 101, 230}, {102, 122, 61}, },
00276         {{48, 107, -68}, {108, 108, 231}, {109, 122, 61}, },
00277         {{48, 107, -68}, {108, 108, 232}, {109, 122, 61}, },
00278         {{48, 100, -38}, {101, 101, 233}, {102, 122, 61}, },
00279         {{48, 115, -44}, {116, 116, 234}, {117, 122, 61}, },
00280         {{48, 113, -28}, {114, 114, 235}, {115, 122, 61}, },
00281         {{48, 104, -71}, {105, 105, 236}, {106, 122, 61}, },
00282         {{48, 109, -32}, {110, 110, 237}, {111, 122, 61}, },
00283         {{48, 101, -41}, {102, 102, 238}, {103, 122, 61}, },
00284         {{48, 122, -25}, },
00285         {{48, 95, -25}, {97, 97, 239}, {98, 122, 61}, },
00286         {{48, 122, -25}, },
00287         {{48, 114, -65}, {115, 115, 240}, {116, 122, 61}, },
00288         {{48, 122, -25}, },
00289         {{48, 108, -103}, {109, 109, 241}, {110, 122, 61}, },
00290         {{48, 100, -38}, {101, 101, 242}, {102, 122, 61}, },
00291         {{48, 122, -25}, },
00292         {{48, 122, -25}, },
00293         {{48, 97, -195}, {98, 98, 243}, {99, 122, 61}, },
00294         {{48, 122, -25}, },
00295         {{48, 104, -71}, {105, 105, 244}, {106, 122, 61}, },
00296         {{48, 99, -70}, {100, 100, 245}, {101, 122, 61}, },
00297         {{48, 107, -68}, {108, 108, 246}, {109, 122, 61}, },
00298         {{48, 109, -32}, {110, 110, 247}, {111, 122, 61}, },
00299         {{48, 122, -25}, },
00300         {{48, 100, -38}, {101, 101, 248}, {102, 122, 61}, },
00301         {{48, 95, -25}, {97, 97, 249}, {98, 122, 61}, },
00302         {{48, 122, -25}, },
00303         {{48, 115, -44}, {116, 116, 250}, {117, 122, 61}, },
00304         {{48, 100, -38}, {101, 101, 251}, {102, 122, 61}, },
00305         {{48, 99, -70}, {100, 100, 252}, {101, 122, 61}, },
00306         {{48, 122, -25}, },
00307     };*/
00308 
00309     private static int[][] accept;
00310 /*  {
00311         {-1, 74, 74, 74, 22, -1, 17, -1, 4, 5, 15, 13, 10, 14, 11, 16, 72, 1, 0, 24, 21, 25, 9, 71, 6, 7, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 2, 8, 3, 23, -1, 73, -1, 18, 75, 12, 28, 26, 20, 27, 71, 71, 71, 71, 71, 71, 71, 53, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 39, 71, 71, 71, 71, 71, 71, 71, 71, 71, 19, 73, 75, 71, 71, 71, 71, 71, 34, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 50, 71, 45, 71, 71, 71, 71, 71, 71, 71, 71, 44, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 47, 64, 71, 55, 71, 71, 71, 63, 71, 51, 36, 48, 71, 46, 71, 71, 71, 71, 71, 71, 71, 71, 31, 71, 71, 57, 71, 52, 38, 71, 71, 71, 71, 32, 71, 71, 71, 71, 71, 71, 71, 71, 71, 35, 71, 71, 62, 71, 71, 71, 71, 29, 71, 65, 71, 71, 71, 71, 40, 71, 59, 71, 71, 71, 42, 71, 49, 56, 58, 71, 30, 71, 67, 71, 71, 71, 71, 71, 69, 33, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 54, 71, 60, 71, 37, 71, 71, 43, 41, 71, 70, 71, 71, 71, 71, 68, 71, 71, 61, 71, 71, 71, 66, },
00312 
00313     };*/
00314 
00315     public static class State
00316     {
00317         public final static State INITIAL = new State(0);
00318 
00319         private int id;
00320 
00321         private State(int id)
00322         {
00323             this.id = id;
00324         }
00325 
00326         public int id()
00327         {
00328             return id;
00329         }
00330     }
00331     public Lexer(PushbackReader in)
00332     {
00333         this.in = in;
00334 
00335         if(gotoTable == null)
00336         {
00337             try
00338             {
00339                 DataInputStream s = new DataInputStream(
00340                     new BufferedInputStream(
00341                     Lexer.class.getResourceAsStream("lexer.dat")));
00342 
00343                 // read gotoTable
00344                 int length = s.readInt();
00345                 gotoTable = new int[length][][];
00346                 for(int i = 0; i < gotoTable.length; i++)
00347                 {
00348                     length = s.readInt();
00349                     gotoTable[i] = new int[length][3];
00350                     for(int j = 0; j < gotoTable[i].length; j++)
00351                     {
00352                         for(int k = 0; k < 3; k++)
00353                         {
00354                             gotoTable[i][j][k] = s.readInt();
00355                         }
00356                     }
00357                 }
00358 
00359                 // read accept
00360                 length = s.readInt();
00361                 accept = new int[length][];
00362                 for(int i = 0; i < accept.length; i++)
00363                 {
00364                     length = s.readInt();
00365                     accept[i] = new int[length];
00366                     for(int j = 0; j < accept[i].length; j++)
00367                     {
00368                         accept[i][j] = s.readInt();
00369                     }
00370                 }
00371 
00372                 s.close();
00373             }
00374             catch(Exception e)
00375             {
00376                 throw new RuntimeException("Unable to read lexer.dat.");
00377             }
00378         }
00379     }
00380     protected void filter() throws LexerException, IOException
00381     {
00382     }
00383     private int getChar() throws IOException
00384     {
00385         if(eof)
00386         {
00387             return -1;
00388         }
00389 
00390         int result = in.read();
00391 
00392         if(result == -1)
00393         {
00394             eof = true;
00395         }
00396 
00397         return result;
00398     }
00399     private String getText(int acceptLength)
00400     {
00401         StringBuffer s = new StringBuffer(acceptLength);
00402         for(int i = 0; i < acceptLength; i++)
00403         {
00404             s.append(text.charAt(i));
00405         }
00406 
00407         return s.toString();
00408     }
00409     protected Token getToken() throws IOException, LexerException
00410     {
00411         int dfa_state = 0;
00412 
00413         int start_pos = pos;
00414         int start_line = line;
00415 
00416         int accept_state = -1;
00417         int accept_token = -1;
00418         int accept_length = -1;
00419         int accept_pos = -1;
00420         int accept_line = -1;
00421 
00422         text.setLength(0);
00423 
00424         while(true)
00425         {
00426             int c = getChar();
00427 
00428             if(c != -1)
00429             {
00430                 switch(c)
00431                 {
00432                 case 10:
00433                     if(cr)
00434                     {
00435                         cr = false;
00436                     }
00437                     else
00438                     {
00439                         line++;
00440                         pos = 0;
00441                     }
00442                     break;
00443                 case 13:
00444                     line++;
00445                     pos = 0;
00446                     cr = true;
00447                     break;
00448                 default:
00449                     pos++;
00450                     cr = false;
00451                     break;
00452                 };
00453 
00454                 text.append((char) c);
00455 
00456                 do
00457                 {
00458                     int oldState = (dfa_state < -1) ? (-2 -dfa_state) : dfa_state;
00459 
00460                     dfa_state = -1;
00461 
00462                     int low = 0;
00463                     int high = gotoTable[oldState].length - 1;
00464 
00465                     while(low <= high)
00466                     {
00467                         int middle = (low + high) / 2;
00468 
00469                         if(c < gotoTable[oldState][middle][0])
00470                         {
00471                             high = middle - 1;
00472                         }
00473                         else if(c > gotoTable[oldState][middle][1])
00474                         {
00475                             low = middle + 1;
00476                         }
00477                         else
00478                         {
00479                             dfa_state = gotoTable[oldState][middle][2];
00480                             break;
00481                         }
00482                     }
00483                 }while(dfa_state < -1);
00484             }
00485             else
00486             {
00487                 dfa_state = -1;
00488             }
00489 
00490             if(dfa_state >= 0)
00491             {
00492                 if(accept[state.id()][dfa_state] != -1)
00493                 {
00494                     accept_state = dfa_state;
00495                     accept_token = accept[state.id()][dfa_state];
00496                     accept_length = text.length();
00497                     accept_pos = pos;
00498                     accept_line = line;
00499                 }
00500             }
00501             else
00502             {
00503                 if(accept_state != -1)
00504                 {
00505                     switch(accept_token)
00506                     {
00507                     case 0:
00508                         {
00509                             Token token = new0(
00510                                 start_line + 1,
00511                                 start_pos + 1);
00512                             pushBack(accept_length);
00513                             pos = accept_pos;
00514                             line = accept_line;
00515                             return token;
00516                         }
00517                     case 1:
00518                         {
00519                             Token token = new1(
00520                                 start_line + 1,
00521                                 start_pos + 1);
00522                             pushBack(accept_length);
00523                             pos = accept_pos;
00524                             line = accept_line;
00525                             return token;
00526                         }
00527                     case 2:
00528                         {
00529                             Token token = new2(
00530                                 start_line + 1,
00531                                 start_pos + 1);
00532                             pushBack(accept_length);
00533                             pos = accept_pos;
00534                             line = accept_line;
00535                             return token;
00536                         }
00537                     case 3:
00538                         {
00539                             Token token = new3(
00540                                 start_line + 1,
00541                                 start_pos + 1);
00542                             pushBack(accept_length);
00543                             pos = accept_pos;
00544                             line = accept_line;
00545                             return token;
00546                         }
00547                     case 4:
00548                         {
00549                             Token token = new4(
00550                                 start_line + 1,
00551                                 start_pos + 1);
00552                             pushBack(accept_length);
00553                             pos = accept_pos;
00554                             line = accept_line;
00555                             return token;
00556                         }
00557                     case 5:
00558                         {
00559                             Token token = new5(
00560                                 start_line + 1,
00561                                 start_pos + 1);
00562                             pushBack(accept_length);
00563                             pos = accept_pos;
00564                             line = accept_line;
00565                             return token;
00566                         }
00567                     case 6:
00568                         {
00569                             Token token = new6(
00570                                 start_line + 1,
00571                                 start_pos + 1);
00572                             pushBack(accept_length);
00573                             pos = accept_pos;
00574                             line = accept_line;
00575                             return token;
00576                         }
00577                     case 7:
00578                         {
00579                             Token token = new7(
00580                                 start_line + 1,
00581                                 start_pos + 1);
00582                             pushBack(accept_length);
00583                             pos = accept_pos;
00584                             line = accept_line;
00585                             return token;
00586                         }
00587                     case 8:
00588                         {
00589                             Token token = new8(
00590                                 start_line + 1,
00591                                 start_pos + 1);
00592                             pushBack(accept_length);
00593                             pos = accept_pos;
00594                             line = accept_line;
00595                             return token;
00596                         }
00597                     case 9:
00598                         {
00599                             Token token = new9(
00600                                 start_line + 1,
00601                                 start_pos + 1);
00602                             pushBack(accept_length);
00603                             pos = accept_pos;
00604                             line = accept_line;
00605                             return token;
00606                         }
00607                     case 10:
00608                         {
00609                             Token token = new10(
00610                                 start_line + 1,
00611                                 start_pos + 1);
00612                             pushBack(accept_length);
00613                             pos = accept_pos;
00614                             line = accept_line;
00615                             return token;
00616                         }
00617                     case 11:
00618                         {
00619                             Token token = new11(
00620                                 start_line + 1,
00621                                 start_pos + 1);
00622                             pushBack(accept_length);
00623                             pos = accept_pos;
00624                             line = accept_line;
00625                             return token;
00626                         }
00627                     case 12:
00628                         {
00629                             Token token = new12(
00630                                 start_line + 1,
00631                                 start_pos + 1);
00632                             pushBack(accept_length);
00633                             pos = accept_pos;
00634                             line = accept_line;
00635                             return token;
00636                         }
00637                     case 13:
00638                         {
00639                             Token token = new13(
00640                                 start_line + 1,
00641                                 start_pos + 1);
00642                             pushBack(accept_length);
00643                             pos = accept_pos;
00644                             line = accept_line;
00645                             return token;
00646                         }
00647                     case 14:
00648                         {
00649                             Token token = new14(
00650                                 start_line + 1,
00651                                 start_pos + 1);
00652                             pushBack(accept_length);
00653                             pos = accept_pos;
00654                             line = accept_line;
00655                             return token;
00656                         }
00657                     case 15:
00658                         {
00659                             Token token = new15(
00660                                 start_line + 1,
00661                                 start_pos + 1);
00662                             pushBack(accept_length);
00663                             pos = accept_pos;
00664                             line = accept_line;
00665                             return token;
00666                         }
00667                     case 16:
00668                         {
00669                             Token token = new16(
00670                                 start_line + 1,
00671                                 start_pos + 1);
00672                             pushBack(accept_length);
00673                             pos = accept_pos;
00674                             line = accept_line;
00675                             return token;
00676                         }
00677                     case 17:
00678                         {
00679                             Token token = new17(
00680                                 start_line + 1,
00681                                 start_pos + 1);
00682                             pushBack(accept_length);
00683                             pos = accept_pos;
00684                             line = accept_line;
00685                             return token;
00686                         }
00687                     case 18:
00688                         {
00689                             Token token = new18(
00690                                 start_line + 1,
00691                                 start_pos + 1);
00692                             pushBack(accept_length);
00693                             pos = accept_pos;
00694                             line = accept_line;
00695                             return token;
00696                         }
00697                     case 19:
00698                         {
00699                             Token token = new19(
00700                                 start_line + 1,
00701                                 start_pos + 1);
00702                             pushBack(accept_length);
00703                             pos = accept_pos;
00704                             line = accept_line;
00705                             return token;
00706                         }
00707                     case 20:
00708                         {
00709                             Token token = new20(
00710                                 start_line + 1,
00711                                 start_pos + 1);
00712                             pushBack(accept_length);
00713                             pos = accept_pos;
00714                             line = accept_line;
00715                             return token;
00716                         }
00717                     case 21:
00718                         {
00719                             Token token = new21(
00720                                 start_line + 1,
00721                                 start_pos + 1);
00722                             pushBack(accept_length);
00723                             pos = accept_pos;
00724                             line = accept_line;
00725                             return token;
00726                         }
00727                     case 22:
00728                         {
00729                             Token token = new22(
00730                                 start_line + 1,
00731                                 start_pos + 1);
00732                             pushBack(accept_length);
00733                             pos = accept_pos;
00734                             line = accept_line;
00735                             return token;
00736                         }
00737                     case 23:
00738                         {
00739                             Token token = new23(
00740                                 start_line + 1,
00741                                 start_pos + 1);
00742                             pushBack(accept_length);
00743                             pos = accept_pos;
00744                             line = accept_line;
00745                             return token;
00746                         }
00747                     case 24:
00748                         {
00749                             Token token = new24(
00750                                 start_line + 1,
00751                                 start_pos + 1);
00752                             pushBack(accept_length);
00753                             pos = accept_pos;
00754                             line = accept_line;
00755                             return token;
00756                         }
00757                     case 25:
00758                         {
00759                             Token token = new25(
00760                                 start_line + 1,
00761                                 start_pos + 1);
00762                             pushBack(accept_length);
00763                             pos = accept_pos;
00764                             line = accept_line;
00765                             return token;
00766                         }
00767                     case 26:
00768                         {
00769                             Token token = new26(
00770                                 start_line + 1,
00771                                 start_pos + 1);
00772                             pushBack(accept_length);
00773                             pos = accept_pos;
00774                             line = accept_line;
00775                             return token;
00776                         }
00777                     case 27:
00778                         {
00779                             Token token = new27(
00780                                 start_line + 1,
00781                                 start_pos + 1);
00782                             pushBack(accept_length);
00783                             pos = accept_pos;
00784                             line = accept_line;
00785                             return token;
00786                         }
00787                     case 28:
00788                         {
00789                             Token token = new28(
00790                                 start_line + 1,
00791                                 start_pos + 1);
00792                             pushBack(accept_length);
00793                             pos = accept_pos;
00794                             line = accept_line;
00795                             return token;
00796                         }
00797                     case 29:
00798                         {
00799                             Token token = new29(
00800                                 start_line + 1,
00801                                 start_pos + 1);
00802                             pushBack(accept_length);
00803                             pos = accept_pos;
00804                             line = accept_line;
00805                             return token;
00806                         }
00807                     case 30:
00808                         {
00809                             Token token = new30(
00810                                 start_line + 1,
00811                                 start_pos + 1);
00812                             pushBack(accept_length);
00813                             pos = accept_pos;
00814                             line = accept_line;
00815                             return token;
00816                         }
00817                     case 31:
00818                         {
00819                             Token token = new31(
00820                                 start_line + 1,
00821                                 start_pos + 1);
00822                             pushBack(accept_length);
00823                             pos = accept_pos;
00824                             line = accept_line;
00825                             return token;
00826                         }
00827                     case 32:
00828                         {
00829                             Token token = new32(
00830                                 start_line + 1,
00831                                 start_pos + 1);
00832                             pushBack(accept_length);
00833                             pos = accept_pos;
00834                             line = accept_line;
00835                             return token;
00836                         }
00837                     case 33:
00838                         {
00839                             Token token = new33(
00840                                 start_line + 1,
00841                                 start_pos + 1);
00842                             pushBack(accept_length);
00843                             pos = accept_pos;
00844                             line = accept_line;
00845                             return token;
00846                         }
00847                     case 34:
00848                         {
00849                             Token token = new34(
00850                                 start_line + 1,
00851                                 start_pos + 1);
00852                             pushBack(accept_length);
00853                             pos = accept_pos;
00854                             line = accept_line;
00855                             return token;
00856                         }
00857                     case 35:
00858                         {
00859                             Token token = new35(
00860                                 start_line + 1,
00861                                 start_pos + 1);
00862                             pushBack(accept_length);
00863                             pos = accept_pos;
00864                             line = accept_line;
00865                             return token;
00866                         }
00867                     case 36:
00868                         {
00869                             Token token = new36(
00870                                 start_line + 1,
00871                                 start_pos + 1);
00872                             pushBack(accept_length);
00873                             pos = accept_pos;
00874                             line = accept_line;
00875                             return token;
00876                         }
00877                     case 37:
00878                         {
00879                             Token token = new37(
00880                                 start_line + 1,
00881                                 start_pos + 1);
00882                             pushBack(accept_length);
00883                             pos = accept_pos;
00884                             line = accept_line;
00885                             return token;
00886                         }
00887                     case 38:
00888                         {
00889                             Token token = new38(
00890                                 start_line + 1,
00891                                 start_pos + 1);
00892                             pushBack(accept_length);
00893                             pos = accept_pos;
00894                             line = accept_line;
00895                             return token;
00896                         }
00897                     case 39:
00898                         {
00899                             Token token = new39(
00900                                 start_line + 1,
00901                                 start_pos + 1);
00902                             pushBack(accept_length);
00903                             pos = accept_pos;
00904                             line = accept_line;
00905                             return token;
00906                         }
00907                     case 40:
00908                         {
00909                             Token token = new40(
00910                                 start_line + 1,
00911                                 start_pos + 1);
00912                             pushBack(accept_length);
00913                             pos = accept_pos;
00914                             line = accept_line;
00915                             return token;
00916                         }
00917                     case 41:
00918                         {
00919                             Token token = new41(
00920                                 start_line + 1,
00921                                 start_pos + 1);
00922                             pushBack(accept_length);
00923                             pos = accept_pos;
00924                             line = accept_line;
00925                             return token;
00926                         }
00927                     case 42:
00928                         {
00929                             Token token = new42(
00930                                 start_line + 1,
00931                                 start_pos + 1);
00932                             pushBack(accept_length);
00933                             pos = accept_pos;
00934                             line = accept_line;
00935                             return token;
00936                         }
00937                     case 43:
00938                         {
00939                             Token token = new43(
00940                                 start_line + 1,
00941                                 start_pos + 1);
00942                             pushBack(accept_length);
00943                             pos = accept_pos;
00944                             line = accept_line;
00945                             return token;
00946                         }
00947                     case 44:
00948                         {
00949                             Token token = new44(
00950                                 start_line + 1,
00951                                 start_pos + 1);
00952                             pushBack(accept_length);
00953                             pos = accept_pos;
00954                             line = accept_line;
00955                             return token;
00956                         }
00957                     case 45:
00958                         {
00959                             Token token = new45(
00960                                 start_line + 1,
00961                                 start_pos + 1);
00962                             pushBack(accept_length);
00963                             pos = accept_pos;
00964                             line = accept_line;
00965                             return token;
00966                         }
00967                     case 46:
00968                         {
00969                             Token token = new46(
00970                                 start_line + 1,
00971                                 start_pos + 1);
00972                             pushBack(accept_length);
00973                             pos = accept_pos;
00974                             line = accept_line;
00975                             return token;
00976                         }
00977                     case 47:
00978                         {
00979                             Token token = new47(
00980                                 start_line + 1,
00981                                 start_pos + 1);
00982                             pushBack(accept_length);
00983                             pos = accept_pos;
00984                             line = accept_line;
00985                             return token;
00986                         }
00987                     case 48:
00988                         {
00989                             Token token = new48(
00990                                 start_line + 1,
00991                                 start_pos + 1);
00992                             pushBack(accept_length);
00993                             pos = accept_pos;
00994                             line = accept_line;
00995                             return token;
00996                         }
00997                     case 49:
00998                         {
00999                             Token token = new49(
01000                                 start_line + 1,
01001                                 start_pos + 1);
01002                             pushBack(accept_length);
01003                             pos = accept_pos;
01004                             line = accept_line;
01005                             return token;
01006                         }
01007                     case 50:
01008                         {
01009                             Token token = new50(
01010                                 start_line + 1,
01011                                 start_pos + 1);
01012                             pushBack(accept_length);
01013                             pos = accept_pos;
01014                             line = accept_line;
01015                             return token;
01016                         }
01017                     case 51:
01018                         {
01019                             Token token = new51(
01020                                 start_line + 1,
01021                                 start_pos + 1);
01022                             pushBack(accept_length);
01023                             pos = accept_pos;
01024                             line = accept_line;
01025                             return token;
01026                         }
01027                     case 52:
01028                         {
01029                             Token token = new52(
01030                                 start_line + 1,
01031                                 start_pos + 1);
01032                             pushBack(accept_length);
01033                             pos = accept_pos;
01034                             line = accept_line;
01035                             return token;
01036                         }
01037                     case 53:
01038                         {
01039                             Token token = new53(
01040                                 start_line + 1,
01041                                 start_pos + 1);
01042                             pushBack(accept_length);
01043                             pos = accept_pos;
01044                             line = accept_line;
01045                             return token;
01046                         }
01047                     case 54:
01048                         {
01049                             Token token = new54(
01050                                 start_line + 1,
01051                                 start_pos + 1);
01052                             pushBack(accept_length);
01053                             pos = accept_pos;
01054                             line = accept_line;
01055                             return token;
01056                         }
01057                     case 55:
01058                         {
01059                             Token token = new55(
01060                                 start_line + 1,
01061                                 start_pos + 1);
01062                             pushBack(accept_length);
01063                             pos = accept_pos;
01064                             line = accept_line;
01065                             return token;
01066                         }
01067                     case 56:
01068                         {
01069                             Token token = new56(
01070                                 start_line + 1,
01071                                 start_pos + 1);
01072                             pushBack(accept_length);
01073                             pos = accept_pos;
01074                             line = accept_line;
01075                             return token;
01076                         }
01077                     case 57:
01078                         {
01079                             Token token = new57(
01080                                 start_line + 1,
01081                                 start_pos + 1);
01082                             pushBack(accept_length);
01083                             pos = accept_pos;
01084                             line = accept_line;
01085                             return token;
01086                         }
01087                     case 58:
01088                         {
01089                             Token token = new58(
01090                                 start_line + 1,
01091                                 start_pos + 1);
01092                             pushBack(accept_length);
01093                             pos = accept_pos;
01094                             line = accept_line;
01095                             return token;
01096                         }
01097                     case 59:
01098                         {
01099                             Token token = new59(
01100                                 start_line + 1,
01101                                 start_pos + 1);
01102                             pushBack(accept_length);
01103                             pos = accept_pos;
01104                             line = accept_line;
01105                             return token;
01106                         }
01107                     case 60:
01108                         {
01109                             Token token = new60(
01110                                 start_line + 1,
01111                                 start_pos + 1);
01112                             pushBack(accept_length);
01113                             pos = accept_pos;
01114                             line = accept_line;
01115                             return token;
01116                         }
01117                     case 61:
01118                         {
01119                             Token token = new61(
01120                                 start_line + 1,
01121                                 start_pos + 1);
01122                             pushBack(accept_length);
01123                             pos = accept_pos;
01124                             line = accept_line;
01125                             return token;
01126                         }
01127                     case 62:
01128                         {
01129                             Token token = new62(
01130                                 start_line + 1,
01131                                 start_pos + 1);
01132                             pushBack(accept_length);
01133                             pos = accept_pos;
01134                             line = accept_line;
01135                             return token;
01136                         }
01137                     case 63:
01138                         {
01139                             Token token = new63(
01140                                 start_line + 1,
01141                                 start_pos + 1);
01142                             pushBack(accept_length);
01143                             pos = accept_pos;
01144                             line = accept_line;
01145                             return token;
01146                         }
01147                     case 64:
01148                         {
01149                             Token token = new64(
01150                                 start_line + 1,
01151                                 start_pos + 1);
01152                             pushBack(accept_length);
01153                             pos = accept_pos;
01154                             line = accept_line;
01155                             return token;
01156                         }
01157                     case 65:
01158                         {
01159                             Token token = new65(
01160                                 start_line + 1,
01161                                 start_pos + 1);
01162                             pushBack(accept_length);
01163                             pos = accept_pos;
01164                             line = accept_line;
01165                             return token;
01166                         }
01167                     case 66:
01168                         {
01169                             Token token = new66(
01170                                 start_line + 1,
01171                                 start_pos + 1);
01172                             pushBack(accept_length);
01173                             pos = accept_pos;
01174                             line = accept_line;
01175                             return token;
01176                         }
01177                     case 67:
01178                         {
01179                             Token token = new67(
01180                                 start_line + 1,
01181                                 start_pos + 1);
01182                             pushBack(accept_length);
01183                             pos = accept_pos;
01184                             line = accept_line;
01185                             return token;
01186                         }
01187                     case 68:
01188                         {
01189                             Token token = new68(
01190                                 start_line + 1,
01191                                 start_pos + 1);
01192                             pushBack(accept_length);
01193                             pos = accept_pos;
01194                             line = accept_line;
01195                             return token;
01196                         }
01197                     case 69:
01198                         {
01199                             Token token = new69(
01200                                 start_line + 1,
01201                                 start_pos + 1);
01202                             pushBack(accept_length);
01203                             pos = accept_pos;
01204                             line = accept_line;
01205                             return token;
01206                         }
01207                     case 70:
01208                         {
01209                             Token token = new70(
01210                                 start_line + 1,
01211                                 start_pos + 1);
01212                             pushBack(accept_length);
01213                             pos = accept_pos;
01214                             line = accept_line;
01215                             return token;
01216                         }
01217                     case 71:
01218                         {
01219                             Token token = new71(
01220                                 getText(accept_length),
01221                                 start_line + 1,
01222                                 start_pos + 1);
01223                             pushBack(accept_length);
01224                             pos = accept_pos;
01225                             line = accept_line;
01226                             return token;
01227                         }
01228                     case 72:
01229                         {
01230                             Token token = new72(
01231                                 getText(accept_length),
01232                                 start_line + 1,
01233                                 start_pos + 1);
01234                             pushBack(accept_length);
01235                             pos = accept_pos;
01236                             line = accept_line;
01237                             return token;
01238                         }
01239                     case 73:
01240                         {
01241                             Token token = new73(
01242                                 getText(accept_length),
01243                                 start_line + 1,
01244                                 start_pos + 1);
01245                             pushBack(accept_length);
01246                             pos = accept_pos;
01247                             line = accept_line;
01248                             return token;
01249                         }
01250                     case 74:
01251                         {
01252                             Token token = new74(
01253                                 getText(accept_length),
01254                                 start_line + 1,
01255                                 start_pos + 1);
01256                             pushBack(accept_length);
01257                             pos = accept_pos;
01258                             line = accept_line;
01259                             return token;
01260                         }
01261                     case 75:
01262                         {
01263                             Token token = new75(
01264                                 getText(accept_length),
01265                                 start_line + 1,
01266                                 start_pos + 1);
01267                             pushBack(accept_length);
01268                             pos = accept_pos;
01269                             line = accept_line;
01270                             return token;
01271                         }
01272                     }
01273                 }
01274                 else
01275                 {
01276                     if(text.length() > 0)
01277                     {
01278                         throw new LexerException(
01279                             "[" + (start_line + 1) + "," + (start_pos + 1) + "]" +
01280                             " Unknown token: " + text);
01281                     }
01282                     else
01283                     {
01284                         EOF token = new EOF(
01285                             start_line + 1,
01286                             start_pos + 1);
01287                         return token;
01288                     }
01289                 }
01290             }
01291         }
01292     }
01293     Token new0(int line, int pos) { return new TSemicolon(line, pos); }
01294     Token new1(int line, int pos) { return new TColon(line, pos); }
01295     Token new10(int line, int pos) { return new TComma(line, pos); }
01296     Token new11(int line, int pos) { return new TDot(line, pos); }
01297     Token new12(int line, int pos) { return new TDotdot(line, pos); }
01298     Token new13(int line, int pos) { return new TPlus(line, pos); }
01299     Token new14(int line, int pos) { return new TMinus(line, pos); }
01300     Token new15(int line, int pos) { return new TMult(line, pos); }
01301     Token new16(int line, int pos) { return new TDiv(line, pos); }
01302     Token new17(int line, int pos) { return new TMod(line, pos); }
01303     Token new18(int line, int pos) { return new TAnd(line, pos); }
01304     Token new19(int line, int pos) { return new TOr(line, pos); }
01305     Token new2(int line, int pos) { return new TLbrace(line, pos); }
01306     Token new20(int line, int pos) { return new TEq(line, pos); }
01307     Token new21(int line, int pos) { return new TEquals(line, pos); }
01308     Token new22(int line, int pos) { return new TNot(line, pos); }
01309     Token new23(int line, int pos) { return new TNoteq(line, pos); }
01310     Token new24(int line, int pos) { return new TLt(line, pos); }
01311     Token new25(int line, int pos) { return new TGt(line, pos); }
01312     Token new26(int line, int pos) { return new TLe(line, pos); }
01313     Token new27(int line, int pos) { return new TGe(line, pos); }
01314     Token new28(int line, int pos) { return new TAssign(line, pos); }
01315     Token new29(int line, int pos) { return new TAssert(line, pos); }
01316     Token new3(int line, int pos) { return new TRbrace(line, pos); }
01317     Token new30(int line, int pos) { return new TBoolean(line, pos); }
01318     Token new31(int line, int pos) { return new TTrue(line, pos); }
01319     Token new32(int line, int pos) { return new TFalse(line, pos); }
01320     Token new33(int line, int pos) { return new TProcess(line, pos); }
01321     Token new34(int line, int pos) { return new TEnd(line, pos); }
01322     Token new35(int line, int pos) { return new TRange(line, pos); }
01323     Token new36(int line, int pos) { return new TLock(line, pos); }
01324     Token new37(int line, int pos) { return new TReentrant(line, pos); }
01325     Token new38(int line, int pos) { return new TArray(line, pos); }
01326     Token new39(int line, int pos) { return new TOf(line, pos); }
01327     Token new4(int line, int pos) { return new TLparen(line, pos); }
01328     Token new40(int line, int pos) { return new TLength(line, pos); }
01329     Token new41(int line, int pos) { return new TInstanceof(line, pos); }
01330     Token new42(int line, int pos) { return new TRecord(line, pos); }
01331     Token new43(int line, int pos) { return new TCollection(line, pos); }
01332     Token new44(int line, int pos) { return new TRef(line, pos); }
01333     Token new45(int line, int pos) { return new TNew(line, pos); }
01334     Token new46(int line, int pos) { return new TNull(line, pos); }
01335     Token new47(int line, int pos) { return new TEnum(line, pos); }
01336     Token new48(int line, int pos) { return new TMain(line, pos); }
01337     Token new49(int line, int pos) { return new TThread(line, pos); }
01338     Token new5(int line, int pos) { return new TRparen(line, pos); }
01339     Token new50(int line, int pos) { return new TLoc(line, pos); }
01340     Token new51(int line, int pos) { return new TLive(line, pos); }
01341     Token new52(int line, int pos) { return new TWhen(line, pos); }
01342     Token new53(int line, int pos) { return new TDo(line, pos); }
01343     Token new54(int line, int pos) { return new TInvisible(line, pos); }
01344     Token new55(int line, int pos) { return new TGoto(line, pos); }
01345     Token new56(int line, int pos) { return new TUnlock(line, pos); }
01346     Token new57(int line, int pos) { return new TWait(line, pos); }
01347     Token new58(int line, int pos) { return new TUnwait(line, pos); }
01348     Token new59(int line, int pos) { return new TNotify(line, pos); }
01349     Token new6(int line, int pos) { return new TLbrack(line, pos); }
01350     Token new60(int line, int pos) { return new TNotifyall(line, pos); }
01351     Token new61(int line, int pos) { return new TLockavailable(line, pos); }
01352     Token new62(int line, int pos) { return new TStart(line, pos); }
01353     Token new63(int line, int pos) { return new TJoin(line, pos); }
01354     Token new64(int line, int pos) { return new TExit(line, pos); }
01355     Token new65(int line, int pos) { return new TChoose(line, pos); }
01356     Token new66(int line, int pos) { return new TThreadterminated(line, pos); }
01357     Token new67(int line, int pos) { return new THaslock(line, pos); }
01358     Token new68(int line, int pos) { return new TWasnotified(line, pos); }
01359     Token new69(int line, int pos) { return new TPrintln(line, pos); }
01360     Token new7(int line, int pos) { return new TRbrack(line, pos); }
01361     Token new70(int line, int pos) { return new TPredicates(line, pos); }
01362     Token new71(String text, int line, int pos) { return new TId(text, line, pos); }
01363     Token new72(String text, int line, int pos) { return new TInt(text, line, pos); }
01364     Token new73(String text, int line, int pos) { return new TString(text, line, pos); }
01365     Token new74(String text, int line, int pos) { return new TWhitespace(text, line, pos); }
01366     Token new75(String text, int line, int pos) { return new TComment(text, line, pos); }
01367     Token new8(int line, int pos) { return new TBar(line, pos); }
01368     Token new9(int line, int pos) { return new TAt(line, pos); }
01369     public Token next() throws LexerException, IOException
01370     {
01371         while(token == null)
01372         {
01373             token = getToken();
01374             filter();
01375         }
01376 
01377         Token result = token;
01378         token = null;
01379         return result;
01380     }
01381     public Token peek() throws LexerException, IOException
01382     {
01383         while(token == null)
01384         {
01385             token = getToken();
01386             filter();
01387         }
01388 
01389         return token;
01390     }
01391     private void pushBack(int acceptLength) throws IOException
01392     {
01393         int length = text.length();
01394         for(int i = length - 1; i >= acceptLength; i--)
01395         {
01396             eof = false;
01397 
01398             in.unread(text.charAt(i));
01399         }
01400     }
01401     protected void unread(Token token) throws IOException
01402     {
01403         String text = token.getText();
01404         int length = text.length();
01405 
01406         for(int i = length - 1; i >= 0; i--)
01407         {
01408             eof = false;
01409 
01410             in.unread(text.charAt(i));
01411         }
01412 
01413         pos = token.getPos() - 1;
01414         line = token.getLine() - 1;
01415     }
01416 }

Generated at Thu Feb 7 06:49:18 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001