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

Parser.java

00001 package edu.ksu.cis.bandera.abstraction.options.parser;
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 /* This file was generated by SableCC (http://www.sable.mcgill.ca/sablecc/). */
00037 
00038 import edu.ksu.cis.bandera.abstraction.options.lexer.*;
00039 import edu.ksu.cis.bandera.abstraction.options.node.*;
00040 import edu.ksu.cis.bandera.abstraction.options.analysis.*;
00041 import java.util.*;
00042 
00043 import java.io.DataInputStream;
00044 import java.io.BufferedInputStream;
00045 import java.io.IOException;
00046 
00047 public class Parser
00048 {
00049     public final Analysis ignoredTokens = new AnalysisAdapter();
00050 
00051     protected Node node;
00052 
00053     private final Lexer lexer;
00054     private final ListIterator stack = new LinkedList().listIterator();
00055     private int last_shift;
00056     private int last_pos;
00057     private int last_line;
00058     private final TokenIndex converter = new TokenIndex();
00059     private final int[] action = new int[2];
00060 
00061     private final static int SHIFT = 0;
00062     private final static int REDUCE = 1;
00063     private final static int ACCEPT = 2;
00064     private final static int ERROR = 3;
00065 
00066     private static int[][][] actionTable;
00067 /*      {
00068             {{-1, REDUCE, 0}, {8, SHIFT, 1}, },
00069             {{-1, ERROR, 1}, {9, SHIFT, 5}, },
00070             {{-1, ERROR, 2}, {10, ACCEPT, -1}, },
00071             {{-1, REDUCE, 3}, },
00072             {{-1, REDUCE, 1}, {8, SHIFT, 1}, },
00073             {{-1, REDUCE, 12}, },
00074             {{-1, ERROR, 6}, {0, SHIFT, 8}, {5, SHIFT, 9}, },
00075             {{-1, REDUCE, 2}, },
00076             {{-1, ERROR, 8}, {1, SHIFT, 10}, {9, SHIFT, 11}, },
00077             {{-1, ERROR, 9}, {9, SHIFT, 16}, },
00078             {{-1, REDUCE, 4}, },
00079             {{-1, ERROR, 11}, {2, SHIFT, 17}, {9, SHIFT, 5}, },
00080             {{-1, REDUCE, 7}, },
00081             {{-1, REDUCE, 10}, },
00082             {{-1, ERROR, 14}, {1, SHIFT, 19}, {9, SHIFT, 11}, },
00083             {{-1, ERROR, 15}, {1, SHIFT, 22}, {9, SHIFT, 23}, },
00084             {{-1, REDUCE, 13}, },
00085             {{-1, ERROR, 17}, {3, SHIFT, 25}, {9, SHIFT, 5}, },
00086             {{-1, ERROR, 18}, {5, SHIFT, 9}, {6, SHIFT, 28}, },
00087             {{-1, REDUCE, 5}, },
00088             {{-1, REDUCE, 6}, },
00089             {{-1, ERROR, 21}, {1, SHIFT, 29}, {9, SHIFT, 23}, },
00090             {{-1, REDUCE, 8}, },
00091             {{-1, ERROR, 23}, {2, SHIFT, 17}, },
00092             {{-1, REDUCE, 9}, },
00093             {{-1, ERROR, 25}, {0, SHIFT, 30}, },
00094             {{-1, REDUCE, 21}, {4, SHIFT, 31}, {5, SHIFT, 9}, },
00095             {{-1, ERROR, 27}, {3, SHIFT, 33}, {7, SHIFT, 34}, },
00096             {{-1, REDUCE, 14}, },
00097             {{-1, REDUCE, 11}, },
00098             {{-1, ERROR, 30}, {1, SHIFT, 35}, {9, SHIFT, 36}, },
00099             {{-1, REDUCE, 24}, },
00100             {{-1, REDUCE, 22}, {4, SHIFT, 39}, },
00101             {{-1, ERROR, 33}, {0, SHIFT, 40}, },
00102             {{-1, ERROR, 34}, {9, SHIFT, 5}, },
00103             {{-1, REDUCE, 15}, },
00104             {{-1, ERROR, 36}, {9, SHIFT, 5}, },
00105             {{-1, REDUCE, 19}, },
00106             {{-1, ERROR, 38}, {1, SHIFT, 43}, {9, SHIFT, 36}, },
00107             {{-1, REDUCE, 23}, },
00108             {{-1, ERROR, 40}, {1, SHIFT, 45}, {9, SHIFT, 36}, },
00109             {{-1, REDUCE, 25}, {4, SHIFT, 31}, {5, SHIFT, 9}, },
00110             {{-1, ERROR, 42}, {5, SHIFT, 9}, {6, SHIFT, 48}, },
00111             {{-1, REDUCE, 17}, },
00112             {{-1, REDUCE, 18}, },
00113             {{-1, REDUCE, 16}, },
00114             {{-1, ERROR, 46}, {1, SHIFT, 49}, {9, SHIFT, 36}, },
00115             {{-1, REDUCE, 26}, {4, SHIFT, 39}, },
00116             {{-1, REDUCE, 27}, },
00117             {{-1, REDUCE, 20}, },
00118         };*/
00119     private static int[][][] gotoTable;
00120 /*      {
00121             {{-1, 2}, },
00122             {{-1, 3}, {4, 7}, },
00123             {{-1, 6}, {11, 18}, {17, 26}, {34, 41}, {36, 42}, },
00124             {{-1, 12}, {14, 20}, },
00125             {{-1, 13}, {15, 24}, {21, 24}, },
00126             {{-1, 27}, },
00127             {{-1, 37}, {38, 44}, {46, 44}, },
00128             {{-1, 4}, },
00129             {{-1, 14}, },
00130             {{-1, 15}, {14, 21}, },
00131             {{-1, 38}, {40, 46}, },
00132             {{-1, 32}, {41, 47}, },
00133         };*/
00134     private static String[] errorMessages;
00135 /*      {
00136             "TCls EOF expected.",
00137             "TId expected.",
00138             "EOF expected.",
00139             "TLBrace TRParen TDim TDot TSemicolon TComma expected.",
00140             "TLBrace TDot expected.",
00141             "TRBrace TId expected.",
00142             "TLParen TId expected.",
00143             "TRParen TId expected.",
00144             "TDot TSemicolon expected.",
00145             "TLParen expected.",
00146             "TLBrace expected.",
00147             "TRParen TDim TDot TComma expected.",
00148             "TRParen TComma expected.",
00149             "TRParen TDim TComma expected.",
00150         };*/
00151     private static int[] errors;
00152 /*      {
00153             0, 1, 2, 0, 0, 3, 4, 0, 5, 1, 0, 6, 5, 5, 5, 5, 3, 7, 8, 0, 5, 5, 0, 9, 5, 10, 11, 12, 5, 0, 5, 13, 13, 10, 1, 5, 1, 5, 5, 13, 5, 11, 8, 5, 5, 5, 5, 13, 5, 5, 
00154         };*/
00155     public Parser(Lexer lexer)
00156     {
00157         this.lexer = lexer;
00158 
00159         if(actionTable == null)
00160         {
00161             try
00162             {
00163                 DataInputStream s = new DataInputStream(
00164                     new BufferedInputStream(
00165                     Parser.class.getResourceAsStream("parser.dat")));
00166 
00167                 // read actionTable
00168                 int length = s.readInt();
00169                 actionTable = new int[length][][];
00170                 for(int i = 0; i < actionTable.length; i++)
00171                 {
00172                     length = s.readInt();
00173                     actionTable[i] = new int[length][3];
00174                     for(int j = 0; j < actionTable[i].length; j++)
00175                     {
00176                         for(int k = 0; k < 3; k++)
00177                         {
00178                             actionTable[i][j][k] = s.readInt();
00179                         }
00180                     }
00181                 }
00182 
00183                 // read gotoTable
00184                 length = s.readInt();
00185                 gotoTable = new int[length][][];
00186                 for(int i = 0; i < gotoTable.length; i++)
00187                 {
00188                     length = s.readInt();
00189                     gotoTable[i] = new int[length][2];
00190                     for(int j = 0; j < gotoTable[i].length; j++)
00191                     {
00192                         for(int k = 0; k < 2; k++)
00193                         {
00194                             gotoTable[i][j][k] = s.readInt();
00195                         }
00196                     }
00197                 }
00198 
00199                 // read errorMessages
00200                 length = s.readInt();
00201                 errorMessages = new String[length];
00202                 for(int i = 0; i < errorMessages.length; i++)
00203                 {
00204                     length = s.readInt();
00205                     StringBuffer buffer = new StringBuffer();
00206 
00207                     for(int j = 0; j < length; j++)
00208                     {
00209                         buffer.append(s.readChar());
00210                     }
00211                     errorMessages[i] = buffer.toString();
00212                 }
00213 
00214                 // read errors
00215                 length = s.readInt();
00216                 errors = new int[length];
00217                 for(int i = 0; i < errors.length; i++)
00218                 {
00219                     errors[i] = s.readInt();
00220                 }
00221 
00222                 s.close();
00223             }
00224             catch(Exception e)
00225             {
00226                 throw new RuntimeException("Unable to read parser.dat.");
00227             }
00228         }
00229     }
00230     protected void filter() throws ParserException, LexerException, IOException
00231     {
00232     }
00233     private int goTo(int index)
00234     {
00235         int state = state();
00236         int low = 1;
00237         int high = gotoTable[index].length - 1;
00238         int value = gotoTable[index][0][1];
00239 
00240         while(low <= high)
00241         {
00242             int middle = (low + high) / 2;
00243 
00244             if(state < gotoTable[index][middle][0])
00245             {
00246                 high = middle - 1;
00247             }
00248             else if(state > gotoTable[index][middle][0])
00249             {
00250                 low = middle + 1;
00251             }
00252             else
00253             {
00254                 value = gotoTable[index][middle][1];
00255                 break;
00256             }
00257         }
00258 
00259         return value;
00260     }
00261     private int index(Switchable token)
00262     {
00263         converter.index = -1;
00264         token.apply(converter);
00265         return converter.index;
00266     }
00267     Node new0()
00268     {
00269         XPClassOption node1 = null;
00270         AUnit node = new AUnit(node1);
00271         return node;
00272     }
00273     Node new1()
00274     {
00275         XPClassOption node1 = (XPClassOption) pop();
00276         AUnit node = new AUnit(node1);
00277         return node;
00278     }
00279     Node new10()
00280     {
00281         PMethodOption node1 = (PMethodOption) pop();
00282         X2PMethodOption node = new X2PMethodOption(node1);
00283         return node;
00284     }
00285     Node new11()
00286     {
00287         TRBrace node6 = (TRBrace) pop();
00288         XPMethodOption node5 = (XPMethodOption) pop();
00289         XPFieldOption node4 = (XPFieldOption) pop();
00290         TLBrace node3 = (TLBrace) pop();
00291         PName node2 = (PName) pop();
00292         TCls node1 = (TCls) pop();
00293         AClassOption node = new AClassOption(node1, node2, node3, node4, node5, node6);
00294         return node;
00295     }
00296     Node new12()
00297     {
00298         TId node1 = (TId) pop();
00299         ASimpleName node = new ASimpleName(node1);
00300         return node;
00301     }
00302     Node new13()
00303     {
00304         TId node3 = (TId) pop();
00305         TDot node2 = (TDot) pop();
00306         PName node1 = (PName) pop();
00307         AQualifiedName node = new AQualifiedName(node1, node2, node3);
00308         return node;
00309     }
00310     Node new14()
00311     {
00312         TSemicolon node3 = (TSemicolon) pop();
00313         PName node2 = (PName) pop();
00314         TId node1 = (TId) pop();
00315         AFieldOption node = new AFieldOption(node1, node2, node3);
00316         return node;
00317     }
00318     Node new15()
00319     {
00320         TRBrace node7 = (TRBrace) pop();
00321         XPLocalOption node6 = null;
00322         TLBrace node5 = (TLBrace) pop();
00323         TRParen node4 = (TRParen) pop();
00324         PParams node3 = null;
00325         TLParen node2 = (TLParen) pop();
00326         TId node1 = (TId) pop();
00327         AMethodOption node = new AMethodOption(node1, node2, node3, node4, node5, node6, node7);
00328         return node;
00329     }
00330     Node new16()
00331     {
00332         TRBrace node7 = (TRBrace) pop();
00333         XPLocalOption node6 = null;
00334         TLBrace node5 = (TLBrace) pop();
00335         TRParen node4 = (TRParen) pop();
00336         PParams node3 = (PParams) pop();
00337         TLParen node2 = (TLParen) pop();
00338         TId node1 = (TId) pop();
00339         AMethodOption node = new AMethodOption(node1, node2, node3, node4, node5, node6, node7);
00340         return node;
00341     }
00342     Node new17()
00343     {
00344         TRBrace node7 = (TRBrace) pop();
00345         XPLocalOption node6 = (XPLocalOption) pop();
00346         TLBrace node5 = (TLBrace) pop();
00347         TRParen node4 = (TRParen) pop();
00348         PParams node3 = null;
00349         TLParen node2 = (TLParen) pop();
00350         TId node1 = (TId) pop();
00351         AMethodOption node = new AMethodOption(node1, node2, node3, node4, node5, node6, node7);
00352         return node;
00353     }
00354     Node new18()
00355     {
00356         PLocalOption node2 = (PLocalOption) pop();
00357         XPLocalOption node1 = (XPLocalOption) pop();
00358         X1PLocalOption node = new X1PLocalOption(node1, node2);
00359         return node;
00360     }
00361     Node new19()
00362     {
00363         PLocalOption node1 = (PLocalOption) pop();
00364         X2PLocalOption node = new X2PLocalOption(node1);
00365         return node;
00366     }
00367     Node new2()
00368     {
00369         PClassOption node2 = (PClassOption) pop();
00370         XPClassOption node1 = (XPClassOption) pop();
00371         X1PClassOption node = new X1PClassOption(node1, node2);
00372         return node;
00373     }
00374     Node new20()
00375     {
00376         TRBrace node7 = (TRBrace) pop();
00377         XPLocalOption node6 = (XPLocalOption) pop();
00378         TLBrace node5 = (TLBrace) pop();
00379         TRParen node4 = (TRParen) pop();
00380         PParams node3 = (PParams) pop();
00381         TLParen node2 = (TLParen) pop();
00382         TId node1 = (TId) pop();
00383         AMethodOption node = new AMethodOption(node1, node2, node3, node4, node5, node6, node7);
00384         return node;
00385     }
00386     Node new21()
00387     {
00388         XTDim node2 = null;
00389         PName node1 = (PName) pop();
00390         AParamParams node = new AParamParams(node1, node2);
00391         return node;
00392     }
00393     Node new22()
00394     {
00395         XTDim node2 = (XTDim) pop();
00396         PName node1 = (PName) pop();
00397         AParamParams node = new AParamParams(node1, node2);
00398         return node;
00399     }
00400     Node new23()
00401     {
00402         TDim node2 = (TDim) pop();
00403         XTDim node1 = (XTDim) pop();
00404         X1TDim node = new X1TDim(node1, node2);
00405         return node;
00406     }
00407     Node new24()
00408     {
00409         TDim node1 = (TDim) pop();
00410         X2TDim node = new X2TDim(node1);
00411         return node;
00412     }
00413     Node new25()
00414     {
00415         XTDim node4 = null;
00416         PName node3 = (PName) pop();
00417         TComma node2 = (TComma) pop();
00418         PParams node1 = (PParams) pop();
00419         AParamsParams node = new AParamsParams(node1, node2, node3, node4);
00420         return node;
00421     }
00422     Node new26()
00423     {
00424         XTDim node4 = (XTDim) pop();
00425         PName node3 = (PName) pop();
00426         TComma node2 = (TComma) pop();
00427         PParams node1 = (PParams) pop();
00428         AParamsParams node = new AParamsParams(node1, node2, node3, node4);
00429         return node;
00430     }
00431     Node new27()
00432     {
00433         TSemicolon node3 = (TSemicolon) pop();
00434         PName node2 = (PName) pop();
00435         TId node1 = (TId) pop();
00436         ALocalOption node = new ALocalOption(node1, node2, node3);
00437         return node;
00438     }
00439     Node new3()
00440     {
00441         PClassOption node1 = (PClassOption) pop();
00442         X2PClassOption node = new X2PClassOption(node1);
00443         return node;
00444     }
00445     Node new4()
00446     {
00447         TRBrace node6 = (TRBrace) pop();
00448         XPMethodOption node5 = null;
00449         XPFieldOption node4 = null;
00450         TLBrace node3 = (TLBrace) pop();
00451         PName node2 = (PName) pop();
00452         TCls node1 = (TCls) pop();
00453         AClassOption node = new AClassOption(node1, node2, node3, node4, node5, node6);
00454         return node;
00455     }
00456     Node new5()
00457     {
00458         TRBrace node6 = (TRBrace) pop();
00459         XPMethodOption node5 = null;
00460         XPFieldOption node4 = (XPFieldOption) pop();
00461         TLBrace node3 = (TLBrace) pop();
00462         PName node2 = (PName) pop();
00463         TCls node1 = (TCls) pop();
00464         AClassOption node = new AClassOption(node1, node2, node3, node4, node5, node6);
00465         return node;
00466     }
00467     Node new6()
00468     {
00469         PFieldOption node2 = (PFieldOption) pop();
00470         XPFieldOption node1 = (XPFieldOption) pop();
00471         X1PFieldOption node = new X1PFieldOption(node1, node2);
00472         return node;
00473     }
00474     Node new7()
00475     {
00476         PFieldOption node1 = (PFieldOption) pop();
00477         X2PFieldOption node = new X2PFieldOption(node1);
00478         return node;
00479     }
00480     Node new8()
00481     {
00482         TRBrace node6 = (TRBrace) pop();
00483         XPMethodOption node5 = (XPMethodOption) pop();
00484         XPFieldOption node4 = null;
00485         TLBrace node3 = (TLBrace) pop();
00486         PName node2 = (PName) pop();
00487         TCls node1 = (TCls) pop();
00488         AClassOption node = new AClassOption(node1, node2, node3, node4, node5, node6);
00489         return node;
00490     }
00491     Node new9()
00492     {
00493         PMethodOption node2 = (PMethodOption) pop();
00494         XPMethodOption node1 = (XPMethodOption) pop();
00495         X1PMethodOption node = new X1PMethodOption(node1, node2);
00496         return node;
00497     }
00498     public Start parse() throws ParserException, LexerException, IOException
00499     {
00500         push(0, null, false);
00501 
00502         List ign = null;
00503         while(true)
00504         {
00505             while(index(lexer.peek()) == -1)
00506             {
00507                 if(ign == null)
00508                 {
00509                     ign = new TypedLinkedList(NodeCast.instance);
00510                 }
00511 
00512                 ign.add(lexer.next());
00513             }
00514 
00515             if(ign != null)
00516             {
00517                 ignoredTokens.setIn(lexer.peek(), ign);
00518                 ign = null;
00519             }
00520 
00521             last_pos = lexer.peek().getPos();
00522             last_line = lexer.peek().getLine();
00523 
00524             int index = index(lexer.peek());
00525             action[0] = actionTable[state()][0][1];
00526             action[1] = actionTable[state()][0][2];
00527 
00528             int low = 1;
00529             int high = actionTable[state()].length - 1;
00530 
00531             while(low <= high)
00532             {
00533                 int middle = (low + high) / 2;
00534 
00535                 if(index < actionTable[state()][middle][0])
00536                 {
00537                     high = middle - 1;
00538                 }
00539                 else if(index > actionTable[state()][middle][0])
00540                 {
00541                     low = middle + 1;
00542                 }
00543                 else
00544                 {
00545                     action[0] = actionTable[state()][middle][1];
00546                     action[1] = actionTable[state()][middle][2];
00547                     break;
00548                 }
00549             }
00550 
00551             switch(action[0])
00552             {
00553                 case SHIFT:
00554                     push(action[1], lexer.next(), true);
00555                     last_shift = action[1];
00556                     break;
00557                 case REDUCE:
00558                     switch(action[1])
00559                     {
00560                     case 0: { Node node = new0(); push(goTo(0), node, true); } break;
00561                     case 1: { Node node = new1(); push(goTo(0), node, true); } break;
00562                     case 2: { Node node = new2(); push(goTo(7), node, false); } break;
00563                     case 3: { Node node = new3(); push(goTo(7), node, false); } break;
00564                     case 4: { Node node = new4(); push(goTo(1), node, true); } break;
00565                     case 5: { Node node = new5(); push(goTo(1), node, true); } break;
00566                     case 6: { Node node = new6(); push(goTo(8), node, false); } break;
00567                     case 7: { Node node = new7(); push(goTo(8), node, false); } break;
00568                     case 8: { Node node = new8(); push(goTo(1), node, true); } break;
00569                     case 9: { Node node = new9(); push(goTo(9), node, false); } break;
00570                     case 10: { Node node = new10(); push(goTo(9), node, false); } break;
00571                     case 11: { Node node = new11(); push(goTo(1), node, true); } break;
00572                     case 12: { Node node = new12(); push(goTo(2), node, true); } break;
00573                     case 13: { Node node = new13(); push(goTo(2), node, true); } break;
00574                     case 14: { Node node = new14(); push(goTo(3), node, true); } break;
00575                     case 15: { Node node = new15(); push(goTo(4), node, true); } break;
00576                     case 16: { Node node = new16(); push(goTo(4), node, true); } break;
00577                     case 17: { Node node = new17(); push(goTo(4), node, true); } break;
00578                     case 18: { Node node = new18(); push(goTo(10), node, false); } break;
00579                     case 19: { Node node = new19(); push(goTo(10), node, false); } break;
00580                     case 20: { Node node = new20(); push(goTo(4), node, true); } break;
00581                     case 21: { Node node = new21(); push(goTo(5), node, true); } break;
00582                     case 22: { Node node = new22(); push(goTo(5), node, true); } break;
00583                     case 23: { Node node = new23(); push(goTo(11), node, false); } break;
00584                     case 24: { Node node = new24(); push(goTo(11), node, false); } break;
00585                     case 25: { Node node = new25(); push(goTo(5), node, true); } break;
00586                     case 26: { Node node = new26(); push(goTo(5), node, true); } break;
00587                     case 27: { Node node = new27(); push(goTo(6), node, true); } break;
00588                     }
00589                     break;
00590                 case ACCEPT:
00591                     {
00592                         EOF node2 = (EOF) lexer.next();
00593                         PUnit node1 = (PUnit) pop();
00594                         Start node = new Start(node1, node2);
00595                         return node;
00596                     }
00597                 case ERROR:
00598                     throw new ParserException(
00599                         "[" + last_line + "," + last_pos + "] " +
00600                         errorMessages[errors[action[1]]]);
00601             }
00602         }
00603     }
00604     private Node pop()
00605     {
00606         return (Node) ((State) stack.previous()).node;
00607     }
00608     private void push(int state, Node node, boolean filter) throws ParserException, LexerException, IOException
00609     {
00610         this.node = node;
00611 
00612         if(filter)
00613         {
00614             filter();
00615         }
00616 
00617         if(!stack.hasNext())
00618         {
00619             stack.add(new State(state, this.node));
00620             return;
00621         }
00622 
00623         State s = (State) stack.next();
00624         s.state = state;
00625         s.node = this.node;
00626     }
00627     private int state()
00628     {
00629         State s = (State) stack.previous();
00630         stack.next();
00631         return s.state;
00632     }
00633 }

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