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

Parser.java

00001 package edu.ksu.cis.bandera.abstraction.specification.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.specification.lexer.*;
00039 import edu.ksu.cis.bandera.abstraction.specification.node.*;
00040 import edu.ksu.cis.bandera.abstraction.specification.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, ERROR, 0}, {34, SHIFT, 1}, },
00069             {{-1, ERROR, 1}, {54, SHIFT, 3}, },
00070             {{-1, ERROR, 2}, {55, ACCEPT, -1}, },
00071             {{-1, ERROR, 3}, {33, SHIFT, 4}, },
00072             {{-1, ERROR, 4}, {43, SHIFT, 5}, {44, SHIFT, 6}, },
00073             {{-1, REDUCE, 10}, },
00074             {{-1, REDUCE, 11}, },
00075             {{-1, ERROR, 7}, {35, SHIFT, 8}, },
00076             {{-1, ERROR, 8}, {38, SHIFT, 9}, },
00077             {{-1, ERROR, 9}, {9, SHIFT, 11}, },
00078             {{-1, ERROR, 10}, {37, SHIFT, 12}, {39, SHIFT, 13}, {40, SHIFT, 14}, },
00079             {{-1, ERROR, 11}, {2, SHIFT, 18}, },
00080             {{-1, ERROR, 12}, {0, SHIFT, 20}, },
00081             {{-1, ERROR, 13}, {9, SHIFT, 21}, },
00082             {{-1, ERROR, 14}, {9, SHIFT, 22}, },
00083             {{-1, ERROR, 15}, {37, SHIFT, 12}, {40, SHIFT, 14}, },
00084             {{-1, ERROR, 16}, {37, SHIFT, 12}, },
00085             {{-1, ERROR, 17}, {36, SHIFT, 26}, {42, SHIFT, 27}, {45, SHIFT, 28}, },
00086             {{-1, ERROR, 18}, {54, SHIFT, 33}, },
00087             {{-1, ERROR, 19}, {4, SHIFT, 35}, },
00088             {{-1, ERROR, 20}, {54, SHIFT, 36}, },
00089             {{-1, ERROR, 21}, {54, SHIFT, 37}, },
00090             {{-1, ERROR, 22}, {2, SHIFT, 38}, },
00091             {{-1, ERROR, 23}, {37, SHIFT, 12}, },
00092             {{-1, ERROR, 24}, {36, SHIFT, 40}, {42, SHIFT, 27}, {45, SHIFT, 28}, },
00093             {{-1, ERROR, 25}, {36, SHIFT, 42}, {42, SHIFT, 27}, {45, SHIFT, 28}, },
00094             {{-1, REDUCE, 0}, },
00095             {{-1, ERROR, 27}, {8, SHIFT, 44}, {10, SHIFT, 45}, {11, SHIFT, 46}, {12, SHIFT, 47}, {13, SHIFT, 48}, {14, SHIFT, 49}, },
00096             {{-1, ERROR, 28}, {23, SHIFT, 51}, {24, SHIFT, 52}, {25, SHIFT, 53}, {26, SHIFT, 54}, {27, SHIFT, 55}, },
00097             {{-1, REDUCE, 6}, },
00098             {{-1, REDUCE, 25}, },
00099             {{-1, REDUCE, 26}, },
00100             {{-1, ERROR, 32}, {36, SHIFT, 57}, {42, SHIFT, 27}, {45, SHIFT, 28}, },
00101             {{-1, REDUCE, 15}, },
00102             {{-1, ERROR, 34}, {3, SHIFT, 59}, {6, SHIFT, 60}, },
00103             {{-1, REDUCE, 12}, },
00104             {{-1, ERROR, 36}, {1, SHIFT, 61}, },
00105             {{-1, ERROR, 37}, {4, SHIFT, 62}, },
00106             {{-1, ERROR, 38}, {3, SHIFT, 63}, {54, SHIFT, 33}, },
00107             {{-1, ERROR, 39}, {36, SHIFT, 65}, {42, SHIFT, 27}, {45, SHIFT, 28}, },
00108             {{-1, REDUCE, 1}, },
00109             {{-1, ERROR, 41}, {36, SHIFT, 67}, {42, SHIFT, 27}, {45, SHIFT, 28}, },
00110             {{-1, REDUCE, 2}, },
00111             {{-1, ERROR, 43}, {36, SHIFT, 68}, {42, SHIFT, 27}, {45, SHIFT, 28}, },
00112             {{-1, REDUCE, 44}, },
00113             {{-1, REDUCE, 49}, },
00114             {{-1, REDUCE, 48}, },
00115             {{-1, REDUCE, 47}, },
00116             {{-1, REDUCE, 46}, },
00117             {{-1, REDUCE, 45}, },
00118             {{-1, ERROR, 50}, {54, SHIFT, 69}, },
00119             {{-1, REDUCE, 31}, },
00120             {{-1, REDUCE, 32}, },
00121             {{-1, REDUCE, 33}, },
00122             {{-1, REDUCE, 34}, },
00123             {{-1, REDUCE, 35}, },
00124             {{-1, ERROR, 56}, {54, SHIFT, 70}, },
00125             {{-1, REDUCE, 4}, },
00126             {{-1, REDUCE, 5}, },
00127             {{-1, REDUCE, 14}, },
00128             {{-1, ERROR, 60}, {54, SHIFT, 71}, },
00129             {{-1, ERROR, 61}, {35, SHIFT, 72}, },
00130             {{-1, REDUCE, 13}, },
00131             {{-1, ERROR, 63}, {4, SHIFT, 73}, },
00132             {{-1, ERROR, 64}, {3, SHIFT, 74}, {6, SHIFT, 60}, },
00133             {{-1, REDUCE, 3}, },
00134             {{-1, ERROR, 66}, {36, SHIFT, 75}, {42, SHIFT, 27}, {45, SHIFT, 28}, },
00135             {{-1, REDUCE, 7}, },
00136             {{-1, REDUCE, 8}, },
00137             {{-1, ERROR, 69}, {35, SHIFT, 76}, },
00138             {{-1, ERROR, 70}, {35, SHIFT, 77}, },
00139             {{-1, REDUCE, 16}, },
00140             {{-1, ERROR, 72}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {32, SHIFT, 83}, {36, SHIFT, 84}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00141             {{-1, REDUCE, 17}, },
00142             {{-1, ERROR, 74}, {4, SHIFT, 112}, },
00143             {{-1, REDUCE, 9}, },
00144             {{-1, ERROR, 76}, {0, SHIFT, 113}, {32, SHIFT, 114}, {36, SHIFT, 115}, },
00145             {{-1, ERROR, 77}, {0, SHIFT, 113}, {32, SHIFT, 114}, {36, SHIFT, 118}, },
00146             {{-1, ERROR, 78}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00147             {{-1, ERROR, 79}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00148             {{-1, ERROR, 80}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00149             {{-1, ERROR, 81}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00150             {{-1, ERROR, 82}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00151             {{-1, ERROR, 83}, {31, SHIFT, 125}, },
00152             {{-1, REDUCE, 19}, },
00153             {{-1, REDUCE, 91}, },
00154             {{-1, REDUCE, 92}, },
00155             {{-1, REDUCE, 93}, },
00156             {{-1, REDUCE, 94}, },
00157             {{-1, REDUCE, 95}, },
00158             {{-1, REDUCE, 96}, },
00159             {{-1, REDUCE, 98}, },
00160             {{-1, REDUCE, 97}, },
00161             {{-1, REDUCE, 52}, },
00162             {{-1, REDUCE, 22}, },
00163             {{-1, REDUCE, 53}, },
00164             {{-1, REDUCE, 58}, },
00165             {{-1, REDUCE, 59}, },
00166             {{-1, REDUCE, 63}, {25, SHIFT, 126}, {26, SHIFT, 127}, {27, SHIFT, 128}, },
00167             {{-1, REDUCE, 66}, {23, SHIFT, 129}, {24, SHIFT, 130}, },
00168             {{-1, REDUCE, 70}, {17, SHIFT, 131}, {18, SHIFT, 132}, {19, SHIFT, 133}, },
00169             {{-1, REDUCE, 75}, {10, SHIFT, 134}, {11, SHIFT, 135}, {12, SHIFT, 136}, {13, SHIFT, 137}, },
00170             {{-1, REDUCE, 78}, {8, SHIFT, 138}, {14, SHIFT, 139}, },
00171             {{-1, REDUCE, 80}, {30, SHIFT, 140}, },
00172             {{-1, REDUCE, 82}, {28, SHIFT, 141}, },
00173             {{-1, REDUCE, 84}, {29, SHIFT, 142}, },
00174             {{-1, REDUCE, 86}, {15, SHIFT, 143}, },
00175             {{-1, REDUCE, 88}, {16, SHIFT, 144}, {22, SHIFT, 145}, },
00176             {{-1, REDUCE, 90}, },
00177             {{-1, ERROR, 109}, {31, SHIFT, 146}, },
00178             {{-1, REDUCE, 50}, },
00179             {{-1, ERROR, 111}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {32, SHIFT, 83}, {36, SHIFT, 147}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00180             {{-1, REDUCE, 18}, },
00181             {{-1, ERROR, 113}, {32, SHIFT, 149}, {54, SHIFT, 150}, },
00182             {{-1, ERROR, 114}, {31, SHIFT, 152}, },
00183             {{-1, REDUCE, 42}, },
00184             {{-1, REDUCE, 30}, },
00185             {{-1, ERROR, 117}, {0, SHIFT, 113}, {32, SHIFT, 114}, {36, SHIFT, 153}, },
00186             {{-1, REDUCE, 27}, },
00187             {{-1, ERROR, 119}, {0, SHIFT, 113}, {32, SHIFT, 114}, {36, SHIFT, 155}, },
00188             {{-1, ERROR, 120}, {1, SHIFT, 156}, },
00189             {{-1, REDUCE, 54}, },
00190             {{-1, REDUCE, 55}, },
00191             {{-1, REDUCE, 56}, },
00192             {{-1, REDUCE, 57}, },
00193             {{-1, ERROR, 125}, {54, SHIFT, 157}, },
00194             {{-1, ERROR, 126}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00195             {{-1, ERROR, 127}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00196             {{-1, ERROR, 128}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00197             {{-1, ERROR, 129}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00198             {{-1, ERROR, 130}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00199             {{-1, ERROR, 131}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00200             {{-1, ERROR, 132}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00201             {{-1, ERROR, 133}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00202             {{-1, ERROR, 134}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00203             {{-1, ERROR, 135}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00204             {{-1, ERROR, 136}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00205             {{-1, ERROR, 137}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00206             {{-1, ERROR, 138}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00207             {{-1, ERROR, 139}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00208             {{-1, ERROR, 140}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00209             {{-1, ERROR, 141}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00210             {{-1, ERROR, 142}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00211             {{-1, ERROR, 143}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00212             {{-1, ERROR, 144}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00213             {{-1, ERROR, 145}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00214             {{-1, ERROR, 146}, {54, SHIFT, 178}, },
00215             {{-1, REDUCE, 20}, },
00216             {{-1, REDUCE, 21}, },
00217             {{-1, REDUCE, 39}, },
00218             {{-1, REDUCE, 38}, },
00219             {{-1, ERROR, 151}, {6, SHIFT, 179}, },
00220             {{-1, ERROR, 152}, {2, SHIFT, 18}, {54, SHIFT, 180}, },
00221             {{-1, REDUCE, 43}, },
00222             {{-1, REDUCE, 29}, },
00223             {{-1, REDUCE, 28}, },
00224             {{-1, REDUCE, 51}, },
00225             {{-1, ERROR, 157}, {4, SHIFT, 183}, },
00226             {{-1, REDUCE, 60}, },
00227             {{-1, REDUCE, 61}, },
00228             {{-1, REDUCE, 62}, },
00229             {{-1, REDUCE, 64}, {25, SHIFT, 126}, {26, SHIFT, 127}, {27, SHIFT, 128}, },
00230             {{-1, REDUCE, 65}, {25, SHIFT, 126}, {26, SHIFT, 127}, {27, SHIFT, 128}, },
00231             {{-1, REDUCE, 67}, {23, SHIFT, 129}, {24, SHIFT, 130}, },
00232             {{-1, REDUCE, 68}, {23, SHIFT, 129}, {24, SHIFT, 130}, },
00233             {{-1, REDUCE, 69}, {23, SHIFT, 129}, {24, SHIFT, 130}, },
00234             {{-1, REDUCE, 71}, {17, SHIFT, 131}, {18, SHIFT, 132}, {19, SHIFT, 133}, },
00235             {{-1, REDUCE, 72}, {17, SHIFT, 131}, {18, SHIFT, 132}, {19, SHIFT, 133}, },
00236             {{-1, REDUCE, 73}, {17, SHIFT, 131}, {18, SHIFT, 132}, {19, SHIFT, 133}, },
00237             {{-1, REDUCE, 74}, {17, SHIFT, 131}, {18, SHIFT, 132}, {19, SHIFT, 133}, },
00238             {{-1, REDUCE, 76}, {10, SHIFT, 134}, {11, SHIFT, 135}, {12, SHIFT, 136}, {13, SHIFT, 137}, },
00239             {{-1, REDUCE, 77}, {10, SHIFT, 134}, {11, SHIFT, 135}, {12, SHIFT, 136}, {13, SHIFT, 137}, },
00240             {{-1, REDUCE, 79}, {8, SHIFT, 138}, {14, SHIFT, 139}, },
00241             {{-1, REDUCE, 81}, {30, SHIFT, 140}, },
00242             {{-1, REDUCE, 83}, {28, SHIFT, 141}, },
00243             {{-1, REDUCE, 85}, {29, SHIFT, 142}, },
00244             {{-1, REDUCE, 87}, {15, SHIFT, 143}, },
00245             {{-1, ERROR, 177}, {5, SHIFT, 184}, },
00246             {{-1, ERROR, 178}, {4, SHIFT, 185}, },
00247             {{-1, ERROR, 179}, {32, SHIFT, 149}, {54, SHIFT, 150}, },
00248             {{-1, REDUCE, 40}, },
00249             {{-1, REDUCE, 41}, },
00250             {{-1, ERROR, 182}, {4, SHIFT, 187}, },
00251             {{-1, REDUCE, 23}, },
00252             {{-1, ERROR, 184}, {0, SHIFT, 78}, {20, SHIFT, 79}, {21, SHIFT, 80}, {23, SHIFT, 81}, {24, SHIFT, 82}, {46, SHIFT, 85}, {47, SHIFT, 86}, {48, SHIFT, 87}, {49, SHIFT, 88}, {50, SHIFT, 89}, {51, SHIFT, 90}, {52, SHIFT, 91}, {53, SHIFT, 92}, {54, SHIFT, 93}, },
00253             {{-1, REDUCE, 24}, },
00254             {{-1, ERROR, 186}, {1, SHIFT, 189}, },
00255             {{-1, REDUCE, 36}, },
00256             {{-1, REDUCE, 89}, },
00257             {{-1, ERROR, 189}, {31, SHIFT, 190}, },
00258             {{-1, ERROR, 190}, {2, SHIFT, 18}, {54, SHIFT, 180}, },
00259             {{-1, ERROR, 191}, {4, SHIFT, 192}, },
00260             {{-1, REDUCE, 37}, },
00261         };*/
00262     private static int[][][] gotoTable;
00263 /*      {
00264             {{-1, 2}, },
00265             {{-1, 7}, },
00266             {{-1, 10}, },
00267             {{-1, 15}, },
00268             {{-1, 181}, {11, 19}, },
00269             {{-1, 34}, {38, 64}, },
00270             {{-1, 16}, {15, 23}, },
00271             {{-1, 17}, {15, 24}, {16, 25}, {23, 39}, },
00272             {{-1, 94}, {111, 148}, },
00273             {{-1, 29}, {32, 58}, {41, 58}, {43, 58}, {66, 58}, },
00274             {{-1, 30}, },
00275             {{-1, 56}, },
00276             {{-1, 116}, {117, 154}, {119, 154}, },
00277             {{-1, 151}, {179, 186}, },
00278             {{-1, 182}, {190, 191}, },
00279             {{-1, 31}, },
00280             {{-1, 50}, },
00281             {{-1, 95}, },
00282             {{-1, 96}, },
00283             {{-1, 97}, {79, 121}, {80, 122}, {81, 123}, {82, 124}, {126, 158}, {127, 159}, {128, 160}, },
00284             {{-1, 98}, {129, 161}, {130, 162}, },
00285             {{-1, 99}, {131, 163}, {132, 164}, {133, 165}, },
00286             {{-1, 100}, {134, 166}, {135, 167}, {136, 168}, {137, 169}, },
00287             {{-1, 101}, {138, 170}, {139, 171}, },
00288             {{-1, 102}, {140, 172}, },
00289             {{-1, 103}, {141, 173}, },
00290             {{-1, 104}, {142, 174}, },
00291             {{-1, 105}, {143, 175}, },
00292             {{-1, 106}, {144, 176}, },
00293             {{-1, 107}, },
00294             {{-1, 108}, {184, 188}, },
00295             {{-1, 109}, {78, 120}, {145, 177}, },
00296             {{-1, 110}, },
00297             {{-1, 32}, {24, 41}, {25, 43}, {39, 66}, },
00298             {{-1, 111}, },
00299             {{-1, 117}, {77, 119}, },
00300         };*/
00301     private static String[] errorMessages;
00302 /*      {
00303             "TAbstraction expected.",
00304             "TId expected.",
00305             "EOF expected.",
00306             "TExtends expected.",
00307             "TReal TIntegral expected.",
00308             "TBegin expected.",
00309             "TTokens expected.",
00310             "TEq expected.",
00311             "TAbstract TDefault TOne2one expected.",
00312             "TLBrace expected.",
00313             "TLParen expected.",
00314             "TAbstract TOne2one expected.",
00315             "TAbstract expected.",
00316             "TEnd TTest TOperator expected.",
00317             "TSemicolon expected.",
00318             "TEqual TLess TGreater TLessEqual TGreaterEqual TNotEqual expected.",
00319             "TPlus TMinus TTimes TDiv TMod expected.",
00320             "TRBrace TComma expected.",
00321             "TRParen expected.",
00322             "TRBrace TId expected.",
00323             "TLParen TNot TBitComplement TPlus TMinus TAny TEnd TDecIntLiteral THexIntLiteral TOctIntLiteral TDecLongLiteral THexLongLiteral TOctLongLiteral TDoubleLiteral TFloatLiteral TId expected.",
00324             "TLParen TAny TEnd expected.",
00325             "TLParen TNot TBitComplement TPlus TMinus TDecIntLiteral THexIntLiteral TOctIntLiteral TDecLongLiteral THexLongLiteral TOctLongLiteral TDoubleLiteral TFloatLiteral TId expected.",
00326             "TRightarrow expected.",
00327             "TRParen TColon TEqual TLess TGreater TLessEqual TGreaterEqual TNotEqual TAnd TOr TShiftLeft TSignedShiftRight TUnsignedShiftRight TQuestion TPlus TMinus TTimes TDiv TMod TBitXor TBitOr TBitAnd TRightarrow expected.",
00328             "TRParen TColon TEqual TLess TGreater TLessEqual TGreaterEqual TNotEqual TAnd TOr TShiftLeft TSignedShiftRight TUnsignedShiftRight TQuestion TPlus TMinus TBitXor TBitOr TBitAnd TRightarrow expected.",
00329             "TRParen TColon TEqual TLess TGreater TLessEqual TGreaterEqual TNotEqual TAnd TOr TShiftLeft TSignedShiftRight TUnsignedShiftRight TQuestion TBitXor TBitOr TBitAnd TRightarrow expected.",
00330             "TRParen TColon TEqual TLess TGreater TLessEqual TGreaterEqual TNotEqual TAnd TOr TQuestion TBitXor TBitOr TBitAnd TRightarrow expected.",
00331             "TRParen TColon TEqual TNotEqual TAnd TOr TQuestion TBitXor TBitOr TBitAnd TRightarrow expected.",
00332             "TRParen TColon TAnd TOr TQuestion TBitXor TBitOr TBitAnd TRightarrow expected.",
00333             "TRParen TColon TAnd TOr TQuestion TBitXor TBitOr TRightarrow expected.",
00334             "TRParen TColon TAnd TOr TQuestion TBitOr TRightarrow expected.",
00335             "TRParen TColon TAnd TOr TQuestion TRightarrow expected.",
00336             "TRParen TColon TOr TQuestion TRightarrow expected.",
00337             "TRParen TColon TRightarrow expected.",
00338             "TAny TId expected.",
00339             "TRParen TComma expected.",
00340             "TComma expected.",
00341             "TLBrace TId expected.",
00342             "TColon expected.",
00343         };*/
00344     private static int[] errors;
00345 /*      {
00346             0, 1, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9, 10, 7, 7, 11, 12, 13, 1, 14, 1, 1, 9, 12, 13, 13, 2, 15, 16, 13, 13, 13, 13, 17, 17, 8, 18, 14, 19, 13, 2, 13, 2, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 13, 14, 1, 5, 11, 14, 17, 2, 13, 2, 2, 5, 5, 17, 20, 12, 14, 2, 21, 21, 22, 22, 22, 22, 22, 23, 13, 24, 24, 24, 24, 24, 24, 24, 24, 24, 20, 24, 24, 24, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 23, 24, 20, 12, 35, 23, 13, 21, 21, 13, 21, 18, 24, 24, 24, 24, 1, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 1, 13, 20, 36, 36, 37, 38, 13, 21, 13, 24, 14, 24, 24, 24, 24, 24, 25, 25, 25, 26, 26, 26, 26, 27, 27, 28, 29, 30, 31, 32, 39, 14, 35, 14, 14, 14, 20, 22, 20, 18, 21, 34, 23, 38, 14, 21, 
00347         };*/
00348     public Parser(Lexer lexer)
00349     {
00350         this.lexer = lexer;
00351 
00352         if(actionTable == null)
00353         {
00354             try
00355             {
00356                 DataInputStream s = new DataInputStream(
00357                     new BufferedInputStream(
00358                     Parser.class.getResourceAsStream("parser.dat")));
00359 
00360                 // read actionTable
00361                 int length = s.readInt();
00362                 actionTable = new int[length][][];
00363                 for(int i = 0; i < actionTable.length; i++)
00364                 {
00365                     length = s.readInt();
00366                     actionTable[i] = new int[length][3];
00367                     for(int j = 0; j < actionTable[i].length; j++)
00368                     {
00369                         for(int k = 0; k < 3; k++)
00370                         {
00371                             actionTable[i][j][k] = s.readInt();
00372                         }
00373                     }
00374                 }
00375 
00376                 // read gotoTable
00377                 length = s.readInt();
00378                 gotoTable = new int[length][][];
00379                 for(int i = 0; i < gotoTable.length; i++)
00380                 {
00381                     length = s.readInt();
00382                     gotoTable[i] = new int[length][2];
00383                     for(int j = 0; j < gotoTable[i].length; j++)
00384                     {
00385                         for(int k = 0; k < 2; k++)
00386                         {
00387                             gotoTable[i][j][k] = s.readInt();
00388                         }
00389                     }
00390                 }
00391 
00392                 // read errorMessages
00393                 length = s.readInt();
00394                 errorMessages = new String[length];
00395                 for(int i = 0; i < errorMessages.length; i++)
00396                 {
00397                     length = s.readInt();
00398                     StringBuffer buffer = new StringBuffer();
00399 
00400                     for(int j = 0; j < length; j++)
00401                     {
00402                         buffer.append(s.readChar());
00403                     }
00404                     errorMessages[i] = buffer.toString();
00405                 }
00406 
00407                 // read errors
00408                 length = s.readInt();
00409                 errors = new int[length];
00410                 for(int i = 0; i < errors.length; i++)
00411                 {
00412                     errors[i] = s.readInt();
00413                 }
00414 
00415                 s.close();
00416             }
00417             catch(Exception e)
00418             {
00419                 throw new RuntimeException("Unable to read parser.dat.");
00420             }
00421         }
00422     }
00423     protected void filter() throws ParserException, LexerException, IOException
00424     {
00425     }
00426     private int goTo(int index)
00427     {
00428         int state = state();
00429         int low = 1;
00430         int high = gotoTable[index].length - 1;
00431         int value = gotoTable[index][0][1];
00432 
00433         while(low <= high)
00434         {
00435             int middle = (low + high) / 2;
00436 
00437             if(state < gotoTable[index][middle][0])
00438             {
00439                 high = middle - 1;
00440             }
00441             else if(state > gotoTable[index][middle][0])
00442             {
00443                 low = middle + 1;
00444             }
00445             else
00446             {
00447                 value = gotoTable[index][middle][1];
00448                 break;
00449             }
00450         }
00451 
00452         return value;
00453     }
00454     private int index(Switchable token)
00455     {
00456         converter.index = -1;
00457         token.apply(converter);
00458         return converter.index;
00459     }
00460     Node new0()
00461     {
00462         TEnd node11 = (TEnd) pop();
00463         XPOperatorTest node10 = null;
00464         PAbstractFunction node9 = (PAbstractFunction) pop();
00465         POne2oneSet node8 = null;
00466         PDefaultToken node7 = null;
00467         PTokenSet node6 = (PTokenSet) pop();
00468         TBegin node5 = (TBegin) pop();
00469         PType node4 = (PType) pop();
00470         TExtends node3 = (TExtends) pop();
00471         TId node2 = (TId) pop();
00472         TAbstraction node1 = (TAbstraction) pop();
00473         AUnit node = new AUnit(node1, node2, node3, node4, node5, node6, node7, node8, node9, node10, node11);
00474         return node;
00475     }
00476     Node new1()
00477     {
00478         TEnd node11 = (TEnd) pop();
00479         XPOperatorTest node10 = null;
00480         PAbstractFunction node9 = (PAbstractFunction) pop();
00481         POne2oneSet node8 = null;
00482         PDefaultToken node7 = (PDefaultToken) pop();
00483         PTokenSet node6 = (PTokenSet) pop();
00484         TBegin node5 = (TBegin) pop();
00485         PType node4 = (PType) pop();
00486         TExtends node3 = (TExtends) pop();
00487         TId node2 = (TId) pop();
00488         TAbstraction node1 = (TAbstraction) pop();
00489         AUnit node = new AUnit(node1, node2, node3, node4, node5, node6, node7, node8, node9, node10, node11);
00490         return node;
00491     }
00492     Node new10()
00493     {
00494         TReal node1 = (TReal) pop();
00495         ARealType node = new ARealType(node1);
00496         return node;
00497     }
00498     Node new11()
00499     {
00500         TIntegral node1 = (TIntegral) pop();
00501         AIntegralType node = new AIntegralType(node1);
00502         return node;
00503     }
00504     Node new12()
00505     {
00506         TSemicolon node4 = (TSemicolon) pop();
00507         PIdSet node3 = (PIdSet) pop();
00508         TEq node2 = (TEq) pop();
00509         TTokens node1 = (TTokens) pop();
00510         ATokenSet node = new ATokenSet(node1, node2, node3, node4);
00511         return node;
00512     }
00513     Node new13()
00514     {
00515         TSemicolon node4 = (TSemicolon) pop();
00516         TId node3 = (TId) pop();
00517         TEq node2 = (TEq) pop();
00518         TDefault node1 = (TDefault) pop();
00519         ADefaultToken node = new ADefaultToken(node1, node2, node3, node4);
00520         return node;
00521     }
00522     Node new14()
00523     {
00524         TRBrace node3 = (TRBrace) pop();
00525         PIdList node2 = (PIdList) pop();
00526         TLBrace node1 = (TLBrace) pop();
00527         AIdSet node = new AIdSet(node1, node2, node3);
00528         return node;
00529     }
00530     Node new15()
00531     {
00532         TId node1 = (TId) pop();
00533         AIdIdList node = new AIdIdList(node1);
00534         return node;
00535     }
00536     Node new16()
00537     {
00538         TId node3 = (TId) pop();
00539         TComma node2 = (TComma) pop();
00540         PIdList node1 = (PIdList) pop();
00541         AIdsIdList node = new AIdsIdList(node1, node2, node3);
00542         return node;
00543     }
00544     Node new17()
00545     {
00546         TSemicolon node6 = (TSemicolon) pop();
00547         TRBrace node5 = (TRBrace) pop();
00548         PIdList node4 = null;
00549         TLBrace node3 = (TLBrace) pop();
00550         TEq node2 = (TEq) pop();
00551         TOne2one node1 = (TOne2one) pop();
00552         AOne2oneSet node = new AOne2oneSet(node1, node2, node3, node4, node5, node6);
00553         return node;
00554     }
00555     Node new18()
00556     {
00557         TSemicolon node6 = (TSemicolon) pop();
00558         TRBrace node5 = (TRBrace) pop();
00559         PIdList node4 = (PIdList) pop();
00560         TLBrace node3 = (TLBrace) pop();
00561         TEq node2 = (TEq) pop();
00562         TOne2one node1 = (TOne2one) pop();
00563         AOne2oneSet node = new AOne2oneSet(node1, node2, node3, node4, node5, node6);
00564         return node;
00565     }
00566     Node new19()
00567     {
00568         TEnd node7 = (TEnd) pop();
00569         XPAbstractDef node6 = null;
00570         TBegin node5 = (TBegin) pop();
00571         TRParen node4 = (TRParen) pop();
00572         TId node3 = (TId) pop();
00573         TLParen node2 = (TLParen) pop();
00574         TAbstract node1 = (TAbstract) pop();
00575         AAbstractFunction node = new AAbstractFunction(node1, node2, node3, node4, node5, node6, node7);
00576         return node;
00577     }
00578     Node new2()
00579     {
00580         TEnd node11 = (TEnd) pop();
00581         XPOperatorTest node10 = null;
00582         PAbstractFunction node9 = (PAbstractFunction) pop();
00583         POne2oneSet node8 = (POne2oneSet) pop();
00584         PDefaultToken node7 = null;
00585         PTokenSet node6 = (PTokenSet) pop();
00586         TBegin node5 = (TBegin) pop();
00587         PType node4 = (PType) pop();
00588         TExtends node3 = (TExtends) pop();
00589         TId node2 = (TId) pop();
00590         TAbstraction node1 = (TAbstraction) pop();
00591         AUnit node = new AUnit(node1, node2, node3, node4, node5, node6, node7, node8, node9, node10, node11);
00592         return node;
00593     }
00594     Node new20()
00595     {
00596         TEnd node7 = (TEnd) pop();
00597         XPAbstractDef node6 = (XPAbstractDef) pop();
00598         TBegin node5 = (TBegin) pop();
00599         TRParen node4 = (TRParen) pop();
00600         TId node3 = (TId) pop();
00601         TLParen node2 = (TLParen) pop();
00602         TAbstract node1 = (TAbstract) pop();
00603         AAbstractFunction node = new AAbstractFunction(node1, node2, node3, node4, node5, node6, node7);
00604         return node;
00605     }
00606     Node new21()
00607     {
00608         PAbstractDef node2 = (PAbstractDef) pop();
00609         XPAbstractDef node1 = (XPAbstractDef) pop();
00610         X1PAbstractDef node = new X1PAbstractDef(node1, node2);
00611         return node;
00612     }
00613     Node new22()
00614     {
00615         PAbstractDef node1 = (PAbstractDef) pop();
00616         X2PAbstractDef node = new X2PAbstractDef(node1);
00617         return node;
00618     }
00619     Node new23()
00620     {
00621         TSemicolon node4 = (TSemicolon) pop();
00622         TId node3 = (TId) pop();
00623         TRightarrow node2 = (TRightarrow) pop();
00624         TAny node1 = (TAny) pop();
00625         AAnyAbstractDef node = new AAnyAbstractDef(node1, node2, node3, node4);
00626         return node;
00627     }
00628     Node new24()
00629     {
00630         TSemicolon node4 = (TSemicolon) pop();
00631         TId node3 = (TId) pop();
00632         TRightarrow node2 = (TRightarrow) pop();
00633         PExp node1 = (PExp) pop();
00634         AExpAbstractDef node = new AExpAbstractDef(node1, node2, node3, node4);
00635         return node;
00636     }
00637     Node new25()
00638     {
00639         POperator node1 = (POperator) pop();
00640         AOperatorOperatorTest node = new AOperatorOperatorTest(node1);
00641         return node;
00642     }
00643     Node new26()
00644     {
00645         PTest node1 = (PTest) pop();
00646         ATestOperatorTest node = new ATestOperatorTest(node1);
00647         return node;
00648     }
00649     Node new27()
00650     {
00651         TEnd node6 = (TEnd) pop();
00652         XPPattern node5 = null;
00653         TBegin node4 = (TBegin) pop();
00654         TId node3 = (TId) pop();
00655         POp node2 = (POp) pop();
00656         TOperator node1 = (TOperator) pop();
00657         AOperator node = new AOperator(node1, node2, node3, node4, node5, node6);
00658         return node;
00659     }
00660     Node new28()
00661     {
00662         TEnd node6 = (TEnd) pop();
00663         XPPattern node5 = (XPPattern) pop();
00664         TBegin node4 = (TBegin) pop();
00665         TId node3 = (TId) pop();
00666         POp node2 = (POp) pop();
00667         TOperator node1 = (TOperator) pop();
00668         AOperator node = new AOperator(node1, node2, node3, node4, node5, node6);
00669         return node;
00670     }
00671     Node new29()
00672     {
00673         PPattern node2 = (PPattern) pop();
00674         XPPattern node1 = (XPPattern) pop();
00675         X1PPattern node = new X1PPattern(node1, node2);
00676         return node;
00677     }
00678     Node new3()
00679     {
00680         TEnd node11 = (TEnd) pop();
00681         XPOperatorTest node10 = null;
00682         PAbstractFunction node9 = (PAbstractFunction) pop();
00683         POne2oneSet node8 = (POne2oneSet) pop();
00684         PDefaultToken node7 = (PDefaultToken) pop();
00685         PTokenSet node6 = (PTokenSet) pop();
00686         TBegin node5 = (TBegin) pop();
00687         PType node4 = (PType) pop();
00688         TExtends node3 = (TExtends) pop();
00689         TId node2 = (TId) pop();
00690         TAbstraction node1 = (TAbstraction) pop();
00691         AUnit node = new AUnit(node1, node2, node3, node4, node5, node6, node7, node8, node9, node10, node11);
00692         return node;
00693     }
00694     Node new30()
00695     {
00696         PPattern node1 = (PPattern) pop();
00697         X2PPattern node = new X2PPattern(node1);
00698         return node;
00699     }
00700     Node new31()
00701     {
00702         TPlus node1 = (TPlus) pop();
00703         APlusOp node = new APlusOp(node1);
00704         return node;
00705     }
00706     Node new32()
00707     {
00708         TMinus node1 = (TMinus) pop();
00709         AMinusOp node = new AMinusOp(node1);
00710         return node;
00711     }
00712     Node new33()
00713     {
00714         TTimes node1 = (TTimes) pop();
00715         ATimesOp node = new ATimesOp(node1);
00716         return node;
00717     }
00718     Node new34()
00719     {
00720         TDiv node1 = (TDiv) pop();
00721         ADivOp node = new ADivOp(node1);
00722         return node;
00723     }
00724     Node new35()
00725     {
00726         TMod node1 = (TMod) pop();
00727         AModOp node = new AModOp(node1);
00728         return node;
00729     }
00730     Node new36()
00731     {
00732         TSemicolon node4 = (TSemicolon) pop();
00733         PTokenTokenSet node3 = (PTokenTokenSet) pop();
00734         TRightarrow node2 = (TRightarrow) pop();
00735         TAny node1 = (TAny) pop();
00736         AAnyPattern node = new AAnyPattern(node1, node2, node3, node4);
00737         return node;
00738     }
00739     Node new37()
00740     {
00741         TSemicolon node8 = (TSemicolon) pop();
00742         PTokenTokenSet node7 = (PTokenTokenSet) pop();
00743         TRightarrow node6 = (TRightarrow) pop();
00744         TRParen node5 = (TRParen) pop();
00745         PAnyId node4 = (PAnyId) pop();
00746         TComma node3 = (TComma) pop();
00747         PAnyId node2 = (PAnyId) pop();
00748         TLParen node1 = (TLParen) pop();
00749         APatternPattern node = new APatternPattern(node1, node2, node3, node4, node5, node6, node7, node8);
00750         return node;
00751     }
00752     Node new38()
00753     {
00754         TId node1 = (TId) pop();
00755         AIdAnyId node = new AIdAnyId(node1);
00756         return node;
00757     }
00758     Node new39()
00759     {
00760         TAny node1 = (TAny) pop();
00761         AAnyAnyId node = new AAnyAnyId(node1);
00762         return node;
00763     }
00764     Node new4()
00765     {
00766         TEnd node11 = (TEnd) pop();
00767         XPOperatorTest node10 = (XPOperatorTest) pop();
00768         PAbstractFunction node9 = (PAbstractFunction) pop();
00769         POne2oneSet node8 = null;
00770         PDefaultToken node7 = null;
00771         PTokenSet node6 = (PTokenSet) pop();
00772         TBegin node5 = (TBegin) pop();
00773         PType node4 = (PType) pop();
00774         TExtends node3 = (TExtends) pop();
00775         TId node2 = (TId) pop();
00776         TAbstraction node1 = (TAbstraction) pop();
00777         AUnit node = new AUnit(node1, node2, node3, node4, node5, node6, node7, node8, node9, node10, node11);
00778         return node;
00779     }
00780     Node new40()
00781     {
00782         TId node1 = (TId) pop();
00783         ATokenTokenTokenSet node = new ATokenTokenTokenSet(node1);
00784         return node;
00785     }
00786     Node new41()
00787     {
00788         PIdSet node1 = (PIdSet) pop();
00789         ATokenSetTokenTokenSet node = new ATokenSetTokenTokenSet(node1);
00790         return node;
00791     }
00792     Node new42()
00793     {
00794         TEnd node6 = (TEnd) pop();
00795         XPPattern node5 = null;
00796         TBegin node4 = (TBegin) pop();
00797         TId node3 = (TId) pop();
00798         PTOp node2 = (PTOp) pop();
00799         TTest node1 = (TTest) pop();
00800         ATest node = new ATest(node1, node2, node3, node4, node5, node6);
00801         return node;
00802     }
00803     Node new43()
00804     {
00805         TEnd node6 = (TEnd) pop();
00806         XPPattern node5 = (XPPattern) pop();
00807         TBegin node4 = (TBegin) pop();
00808         TId node3 = (TId) pop();
00809         PTOp node2 = (PTOp) pop();
00810         TTest node1 = (TTest) pop();
00811         ATest node = new ATest(node1, node2, node3, node4, node5, node6);
00812         return node;
00813     }
00814     Node new44()
00815     {
00816         TEqual node1 = (TEqual) pop();
00817         AEqualTOp node = new AEqualTOp(node1);
00818         return node;
00819     }
00820     Node new45()
00821     {
00822         TNotEqual node1 = (TNotEqual) pop();
00823         ANotEqualTOp node = new ANotEqualTOp(node1);
00824         return node;
00825     }
00826     Node new46()
00827     {
00828         TGreaterEqual node1 = (TGreaterEqual) pop();
00829         AGreaterEqualTOp node = new AGreaterEqualTOp(node1);
00830         return node;
00831     }
00832     Node new47()
00833     {
00834         TLessEqual node1 = (TLessEqual) pop();
00835         ALessEqualTOp node = new ALessEqualTOp(node1);
00836         return node;
00837     }
00838     Node new48()
00839     {
00840         TGreater node1 = (TGreater) pop();
00841         AGreaterTOp node = new AGreaterTOp(node1);
00842         return node;
00843     }
00844     Node new49()
00845     {
00846         TLess node1 = (TLess) pop();
00847         ALessTOp node = new ALessTOp(node1);
00848         return node;
00849     }
00850     Node new5()
00851     {
00852         POperatorTest node2 = (POperatorTest) pop();
00853         XPOperatorTest node1 = (XPOperatorTest) pop();
00854         X1POperatorTest node = new X1POperatorTest(node1, node2);
00855         return node;
00856     }
00857     Node new50()
00858     {
00859         PLiteral node1 = (PLiteral) pop();
00860         ALiteralPrimaryExp node = new ALiteralPrimaryExp(node1);
00861         return node;
00862     }
00863     Node new51()
00864     {
00865         TRParen node3 = (TRParen) pop();
00866         PExp node2 = (PExp) pop();
00867         TLParen node1 = (TLParen) pop();
00868         AParenPrimaryExp node = new AParenPrimaryExp(node1, node2, node3);
00869         return node;
00870     }
00871     Node new52()
00872     {
00873         TId node1 = (TId) pop();
00874         AIdPrimaryExp node = new AIdPrimaryExp(node1);
00875         return node;
00876     }
00877     Node new53()
00878     {
00879         PPrimaryExp node1 = (PPrimaryExp) pop();
00880         APrimaryUnaryNotPlusMinusExp node = new APrimaryUnaryNotPlusMinusExp(node1);
00881         return node;
00882     }
00883     Node new54()
00884     {
00885         PUnaryExp node2 = (PUnaryExp) pop();
00886         TNot node1 = (TNot) pop();
00887         AComplementUnaryNotPlusMinusExp node = new AComplementUnaryNotPlusMinusExp(node1, node2);
00888         return node;
00889     }
00890     Node new55()
00891     {
00892         PUnaryExp node2 = (PUnaryExp) pop();
00893         TBitComplement node1 = (TBitComplement) pop();
00894         ABitComplementUnaryNotPlusMinusExp node = new ABitComplementUnaryNotPlusMinusExp(node1, node2);
00895         return node;
00896     }
00897     Node new56()
00898     {
00899         PUnaryExp node2 = (PUnaryExp) pop();
00900         TPlus node1 = (TPlus) pop();
00901         APlusUnaryExp node = new APlusUnaryExp(node1, node2);
00902         return node;
00903     }
00904     Node new57()
00905     {
00906         PUnaryExp node2 = (PUnaryExp) pop();
00907         TMinus node1 = (TMinus) pop();
00908         AMinusUnaryExp node = new AMinusUnaryExp(node1, node2);
00909         return node;
00910     }
00911     Node new58()
00912     {
00913         PUnaryNotPlusMinusExp node1 = (PUnaryNotPlusMinusExp) pop();
00914         AUnaryNotPlusMinusUnaryExp node = new AUnaryNotPlusMinusUnaryExp(node1);
00915         return node;
00916     }
00917     Node new59()
00918     {
00919         PUnaryExp node1 = (PUnaryExp) pop();
00920         AUnaryExpMultExp node = new AUnaryExpMultExp(node1);
00921         return node;
00922     }
00923     Node new6()
00924     {
00925         POperatorTest node1 = (POperatorTest) pop();
00926         X2POperatorTest node = new X2POperatorTest(node1);
00927         return node;
00928     }
00929     Node new60()
00930     {
00931         PUnaryExp node3 = (PUnaryExp) pop();
00932         TTimes node2 = (TTimes) pop();
00933         PMultExp node1 = (PMultExp) pop();
00934         ATimesMultExp node = new ATimesMultExp(node1, node2, node3);
00935         return node;
00936     }
00937     Node new61()
00938     {
00939         PUnaryExp node3 = (PUnaryExp) pop();
00940         TDiv node2 = (TDiv) pop();
00941         PMultExp node1 = (PMultExp) pop();
00942         ADivMultExp node = new ADivMultExp(node1, node2, node3);
00943         return node;
00944     }
00945     Node new62()
00946     {
00947         PUnaryExp node3 = (PUnaryExp) pop();
00948         TMod node2 = (TMod) pop();
00949         PMultExp node1 = (PMultExp) pop();
00950         AModMultExp node = new AModMultExp(node1, node2, node3);
00951         return node;
00952     }
00953     Node new63()
00954     {
00955         PMultExp node1 = (PMultExp) pop();
00956         AMultAddExp node = new AMultAddExp(node1);
00957         return node;
00958     }
00959     Node new64()
00960     {
00961         PMultExp node3 = (PMultExp) pop();
00962         TPlus node2 = (TPlus) pop();
00963         PAddExp node1 = (PAddExp) pop();
00964         APlusAddExp node = new APlusAddExp(node1, node2, node3);
00965         return node;
00966     }
00967     Node new65()
00968     {
00969         PMultExp node3 = (PMultExp) pop();
00970         TMinus node2 = (TMinus) pop();
00971         PAddExp node1 = (PAddExp) pop();
00972         AMinusAddExp node = new AMinusAddExp(node1, node2, node3);
00973         return node;
00974     }
00975     Node new66()
00976     {
00977         PAddExp node1 = (PAddExp) pop();
00978         AAddExpShiftExp node = new AAddExpShiftExp(node1);
00979         return node;
00980     }
00981     Node new67()
00982     {
00983         PAddExp node3 = (PAddExp) pop();
00984         TShiftLeft node2 = (TShiftLeft) pop();
00985         PShiftExp node1 = (PShiftExp) pop();
00986         ALeftShiftExp node = new ALeftShiftExp(node1, node2, node3);
00987         return node;
00988     }
00989     Node new68()
00990     {
00991         PAddExp node3 = (PAddExp) pop();
00992         TSignedShiftRight node2 = (TSignedShiftRight) pop();
00993         PShiftExp node1 = (PShiftExp) pop();
00994         ASignedRightShiftExp node = new ASignedRightShiftExp(node1, node2, node3);
00995         return node;
00996     }
00997     Node new69()
00998     {
00999         PAddExp node3 = (PAddExp) pop();
01000         TUnsignedShiftRight node2 = (TUnsignedShiftRight) pop();
01001         PShiftExp node1 = (PShiftExp) pop();
01002         AUnsignedRightShiftExp node = new AUnsignedRightShiftExp(node1, node2, node3);
01003         return node;
01004     }
01005     Node new7()
01006     {
01007         TEnd node11 = (TEnd) pop();
01008         XPOperatorTest node10 = (XPOperatorTest) pop();
01009         PAbstractFunction node9 = (PAbstractFunction) pop();
01010         POne2oneSet node8 = null;
01011         PDefaultToken node7 = (PDefaultToken) pop();
01012         PTokenSet node6 = (PTokenSet) pop();
01013         TBegin node5 = (TBegin) pop();
01014         PType node4 = (PType) pop();
01015         TExtends node3 = (TExtends) pop();
01016         TId node2 = (TId) pop();
01017         TAbstraction node1 = (TAbstraction) pop();
01018         AUnit node = new AUnit(node1, node2, node3, node4, node5, node6, node7, node8, node9, node10, node11);
01019         return node;
01020     }
01021     Node new70()
01022     {
01023         PShiftExp node1 = (PShiftExp) pop();
01024         AShiftRelExp node = new AShiftRelExp(node1);
01025         return node;
01026     }
01027     Node new71()
01028     {
01029         PShiftExp node3 = (PShiftExp) pop();
01030         TLess node2 = (TLess) pop();
01031         PRelExp node1 = (PRelExp) pop();
01032         ALessRelExp node = new ALessRelExp(node1, node2, node3);
01033         return node;
01034     }
01035     Node new72()
01036     {
01037         PShiftExp node3 = (PShiftExp) pop();
01038         TGreater node2 = (TGreater) pop();
01039         PRelExp node1 = (PRelExp) pop();
01040         AGreaterRelExp node = new AGreaterRelExp(node1, node2, node3);
01041         return node;
01042     }
01043     Node new73()
01044     {
01045         PShiftExp node3 = (PShiftExp) pop();
01046         TLessEqual node2 = (TLessEqual) pop();
01047         PRelExp node1 = (PRelExp) pop();
01048         ALessEqualRelExp node = new ALessEqualRelExp(node1, node2, node3);
01049         return node;
01050     }
01051     Node new74()
01052     {
01053         PShiftExp node3 = (PShiftExp) pop();
01054         TGreaterEqual node2 = (TGreaterEqual) pop();
01055         PRelExp node1 = (PRelExp) pop();
01056         AGreaterEqualRelExp node = new AGreaterEqualRelExp(node1, node2, node3);
01057         return node;
01058     }
01059     Node new75()
01060     {
01061         PRelExp node1 = (PRelExp) pop();
01062         ARelEqExp node = new ARelEqExp(node1);
01063         return node;
01064     }
01065     Node new76()
01066     {
01067         PRelExp node3 = (PRelExp) pop();
01068         TEqual node2 = (TEqual) pop();
01069         PEqExp node1 = (PEqExp) pop();
01070         AEqEqExp node = new AEqEqExp(node1, node2, node3);
01071         return node;
01072     }
01073     Node new77()
01074     {
01075         PRelExp node3 = (PRelExp) pop();
01076         TNotEqual node2 = (TNotEqual) pop();
01077         PEqExp node1 = (PEqExp) pop();
01078         ANeqEqExp node = new ANeqEqExp(node1, node2, node3);
01079         return node;
01080     }
01081     Node new78()
01082     {
01083         PEqExp node1 = (PEqExp) pop();
01084         AEqBitAndExp node = new AEqBitAndExp(node1);
01085         return node;
01086     }
01087     Node new79()
01088     {
01089         PEqExp node3 = (PEqExp) pop();
01090         TBitAnd node2 = (TBitAnd) pop();
01091         PBitAndExp node1 = (PBitAndExp) pop();
01092         AAndBitAndExp node = new AAndBitAndExp(node1, node2, node3);
01093         return node;
01094     }
01095     Node new8()
01096     {
01097         TEnd node11 = (TEnd) pop();
01098         XPOperatorTest node10 = (XPOperatorTest) pop();
01099         PAbstractFunction node9 = (PAbstractFunction) pop();
01100         POne2oneSet node8 = (POne2oneSet) pop();
01101         PDefaultToken node7 = null;
01102         PTokenSet node6 = (PTokenSet) pop();
01103         TBegin node5 = (TBegin) pop();
01104         PType node4 = (PType) pop();
01105         TExtends node3 = (TExtends) pop();
01106         TId node2 = (TId) pop();
01107         TAbstraction node1 = (TAbstraction) pop();
01108         AUnit node = new AUnit(node1, node2, node3, node4, node5, node6, node7, node8, node9, node10, node11);
01109         return node;
01110     }
01111     Node new80()
01112     {
01113         PBitAndExp node1 = (PBitAndExp) pop();
01114         AAndExclusiveOrExp node = new AAndExclusiveOrExp(node1);
01115         return node;
01116     }
01117     Node new81()
01118     {
01119         PBitAndExp node3 = (PBitAndExp) pop();
01120         TBitXor node2 = (TBitXor) pop();
01121         PExclusiveOrExp node1 = (PExclusiveOrExp) pop();
01122         AXorExclusiveOrExp node = new AXorExclusiveOrExp(node1, node2, node3);
01123         return node;
01124     }
01125     Node new82()
01126     {
01127         PExclusiveOrExp node1 = (PExclusiveOrExp) pop();
01128         AXorInclusiveOrExp node = new AXorInclusiveOrExp(node1);
01129         return node;
01130     }
01131     Node new83()
01132     {
01133         PExclusiveOrExp node3 = (PExclusiveOrExp) pop();
01134         TBitOr node2 = (TBitOr) pop();
01135         PInclusiveOrExp node1 = (PInclusiveOrExp) pop();
01136         AOrInclusiveOrExp node = new AOrInclusiveOrExp(node1, node2, node3);
01137         return node;
01138     }
01139     Node new84()
01140     {
01141         PInclusiveOrExp node1 = (PInclusiveOrExp) pop();
01142         AInclusiveOrAndExp node = new AInclusiveOrAndExp(node1);
01143         return node;
01144     }
01145     Node new85()
01146     {
01147         PInclusiveOrExp node3 = (PInclusiveOrExp) pop();
01148         TAnd node2 = (TAnd) pop();
01149         PAndExp node1 = (PAndExp) pop();
01150         AAndAndExp node = new AAndAndExp(node1, node2, node3);
01151         return node;
01152     }
01153     Node new86()
01154     {
01155         PAndExp node1 = (PAndExp) pop();
01156         AAndOrExp node = new AAndOrExp(node1);
01157         return node;
01158     }
01159     Node new87()
01160     {
01161         PAndExp node3 = (PAndExp) pop();
01162         TOr node2 = (TOr) pop();
01163         POrExp node1 = (POrExp) pop();
01164         AOrOrExp node = new AOrOrExp(node1, node2, node3);
01165         return node;
01166     }
01167     Node new88()
01168     {
01169         POrExp node1 = (POrExp) pop();
01170         AOrConditionalExp node = new AOrConditionalExp(node1);
01171         return node;
01172     }
01173     Node new89()
01174     {
01175         PConditionalExp node5 = (PConditionalExp) pop();
01176         TColon node4 = (TColon) pop();
01177         PExp node3 = (PExp) pop();
01178         TQuestion node2 = (TQuestion) pop();
01179         POrExp node1 = (POrExp) pop();
01180         AQuestionConditionalExp node = new AQuestionConditionalExp(node1, node2, node3, node4, node5);
01181         return node;
01182     }
01183     Node new9()
01184     {
01185         TEnd node11 = (TEnd) pop();
01186         XPOperatorTest node10 = (XPOperatorTest) pop();
01187         PAbstractFunction node9 = (PAbstractFunction) pop();
01188         POne2oneSet node8 = (POne2oneSet) pop();
01189         PDefaultToken node7 = (PDefaultToken) pop();
01190         PTokenSet node6 = (PTokenSet) pop();
01191         TBegin node5 = (TBegin) pop();
01192         PType node4 = (PType) pop();
01193         TExtends node3 = (TExtends) pop();
01194         TId node2 = (TId) pop();
01195         TAbstraction node1 = (TAbstraction) pop();
01196         AUnit node = new AUnit(node1, node2, node3, node4, node5, node6, node7, node8, node9, node10, node11);
01197         return node;
01198     }
01199     Node new90()
01200     {
01201         PConditionalExp node1 = (PConditionalExp) pop();
01202         AExp node = new AExp(node1);
01203         return node;
01204     }
01205     Node new91()
01206     {
01207         TDecIntLiteral node1 = (TDecIntLiteral) pop();
01208         ADecIntLiteral node = new ADecIntLiteral(node1);
01209         return node;
01210     }
01211     Node new92()
01212     {
01213         THexIntLiteral node1 = (THexIntLiteral) pop();
01214         AHexIntLiteral node = new AHexIntLiteral(node1);
01215         return node;
01216     }
01217     Node new93()
01218     {
01219         TOctIntLiteral node1 = (TOctIntLiteral) pop();
01220         AOctIntLiteral node = new AOctIntLiteral(node1);
01221         return node;
01222     }
01223     Node new94()
01224     {
01225         TDecLongLiteral node1 = (TDecLongLiteral) pop();
01226         ADecLongLiteral node = new ADecLongLiteral(node1);
01227         return node;
01228     }
01229     Node new95()
01230     {
01231         THexLongLiteral node1 = (THexLongLiteral) pop();
01232         AHexLongLiteral node = new AHexLongLiteral(node1);
01233         return node;
01234     }
01235     Node new96()
01236     {
01237         TOctLongLiteral node1 = (TOctLongLiteral) pop();
01238         AOctLongLiteral node = new AOctLongLiteral(node1);
01239         return node;
01240     }
01241     Node new97()
01242     {
01243         TFloatLiteral node1 = (TFloatLiteral) pop();
01244         AFloatLiteral node = new AFloatLiteral(node1);
01245         return node;
01246     }
01247     Node new98()
01248     {
01249         TDoubleLiteral node1 = (TDoubleLiteral) pop();
01250         ADoubleLiteral node = new ADoubleLiteral(node1);
01251         return node;
01252     }
01253     public Start parse() throws ParserException, LexerException, IOException
01254     {
01255         push(0, null, false);
01256 
01257         List ign = null;
01258         while(true)
01259         {
01260             while(index(lexer.peek()) == -1)
01261             {
01262                 if(ign == null)
01263                 {
01264                     ign = new TypedLinkedList(NodeCast.instance);
01265                 }
01266 
01267                 ign.add(lexer.next());
01268             }
01269 
01270             if(ign != null)
01271             {
01272                 ignoredTokens.setIn(lexer.peek(), ign);
01273                 ign = null;
01274             }
01275 
01276             last_pos = lexer.peek().getPos();
01277             last_line = lexer.peek().getLine();
01278 
01279             int index = index(lexer.peek());
01280             action[0] = actionTable[state()][0][1];
01281             action[1] = actionTable[state()][0][2];
01282 
01283             int low = 1;
01284             int high = actionTable[state()].length - 1;
01285 
01286             while(low <= high)
01287             {
01288                 int middle = (low + high) / 2;
01289 
01290                 if(index < actionTable[state()][middle][0])
01291                 {
01292                     high = middle - 1;
01293                 }
01294                 else if(index > actionTable[state()][middle][0])
01295                 {
01296                     low = middle + 1;
01297                 }
01298                 else
01299                 {
01300                     action[0] = actionTable[state()][middle][1];
01301                     action[1] = actionTable[state()][middle][2];
01302                     break;
01303                 }
01304             }
01305 
01306             switch(action[0])
01307             {
01308                 case SHIFT:
01309                     push(action[1], lexer.next(), true);
01310                     last_shift = action[1];
01311                     break;
01312                 case REDUCE:
01313                     switch(action[1])
01314                     {
01315                     case 0: { Node node = new0(); push(goTo(0), node, true); } break;
01316                     case 1: { Node node = new1(); push(goTo(0), node, true); } break;
01317                     case 2: { Node node = new2(); push(goTo(0), node, true); } break;
01318                     case 3: { Node node = new3(); push(goTo(0), node, true); } break;
01319                     case 4: { Node node = new4(); push(goTo(0), node, true); } break;
01320                     case 5: { Node node = new5(); push(goTo(33), node, false); } break;
01321                     case 6: { Node node = new6(); push(goTo(33), node, false); } break;
01322                     case 7: { Node node = new7(); push(goTo(0), node, true); } break;
01323                     case 8: { Node node = new8(); push(goTo(0), node, true); } break;
01324                     case 9: { Node node = new9(); push(goTo(0), node, true); } break;
01325                     case 10: { Node node = new10(); push(goTo(1), node, true); } break;
01326                     case 11: { Node node = new11(); push(goTo(1), node, true); } break;
01327                     case 12: { Node node = new12(); push(goTo(2), node, true); } break;
01328                     case 13: { Node node = new13(); push(goTo(3), node, true); } break;
01329                     case 14: { Node node = new14(); push(goTo(4), node, true); } break;
01330                     case 15: { Node node = new15(); push(goTo(5), node, true); } break;
01331                     case 16: { Node node = new16(); push(goTo(5), node, true); } break;
01332                     case 17: { Node node = new17(); push(goTo(6), node, true); } break;
01333                     case 18: { Node node = new18(); push(goTo(6), node, true); } break;
01334                     case 19: { Node node = new19(); push(goTo(7), node, true); } break;
01335                     case 20: { Node node = new20(); push(goTo(7), node, true); } break;
01336                     case 21: { Node node = new21(); push(goTo(34), node, false); } break;
01337                     case 22: { Node node = new22(); push(goTo(34), node, false); } break;
01338                     case 23: { Node node = new23(); push(goTo(8), node, true); } break;
01339                     case 24: { Node node = new24(); push(goTo(8), node, true); } break;
01340                     case 25: { Node node = new25(); push(goTo(9), node, true); } break;
01341                     case 26: { Node node = new26(); push(goTo(9), node, true); } break;
01342                     case 27: { Node node = new27(); push(goTo(10), node, true); } break;
01343                     case 28: { Node node = new28(); push(goTo(10), node, true); } break;
01344                     case 29: { Node node = new29(); push(goTo(35), node, false); } break;
01345                     case 30: { Node node = new30(); push(goTo(35), node, false); } break;
01346                     case 31: { Node node = new31(); push(goTo(11), node, true); } break;
01347                     case 32: { Node node = new32(); push(goTo(11), node, true); } break;
01348                     case 33: { Node node = new33(); push(goTo(11), node, true); } break;
01349                     case 34: { Node node = new34(); push(goTo(11), node, true); } break;
01350                     case 35: { Node node = new35(); push(goTo(11), node, true); } break;
01351                     case 36: { Node node = new36(); push(goTo(12), node, true); } break;
01352                     case 37: { Node node = new37(); push(goTo(12), node, true); } break;
01353                     case 38: { Node node = new38(); push(goTo(13), node, true); } break;
01354                     case 39: { Node node = new39(); push(goTo(13), node, true); } break;
01355                     case 40: { Node node = new40(); push(goTo(14), node, true); } break;
01356                     case 41: { Node node = new41(); push(goTo(14), node, true); } break;
01357                     case 42: { Node node = new42(); push(goTo(15), node, true); } break;
01358                     case 43: { Node node = new43(); push(goTo(15), node, true); } break;
01359                     case 44: { Node node = new44(); push(goTo(16), node, true); } break;
01360                     case 45: { Node node = new45(); push(goTo(16), node, true); } break;
01361                     case 46: { Node node = new46(); push(goTo(16), node, true); } break;
01362                     case 47: { Node node = new47(); push(goTo(16), node, true); } break;
01363                     case 48: { Node node = new48(); push(goTo(16), node, true); } break;
01364                     case 49: { Node node = new49(); push(goTo(16), node, true); } break;
01365                     case 50: { Node node = new50(); push(goTo(17), node, true); } break;
01366                     case 51: { Node node = new51(); push(goTo(17), node, true); } break;
01367                     case 52: { Node node = new52(); push(goTo(17), node, true); } break;
01368                     case 53: { Node node = new53(); push(goTo(18), node, true); } break;
01369                     case 54: { Node node = new54(); push(goTo(18), node, true); } break;
01370                     case 55: { Node node = new55(); push(goTo(18), node, true); } break;
01371                     case 56: { Node node = new56(); push(goTo(19), node, true); } break;
01372                     case 57: { Node node = new57(); push(goTo(19), node, true); } break;
01373                     case 58: { Node node = new58(); push(goTo(19), node, true); } break;
01374                     case 59: { Node node = new59(); push(goTo(20), node, true); } break;
01375                     case 60: { Node node = new60(); push(goTo(20), node, true); } break;
01376                     case 61: { Node node = new61(); push(goTo(20), node, true); } break;
01377                     case 62: { Node node = new62(); push(goTo(20), node, true); } break;
01378                     case 63: { Node node = new63(); push(goTo(21), node, true); } break;
01379                     case 64: { Node node = new64(); push(goTo(21), node, true); } break;
01380                     case 65: { Node node = new65(); push(goTo(21), node, true); } break;
01381                     case 66: { Node node = new66(); push(goTo(22), node, true); } break;
01382                     case 67: { Node node = new67(); push(goTo(22), node, true); } break;
01383                     case 68: { Node node = new68(); push(goTo(22), node, true); } break;
01384                     case 69: { Node node = new69(); push(goTo(22), node, true); } break;
01385                     case 70: { Node node = new70(); push(goTo(23), node, true); } break;
01386                     case 71: { Node node = new71(); push(goTo(23), node, true); } break;
01387                     case 72: { Node node = new72(); push(goTo(23), node, true); } break;
01388                     case 73: { Node node = new73(); push(goTo(23), node, true); } break;
01389                     case 74: { Node node = new74(); push(goTo(23), node, true); } break;
01390                     case 75: { Node node = new75(); push(goTo(24), node, true); } break;
01391                     case 76: { Node node = new76(); push(goTo(24), node, true); } break;
01392                     case 77: { Node node = new77(); push(goTo(24), node, true); } break;
01393                     case 78: { Node node = new78(); push(goTo(25), node, true); } break;
01394                     case 79: { Node node = new79(); push(goTo(25), node, true); } break;
01395                     case 80: { Node node = new80(); push(goTo(26), node, true); } break;
01396                     case 81: { Node node = new81(); push(goTo(26), node, true); } break;
01397                     case 82: { Node node = new82(); push(goTo(27), node, true); } break;
01398                     case 83: { Node node = new83(); push(goTo(27), node, true); } break;
01399                     case 84: { Node node = new84(); push(goTo(28), node, true); } break;
01400                     case 85: { Node node = new85(); push(goTo(28), node, true); } break;
01401                     case 86: { Node node = new86(); push(goTo(29), node, true); } break;
01402                     case 87: { Node node = new87(); push(goTo(29), node, true); } break;
01403                     case 88: { Node node = new88(); push(goTo(30), node, true); } break;
01404                     case 89: { Node node = new89(); push(goTo(30), node, true); } break;
01405                     case 90: { Node node = new90(); push(goTo(31), node, true); } break;
01406                     case 91: { Node node = new91(); push(goTo(32), node, true); } break;
01407                     case 92: { Node node = new92(); push(goTo(32), node, true); } break;
01408                     case 93: { Node node = new93(); push(goTo(32), node, true); } break;
01409                     case 94: { Node node = new94(); push(goTo(32), node, true); } break;
01410                     case 95: { Node node = new95(); push(goTo(32), node, true); } break;
01411                     case 96: { Node node = new96(); push(goTo(32), node, true); } break;
01412                     case 97: { Node node = new97(); push(goTo(32), node, true); } break;
01413                     case 98: { Node node = new98(); push(goTo(32), node, true); } break;
01414                     }
01415                     break;
01416                 case ACCEPT:
01417                     {
01418                         EOF node2 = (EOF) lexer.next();
01419                         PUnit node1 = (PUnit) pop();
01420                         Start node = new Start(node1, node2);
01421                         return node;
01422                     }
01423                 case ERROR:
01424                     throw new ParserException(
01425                         "[" + last_line + "," + last_pos + "] " +
01426                         errorMessages[errors[action[1]]]);
01427             }
01428         }
01429     }
01430     private Node pop()
01431     {
01432         return (Node) ((State) stack.previous()).node;
01433     }
01434     private void push(int state, Node node, boolean filter) throws ParserException, LexerException, IOException
01435     {
01436         this.node = node;
01437 
01438         if(filter)
01439         {
01440             filter();
01441         }
01442 
01443         if(!stack.hasNext())
01444         {
01445             stack.add(new State(state, this.node));
01446             return;
01447         }
01448 
01449         State s = (State) stack.next();
01450         s.state = state;
01451         s.node = this.node;
01452     }
01453     private int state()
01454     {
01455         State s = (State) stack.previous();
01456         stack.next();
01457         return s.state;
01458     }
01459 }

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