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

CUP$parser$actions.java

00001 package edu.ksu.cis.bandera.abstraction.pvs;
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 //----------------------------------------------------
00037 // The following code was generated by CUP v0.10k
00038 // Fri Sep 29 14:44:07 CDT 2000
00039 //----------------------------------------------------
00040 
00041 import java_cup.runtime.*;
00042 import java.io.*;
00043 import java.util.*;
00044 
00045 /** Cup generated class to encapsulate user supplied action code.*/
00046 class CUP$parser$actions {
00047   private final parser parser;
00048 
00049   /** Constructor */
00050   CUP$parser$actions(parser parser) {
00051     this.parser = parser;
00052   }  
00053   /** Method with the actual generated action code. */
00054   public final java_cup.runtime.Symbol CUP$parser$do_action(
00055     int                        CUP$parser$act_num,
00056     java_cup.runtime.lr_parser CUP$parser$parser,
00057     java.util.Stack            CUP$parser$stack,
00058     int                        CUP$parser$top)
00059     throws java.lang.Exception
00060     {
00061       /* Symbol object for return from actions */
00062       java_cup.runtime.Symbol CUP$parser$result;
00063 
00064       /* select the action based on the action number */
00065       switch (CUP$parser$act_num)
00066         {
00067           /*. . . . . . . . . . . . . . . . . . . .*/
00068           case 29: // expr ::= ID 
00069             {
00070               Node RESULT = null;
00071         int idleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00072         int idright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00073         String id = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00074          RESULT= new Node(sym.ID,id); 
00075          if(id.compareTo(parser.variable)!=0)
00076             System.err.println("Line "+ ((Yylex) parser.getScanner()).line() +": id "+id+
00077             " not matched by declared "+parser.variable+" ! "); 
00078           
00079               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00080             }
00081           return CUP$parser$result;
00082 
00083           /*. . . . . . . . . . . . . . . . . . . .*/
00084           case 28: // expr ::= NUMBER 
00085             {
00086               Node RESULT = null;
00087         int nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00088         int nright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00089         Integer n = (Integer)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00090          RESULT=new Node(sym.NUMBER,n); 
00091               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00092             }
00093           return CUP$parser$result;
00094 
00095           /*. . . . . . . . . . . . . . . . . . . .*/
00096           case 27: // expr ::= LPAREN expr RPAREN 
00097             {
00098               Node RESULT = null;
00099         int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
00100         int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
00101         Node e = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
00102          RESULT=new Node(sym.LPAREN,e); 
00103               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00104             }
00105           return CUP$parser$result;
00106 
00107           /*. . . . . . . . . . . . . . . . . . . .*/
00108           case 26: // expr ::= NOT expr 
00109             {
00110               Node RESULT = null;
00111         int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00112         int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00113         Node e = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00114          RESULT=new Node(sym.NOT,e); 
00115               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00116             }
00117           return CUP$parser$result;
00118 
00119           /*. . . . . . . . . . . . . . . . . . . .*/
00120           case 25: // expr ::= MINUS expr 
00121             {
00122               Node RESULT = null;
00123         int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00124         int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00125         Node e = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00126          RESULT=new Node(sym.UMINUS,e); 
00127               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00128             }
00129           return CUP$parser$result;
00130 
00131           /*. . . . . . . . . . . . . . . . . . . .*/
00132           case 24: // expr ::= expr MOD expr 
00133             {
00134               Node RESULT = null;
00135         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00136         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00137         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00138         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00139         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00140         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00141          RESULT=new Node(sym.MOD,l,r); 
00142               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00143             }
00144           return CUP$parser$result;
00145 
00146           /*. . . . . . . . . . . . . . . . . . . .*/
00147           case 23: // expr ::= expr DIV expr 
00148             {
00149               Node RESULT = null;
00150         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00151         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00152         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00153         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00154         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00155         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00156          RESULT=new Node(sym.DIV,l,r); 
00157               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00158             }
00159           return CUP$parser$result;
00160 
00161           /*. . . . . . . . . . . . . . . . . . . .*/
00162           case 22: // expr ::= expr TIMES expr 
00163             {
00164               Node RESULT = null;
00165         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00166         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00167         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00168         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00169         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00170         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00171          RESULT=new Node(sym.TIMES,l, r); 
00172               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00173             }
00174           return CUP$parser$result;
00175 
00176           /*. . . . . . . . . . . . . . . . . . . .*/
00177           case 21: // expr ::= expr MINUS expr 
00178             {
00179               Node RESULT = null;
00180         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00181         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00182         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00183         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00184         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00185         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00186          RESULT=new Node(sym.MINUS,l,r); 
00187               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00188             }
00189           return CUP$parser$result;
00190 
00191           /*. . . . . . . . . . . . . . . . . . . .*/
00192           case 20: // expr ::= expr PLUS expr 
00193             {
00194               Node RESULT = null;
00195         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00196         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00197         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00198         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00199         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00200         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00201          RESULT=new Node(sym.PLUS,l,r); 
00202               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00203             }
00204           return CUP$parser$result;
00205 
00206           /*. . . . . . . . . . . . . . . . . . . .*/
00207           case 19: // expr ::= expr GT expr 
00208             {
00209               Node RESULT = null;
00210         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00211         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00212         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00213         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00214         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00215         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00216          RESULT=new Node(sym.GT,l,r); 
00217               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00218             }
00219           return CUP$parser$result;
00220 
00221           /*. . . . . . . . . . . . . . . . . . . .*/
00222           case 18: // expr ::= expr GE expr 
00223             {
00224               Node RESULT = null;
00225         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00226         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00227         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00228         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00229         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00230         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00231          RESULT=new Node(sym.GE,l,r); 
00232               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00233             }
00234           return CUP$parser$result;
00235 
00236           /*. . . . . . . . . . . . . . . . . . . .*/
00237           case 17: // expr ::= expr LT expr 
00238             {
00239               Node RESULT = null;
00240         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00241         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00242         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00243         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00244         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00245         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00246          RESULT=new Node(sym.LT,l,r); 
00247               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00248             }
00249           return CUP$parser$result;
00250 
00251           /*. . . . . . . . . . . . . . . . . . . .*/
00252           case 16: // expr ::= expr LE expr 
00253             {
00254               Node RESULT = null;
00255         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00256         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00257         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00258         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00259         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00260         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00261          RESULT=new Node(sym.LE,l,r); 
00262               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00263             }
00264           return CUP$parser$result;
00265 
00266           /*. . . . . . . . . . . . . . . . . . . .*/
00267           case 15: // expr ::= expr NE expr 
00268             {
00269               Node RESULT = null;
00270         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00271         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00272         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00273         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00274         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00275         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00276          RESULT=new Node(sym.NE,l,r); 
00277               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00278             }
00279           return CUP$parser$result;
00280 
00281           /*. . . . . . . . . . . . . . . . . . . .*/
00282           case 14: // expr ::= expr EQ expr 
00283             {
00284               Node RESULT = null;
00285         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00286         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00287         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00288         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00289         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00290         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00291          RESULT=new Node(sym.EQ,l,r); 
00292               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00293             }
00294           return CUP$parser$result;
00295 
00296           /*. . . . . . . . . . . . . . . . . . . .*/
00297           case 13: // expr ::= expr AND expr 
00298             {
00299               Node RESULT = null;
00300         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00301         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00302         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00303         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00304         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00305         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00306          RESULT=new Node(sym.AND,l,r); 
00307               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00308             }
00309           return CUP$parser$result;
00310 
00311           /*. . . . . . . . . . . . . . . . . . . .*/
00312           case 12: // expr ::= expr OR expr 
00313             {
00314               Node RESULT = null;
00315         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;
00316         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;
00317         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;
00318         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00319         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00320         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00321          RESULT=new Node(sym.OR,l,r); 
00322               CUP$parser$result = new java_cup.runtime.Symbol(8/*expr*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00323             }
00324           return CUP$parser$result;
00325 
00326           /*. . . . . . . . . . . . . . . . . . . .*/
00327           case 11: // expr_part ::= expr ARROW ID SEMI 
00328             {
00329               Node RESULT = null;
00330         int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;
00331         int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;
00332         Node e = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;
00333         int idleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
00334         int idright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
00335         String id = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
00336          parser.npredicates=parser.npredicates+1;
00337          parser.tokens.add(id); 
00338              RESULT=new Node(sym.SEMI,id,e); 
00339               CUP$parser$result = new java_cup.runtime.Symbol(7/*expr_part*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00340             }
00341           return CUP$parser$result;
00342 
00343           /*. . . . . . . . . . . . . . . . . . . .*/
00344           case 10: // expr_list ::= expr_part 
00345             {
00346               Node RESULT = null;
00347         int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00348         int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00349         Node e = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00350          RESULT=e; 
00351               CUP$parser$result = new java_cup.runtime.Symbol(6/*expr_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00352             }
00353           return CUP$parser$result;
00354 
00355           /*. . . . . . . . . . . . . . . . . . . .*/
00356           case 9: // expr_list ::= expr_list expr_part 
00357             {
00358               Node RESULT = null;
00359         int lleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
00360         int lright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
00361         Node l = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
00362         int rleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00363         int rright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00364         Node r = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00365          RESULT=new Node(sym.SEMI,l,r); 
00366               CUP$parser$result = new java_cup.runtime.Symbol(6/*expr_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00367             }
00368           return CUP$parser$result;
00369 
00370           /*. . . . . . . . . . . . . . . . . . . .*/
00371           case 8: // abstract_fun ::= ABSTRACT LPAREN ID NT$0 RPAREN BEGIN expr_list END 
00372             {
00373               Object RESULT = null;
00374               // propagate RESULT from NT$0
00375               if ( ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value != null )
00376                 RESULT = (Object) ((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value;
00377         int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left;
00378         int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).right;
00379         String s = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-5)).value;
00380         int eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
00381         int eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
00382         Node e = (Node)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
00383          parser.tree=e; 
00384               CUP$parser$result = new java_cup.runtime.Symbol(4/*abstract_fun*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00385             }
00386           return CUP$parser$result;
00387 
00388           /*. . . . . . . . . . . . . . . . . . . .*/
00389           case 7: // NT$0 ::= 
00390             {
00391               Object RESULT = null;
00392         int sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left;
00393         int sright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right;
00394         String s = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-0)).value;
00395  parser.variable = s; 
00396               CUP$parser$result = new java_cup.runtime.Symbol(9/*NT$0*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00397             }
00398           return CUP$parser$result;
00399 
00400           /*. . . . . . . . . . . . . . . . . . . .*/
00401           case 6: // id_list ::= id_list COMMA ID 
00402             {
00403               Object RESULT = null;
00404 
00405               CUP$parser$result = new java_cup.runtime.Symbol(5/*id_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00406             }
00407           return CUP$parser$result;
00408 
00409           /*. . . . . . . . . . . . . . . . . . . .*/
00410           case 5: // id_list ::= ID 
00411             {
00412               Object RESULT = null;
00413 
00414               CUP$parser$result = new java_cup.runtime.Symbol(5/*id_list*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00415             }
00416           return CUP$parser$result;
00417 
00418           /*. . . . . . . . . . . . . . . . . . . .*/
00419           case 4: // token_def ::= TOKENS EQUAL LBRACE id_list RBRACE SEMI 
00420             {
00421               Object RESULT = null;
00422 
00423               CUP$parser$result = new java_cup.runtime.Symbol(3/*token_def*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00424             }
00425           return CUP$parser$result;
00426 
00427           /*. . . . . . . . . . . . . . . . . . . .*/
00428           case 3: // type ::= FLOAT 
00429             {
00430               Object RESULT = null;
00431          parser.basic_type = sym.FLOAT; 
00432               CUP$parser$result = new java_cup.runtime.Symbol(2/*type*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00433             }
00434           return CUP$parser$result;
00435 
00436           /*. . . . . . . . . . . . . . . . . . . .*/
00437           case 2: // type ::= INT 
00438             {
00439               Object RESULT = null;
00440          parser.basic_type = sym.INT; 
00441               CUP$parser$result = new java_cup.runtime.Symbol(2/*type*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00442             }
00443           return CUP$parser$result;
00444 
00445           /*. . . . . . . . . . . . . . . . . . . .*/
00446           case 1: // $START ::= spec EOF 
00447             {
00448               Object RESULT = null;
00449         int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;
00450         int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;
00451         Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;
00452         RESULT = start_val;
00453               CUP$parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00454             }
00455           /* ACCEPT */
00456           CUP$parser$parser.done_parsing();
00457           return CUP$parser$result;
00458 
00459           /*. . . . . . . . . . . . . . . . . . . .*/
00460           case 0: // spec ::= ABSTRACTION ID EXTENDS type BEGIN token_def abstract_fun END 
00461             {
00462               Object RESULT = null;
00463         int nameleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).left;
00464         int nameright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)).right;
00465         String name = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-6)).value;
00466          parser.name=name; 
00467               CUP$parser$result = new java_cup.runtime.Symbol(1/*spec*/, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-0)).right, RESULT);
00468             }
00469           return CUP$parser$result;
00470 
00471           /* . . . . . .*/
00472           default:
00473             throw new Exception(
00474                "Invalid action number found in internal parse table");
00475 
00476         }
00477     }
00478 }

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