langparser.c

Go to the documentation of this file.
00001 
00002 /*  $Id: langparser.c 1180 2006-04-01 16:11:40Z andreradke $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 # line 3 "langparser.y"
00029 
00030 /*
00031 langparser.y generates langparser.c.  
00032 
00033 use MPW Shell and the MPW tool MacYACC to create a LSC-compatible parser 
00034 in langparser.c.
00035 */
00036 
00037 /*
00038 these declarations make it possible to compile and run langparser.c 
00039 with no modification to the source code as generated by MacYACC.
00040 
00041 5/29/92 dmb: added try statement handling
00042 
00043 5.1.2 dmb: added cleanandexit block to dispose everything on memory errors
00044 */
00045 
00046 #include "frontier.h"
00047 #include "standard.h"
00048 
00049 #include "memory.h"
00050 #include "strings.h"
00051 #include "lang.h"
00052 #include "langinternal.h"
00053 #include "langparser.h"
00054 
00055 
00056 //static FILE __file[1];
00057 /*
00058     2006-04-01 kw & aradke: The following static function templates caused
00059         a compilation error with GCC 4.0 because we already picked up the
00060         functions from stdio.h and string.h via osincludes.h and frontier.h.
00061         Therefore, we commented out the following templates. The functions
00062         are never called in real life anyway because yytflag is never non-nil.
00063 */
00064 
00065 /*
00066 static int fprintf (FILE *f, const char *s, ...) {return (0);}
00067 
00068 static FILE *fopen (const char *s1, const char *s2) {return (NULL);}
00069 
00070 static int fclose (FILE *f) {return (0);}
00071 
00072 static int strcmp (const char * str1, const char * str2) {return (0);}
00073 */
00074 
00075 /*
00076 10/2/91 dmb: a disturbing discovery -- our error handling doesn't deallocate 
00077 any of the code tree that's been built so for.  searching through langparser.c, 
00078 it appears that there are three data structures will need to go through: yyval, 
00079 yylval, and the value stack, yyv.  Unfortunately, the value stack pointer, yypv, 
00080 is a local in yyparse, so we have to be tricky to get at it.  so I'm replacing 
00081 the yyerror routine with a macro that calls the real error routine, but passes 
00082 the stack pointer as an additional parameter.
00083 
00084 there's probably a much cleaner way to do this, but I don't have the 
00085 documentation, nor much time...
00086 
00087 11/22/91 dmb: well, there's little time indeed, but we now have MacYACC 3.0, and 
00088 a little documentation.  The right was to deal with data structure disposal on 
00089 errors is to make sure that there are reduction rules for every error situation, 
00090 so that after yyerror is called the parser can ruduce the stack all the way down 
00091 to our start token (module), where the tree can be safely disposed.  I've added a 
00092 number of such reductions that should cover many error situations, but a much more 
00093 thorough job needs to be done eventually.  It's hard to trap errors at a very atomic 
00094 level without introducing ambiguities to the grammer (i.e. reduction conflicts).  
00095 So, given the time to work on it, I would go through the definition of "statement" 
00096 and add rules for every permutation of errors within the more complex contructs.  The 
00097 key thing to understand is that "expr" is written to handle any error, so anything 
00098 that depends on expr is covered.  It's unique contructs associated with some compound 
00099 statements that need extra work.
00100 */
00101 
00102 #define EQtoken 400
00103 #define NEtoken 401
00104 #define GTtoken 402
00105 #define LTtoken 403
00106 #define GEtoken 404
00107 #define LEtoken 405
00108 #define nottoken 406
00109 #define andandtoken 407
00110 #define orortoken 408
00111 #define beginswithtoken 409
00112 #define endswithtoken 410
00113 #define containstoken 411
00114 #define bitandtoken 412
00115 #define bitortoken 413
00116 #define looptoken 500
00117 #define filelooptoken 501
00118 #define intoken 502
00119 #define breaktoken 503
00120 #define returntoken 504
00121 #define iftoken 505
00122 #define thentoken 506
00123 #define elsetoken 507
00124 #define bundletoken 508
00125 #define localtoken 509
00126 #define ontoken 510
00127 #define whiletoken 511
00128 #define casetoken 512
00129 #define kerneltoken 513
00130 #define fortoken 514
00131 #define totoken 515
00132 #define downtotoken 516
00133 #define continuetoken 517
00134 #define withtoken 518
00135 #define trytoken 519
00136 #define globaltoken 520
00137 #define errortoken 292
00138 #define eoltoken 293
00139 #define constanttoken 294
00140 #define identifiertoken 295
00141 #define othertoken 296
00142 #define assigntoken 297
00143 #define addtoken 298
00144 #define subtracttoken 299
00145 #define multiplytoken 300
00146 #define dividetoken 301
00147 #define modtoken 302
00148 #define plusplustoken 303
00149 #define minusminustoken 304
00150 #define unaryminus 305
00151 #ifndef YYSTYPE
00152 #define YYSTYPE int
00153 #endif
00154 YYSTYPE yylval, yyval;
00155 #define YYERRCODE 256
00156 
00157 # line 1450 "langparser.y"
00158 
00159 
00160 #ifdef fldebug
00161 
00162     static void yytrace (char * s) {
00163         
00164         bigstring bs;
00165         
00166         copyctopstring (s, bs);
00167         
00168         langtrace (bs);
00169         } /*yytrace*/
00170 
00171 #else
00172 
00173     #define yytrace(s)
00174 
00175 #endif
00176 
00177 
00178 static int yylex (void) {
00179     
00180     /*
00181     get the next token from the input stream.  return the token number, and
00182     set the global yylval to the value of the token, if it has one.
00183     */
00184     
00185     return (parsegettoken (&yylval));
00186     } /*yylex*/
00187 
00188 
00189 static void yyerror (char *s) {
00190     
00191     /*
00192     langdisposetree (yyval);
00193     
00194     langdisposetree (yylval);
00195     */
00196     
00197     /*
00198     clearbytes (&parseresult, (long) sizeof (parseresult));
00199     */
00200     
00201     parseerror ((ptrstring) s); 
00202     } /*yyerror*/
00203 
00204 
00205 
00206 
00207 FILE *yytfilep;
00208 char *yytfilen;
00209 int yytflag = 0;
00210 int svdprd[2];
00211 char svdnams[2][2];
00212 
00213 const int yyexca[] = {
00214   -1, 1,
00215   0, -1,
00216   -2, 0,
00217   0,
00218 };
00219 
00220 #define YYNPROD 131
00221 #define YYLAST 1078
00222 
00223 const int yyact[] = {
00224       27,     170,     234,      50,      51,      52,      53,      54,
00225      163,     159,     241,     216,      46,     214,      70,      50,
00226       51,      52,      53,      54,      67,      27,      48,     197,
00227       23,      52,      53,      54,      46,     250,      46,      49,
00228      204,      81,      70,      70,     182,      74,      31,      96,
00229       67,      67,      27,     144,     190,      23,     153,     249,
00230       81,     146,     167,      46,      50,      51,      52,      53,
00231       54,     247,     166,      78,     248,     152,       4,      46,
00232      196,      68,      23,     106,      66,     192,      76,      91,
00233       46,      50,      51,      52,      53,      54,     208,     203,
00234      218,      48,     184,      30,     193,      68,      68,     113,
00235       66,      66,      46,      97,     217,      46,      50,      51,
00236       52,      53,      54,      50,      51,      52,      53,      54,
00237       30,      55,      56,      59,      57,      60,      58,     119,
00238       65,      64,      61,      62,      63,      55,      56,      59,
00239       57,      60,      58,     188,      65,      30,      61,      62,
00240       63,     192,     183,     168,     186,     187,     179,     169,
00241      140,      70,      46,     156,     157,     158,      79,      67,
00242      193,     202,     103,     189,     261,     244,     200,     185,
00243      160,      77,      55,      56,      59,      57,      60,      58,
00244      191,      65,      64,      61,      62,      63,      75,     105,
00245       70,     171,      75,     263,     110,     173,      67,      55,
00246       56,      59,      57,      60,      58,      75,      65,      64,
00247       61,      62,      63,     109,      68,      87,     142,      66,
00248      104,     155,     262,     137,      55,      56,      59,      57,
00249       60,      58,     116,      65,      64,      61,      62,      63,
00250      149,       2,     198,     236,      21,      20,     192,     161,
00251       45,     143,      19,      68,     253,     254,      66,      50,
00252       51,      52,      53,      54,     155,     193,     229,     227,
00253       45,     213,      45,     209,     225,       3,     145,     231,
00254      232,      50,      51,      52,      53,      54,      88,      15,
00255       14,      13,     176,      12,      11,      10,      22,      45,
00256       47,     215,     150,      28,      32,     139,      34,      25,
00257       26,     195,     260,      45,     246,     239,     240,     221,
00258        7,       1,       0,      22,      45,      71,      72,       0,
00259       28,       0,       0,       0,      25,      26,      50,      51,
00260       52,      53,      54,     175,      69,       0,      45,      49,
00261       22,      45,      71,      72,       0,      28,     170,       0,
00262      199,      25,      26,     192,     255,       0,       0,       0,
00263      257,       0,      50,      51,      52,      53,      54,       0,
00264      207,       0,     193,       0,       0,      55,      56,      59,
00265       57,      60,      58,       0,      65,      64,      61,      62,
00266       63,      50,      51,      52,      53,      54,      45,      55,
00267       56,      59,      57,      60,      58,     165,      65,      64,
00268       61,      62,      63,     194,       0,       0,     192,       0,
00269        0,       0,       0,       0,       0,       0,      29,       0,
00270        0,       0,       0,       0,       0,     193,       0,       0,
00271        0,       0,       0,       0,       0,       0,       0,       0,
00272      180,       0,       0,      29,      55,      56,      59,      57,
00273       60,      58,       0,      65,      64,      61,      62,      63,
00274       71,      72,       0,       0,       0,       0,       0,       0,
00275       29,       0,       0,       0,       0,       0,       0,       0,
00276       55,      56,      59,      57,      60,      58,       0,      65,
00277       64,      61,      62,      63,      50,      51,      52,      53,
00278       54,       0,       0,       0,       0,       0,       0,      55,
00279       56,      59,      57,      60,      58,       0,      65,      64,
00280       61,      62,      63,      50,      51,      52,      53,      54,
00281        0,       0,     181,       0,      37,      36,       0,      16,
00282       18,      40,       0,       0,      41,       8,      35,      38,
00283       42,     151,      39,       0,     222,      17,      43,      44,
00284        9,      37,      36,       0,      16,      18,      40,       0,
00285        0,      41,       8,      35,      38,      42,       0,      39,
00286      177,       0,      17,      43,      44,       9,      37,      36,
00287        0,      16,      18,      40,       0,       0,      41,       8,
00288       35,      38,      42,       0,      39,       0,       0,      17,
00289       43,      44,       9,      50,      51,      52,      53,      54,
00290        0,       0,      55,      56,      59,      57,      60,      58,
00291        0,      65,      64,      61,      62,      63,      50,      51,
00292       52,      53,      54,       0,      27,       0,       0,       0,
00293        0,      55,      56,      59,      57,      60,      58,       0,
00294       65,      64,      61,      62,      63,      50,      51,      52,
00295       53,      54,       0,      24,      23,       0,       0,       0,
00296        0,      50,      51,      52,      53,      54,       0,       0,
00297        0,       0,       0,       0,       0,      50,      51,      52,
00298       53,      54,       0,      95,       0,      95,      95,      46,
00299        0,       0,       0,       0,       0,       0,      50,      51,
00300       52,      53,      54,      95,       0,       0,       0,      95,
00301        0,       0,      50,      51,      52,      53,      54,       0,
00302        0,      55,      56,      59,      57,      60,      58,      30,
00303       65,      64,      61,      62,      63,      50,      51,      52,
00304       53,      54,       0,       0,      55,      56,      59,      57,
00305       60,      58,       0,      65,      64,      61,      62,      63,
00306        0,       0,       0,       0,       0,       0,       0,       0,
00307        0,       0,       0,      55,      56,      59,      57,      60,
00308       58,       0,      65,      64,      61,      62,      63,      55,
00309       56,      59,      57,      60,      58,       0,      65,      64,
00310       61,      62,      63,      55,      56,      59,      57,      60,
00311       58,       0,      65,      64,      61,      62,      63,       0,
00312        0,       0,       0,       0,      55,      56,      59,      57,
00313       60,      58,       0,      65,      64,      61,      62,      63,
00314       55,      56,      59,      57,      60,      58,       0,       5,
00315        0,      61,      62,      63,       0,       0,       0,       0,
00316        0,       0,       0,       0,       0,      59,      57,      60,
00317       58,       0,      89,       0,      61,      62,      63,      95,
00318        0,       0,       0,     100,     101,     102,     107,       0,
00319        0,       0,       0,      95,       0,       0,     111,       0,
00320      114,       0,     115,       0,       0,       0,     118,       0,
00321        0,       0,     120,     121,     122,     123,     124,     125,
00322      126,     127,     128,     129,     130,     131,     132,     133,
00323      134,     135,       0,       0,     138,     141,     147,      90,
00324        6,       0,      22,      45,       0,       0,       0,      28,
00325        0,       0,       0,      25,      26,       0,       0,       0,
00326        0,       0,       0,     162,       0,       0,       0,      94,
00327      164,      98,      99,       0,       0,       0,       0,       0,
00328        0,       0,       0,       0,       0,       0,     174,     112,
00329        0,     164,     205,     117,       0,       0,       0,       0,
00330        6,      33,      73,       0,       0,      80,      82,      83,
00331       84,      85,      86,       0,       0,       0,       0,      92,
00332       93,       0,       0,       0,       0,       0,       0,       0,
00333        0,       0,       6,       0,       0,       0,       0,       0,
00334        0,       6,       0,       0,       0,     108,       0,       0,
00335        0,       0,       0,       0,       0,       0,       0,     210,
00336        0,     211,     212,       0,       0,       0,       0,     219,
00337        0,     220,       0,       0,       0,     224,       6,       0,
00338        0,     178,      29,     211,     228,     136,       0,       0,
00339      148,       0,       0,       0,     233,       0,     154,     154,
00340      154,     154,       0,     235,       0,       0,       0,       0,
00341        0,       0,       0,       0,       0,       0,       0,     237,
00342        0,     238,       0,       0,       0,     242,     243,       0,
00343        0,       0,       0,       0,       0,       0,       0,     172,
00344        0,       0,       0,       0,       0,       0,       0,     251,
00345      252,       0,       0,       0,       0,       0,       0,       0,
00346      256,       0,       0,     223,       0,     258,     259,       0,
00347        0,       0,       0,       0,       0,       0,       0,     230,
00348        0,       0,       0,       0,       0,       0,       0,       0,
00349        0,       0,     201,       0,       0,       0,     206,       0,
00350        0,       0,       0,       0,       0,       0,       0,       0,
00351        0,       0,       0,       0,       0,     154,       0,       0,
00352        0,       0,       0,       0,       0,       0,       0,       0,
00353        0,       0,       0,       0,     226,     148,       0,       0,
00354        0,       0,     154,     154,       0,       0,       0,       0,
00355        0,       6,       0,       0,       0,       0,       0,       0,
00356        0,       0,       0,       0,       0,       0,       0,       0,
00357        0,       0,       0,       0,       0,       0,       0,       0,
00358        0,       0,       0,       0,       0,     245,
00359 };
00360 
00361 const int yypact[] = {
00362      -19,   -1000,     -37,   -1000,   -1000,    -225,      -5,     -86,
00363       30,      19,     -90,     -90,     -90,     -90,     -90,     -90,
00364      149,   -1000,     508,     -52,     -90,     -90,   -1000,      -1,
00365       -3,      -1,      -1,     508,     508,     508,     508,   -1000,
00366    -1000,   -1000,   -1000,     -79,     147,     132,     508,      47,
00367      508,   -1000,     508,      -1,   -1000,   -1000,     508,   -1000,
00368        2,   -1000,     508,     508,     508,     508,     508,     508,
00369      508,     508,     508,     508,     508,     508,     508,     508,
00370      508,     508,   -1000,     -61,     508,     508,     508,   -1000,
00371    -1000,   -1000,     -40,   -1000,     -63,     -63,     -63,     -63,
00372    -1000,       2,   -1000,   -1000,   -1000,    -498,   -1000,     111,
00373    -1000,    -204,      97,     508,   -1000,    -499,     128,      -3,
00374      508,   -1000,     128,     128,     308,   -1000,   -1000,     -67,
00375        6,      91,   -1000,     244,     129,     -79,       2,    -204,
00376       -6,     508,    -204,    -204,      90,     128,     291,   -1000,
00377     -275,    -275,   -1000,   -1000,   -1000,     339,     339,    -199,
00378     -199,    -199,    -199,    -199,    -199,    -199,    -283,     320,
00379    -1000,   -1000,     -57,      37,     -11,    -204,     110,   -1000,
00380       88,      89,   -1000,    -204,      65,      22,     -81,     120,
00381      314,   -1000,    -233,   -1000,      85,     263,      25,     -90,
00382    -1000,      20,     -75,     -90,     279,     -16,   -1000,     508,
00383    -1000,     508,     508,     -28,    -245,      33,      39,     508,
00384    -1000,     508,     -26,      -1,   -1000,     508,   -1000,   -1000,
00385    -1000,   -1000,     -79,     508,     508,   -1000,   -1000,      -1,
00386      -63,     -63,   -1000,   -1000,     508,   -1000,   -1000,   -1000,
00387    -1000,   -1000,    -505,     508,   -1000,   -1000,   -1000,     -16,
00388    -1000,   -1000,     244,    -204,    -204,     170,   -1000,     508,
00389    -1000,     508,   -1000,    -246,    -204,     508,     508,     128,
00390     -204,   -1000,      65,      88,    -204,     108,     128,   -1000,
00391    -1000,    -204,     -90,     -75,   -1000,      16,     -12,     508,
00392      508,   -1000,    -295,     267,   -1000,   -1000,   -1000,   -1000,
00393      508,       2,   -1000,    -204,    -204,     508,     508,   -1000,
00394      225,     107,     153,     130,   -1000,   -1000,   -1000,   -1000,
00395 };
00396 
00397 const int yypgo[] = {
00398        0,     273,     208,     849,     727,     272,      61,     265,
00399       46,      62,     842,     262,     799,     571,      38,     261,
00400      260,      67,     258,     253,     252,     251,     249,     248,
00401      247,     246,     218,     215,     213,     212,      32,     202,
00402      167,     146,     192,      49,      43,     190,
00403 };
00404 
00405 const int yyr1[] = {
00406        0,       1,       1,       3,       3,       5,       5,       7,
00407        7,       7,       8,       8,       6,       6,       6,       2,
00408        2,      10,      10,      11,      11,      11,      14,      14,
00409       15,      16,      16,      16,      12,      12,      12,      12,
00410        9,       9,       9,       9,       9,       9,       9,       9,
00411        9,       9,       9,       9,       9,       9,       9,       9,
00412        9,       9,       9,       9,       9,       9,       9,       9,
00413        9,       9,      18,      19,      19,      19,      20,      20,
00414       20,      20,      20,      21,      21,      21,      21,      21,
00415       21,      22,      22,      23,      29,      24,      26,      30,
00416       30,      27,      27,      28,      31,      31,      32,      32,
00417       33,      33,      25,      25,      17,      34,      34,      35,
00418       36,      36,      37,      37,      37,      13,       4,       4,
00419        4,       4,       4,       4,       4,       4,       4,       4,
00420        4,       4,       4,       4,       4,       4,       4,       4,
00421        4,       4,       4,       4,       4,       4,       4,       4,
00422        4,       4,       4,
00423 };
00424 
00425 const int yyr2[] = {
00426        0,       2,       1,       1,       3,       5,       4,       0,
00427        2,       1,       2,       1,       1,       3,       3,       1,
00428        3,       3,       1,       2,       2,       4,       3,       3,
00429        3,       4,       4,       4,       1,       1,       1,       1,
00430        0,       1,       3,       2,       4,       4,       4,       4,
00431        4,       2,       2,       2,       2,       2,       4,       2,
00432        3,       1,       1,       2,       4,       6,       2,       2,
00433        4,       2,       4,       6,       8,       4,       8,       1,
00434        4,       2,       6,       6,       8,       6,       8,       5,
00435        3,       4,       6,       2,       1,       1,       2,       0,
00436        1,       2,       4,       2,       1,       3,       1,       3,
00437        0,       1,       0,       1,       3,       1,       3,       3,
00438        1,       3,       1,       1,       3,       4,       1,       1,
00439        2,       1,       2,       2,       2,       2,       3,       3,
00440        3,       3,       3,       3,       3,       3,       3,       3,
00441        3,       3,       3,       3,       3,       3,       3,       2,
00442        2,       3,       3,
00443 };
00444 
00445 const int yychk[] = {
00446    -1000,      -1,      -2,     256,      -9,      -4,     -12,      -5,
00447      509,     520,     -19,     -20,     -21,     -22,     -23,     -24,
00448      503,     517,     504,     -26,     -28,     -29,     294,      64,
00449      -13,     303,     304,      40,     299,     406,     123,     -14,
00450      -16,      -3,     -11,     510,     501,     500,     511,     514,
00451      505,     508,     512,     518,     519,     295,      91,     293,
00452       59,     256,     298,     299,     300,     301,     302,     400,
00453      401,     403,     405,     402,     404,     409,     410,     411,
00454      408,     407,      94,      46,      91,     297,      40,     303,
00455      304,     -10,     123,     256,      40,     123,      40,     123,
00456      -10,     123,     -10,     -10,     -10,     -10,     -10,      40,
00457      -25,      -4,     -12,     123,     -10,     -10,     -12,     -13,
00458       40,      94,     -12,     -12,      -4,      -4,      -4,     -33,
00459      -34,     -32,     -17,      -4,      -3,      40,      40,      -4,
00460      -12,      40,      -4,      -4,     -31,     -12,      -4,      -9,
00461       -4,      -4,      -4,      -4,      -4,      -4,      -4,      -4,
00462       -4,      -4,      -4,      -4,      -4,      -4,      -4,      -4,
00463       -3,     256,      -4,     -15,     -17,      -4,     -37,     -33,
00464      -36,     -32,     -35,      -4,      -3,      -2,     -18,     513,
00465       -6,      -8,      -3,     256,      -6,      -6,      -6,     507,
00466       41,     -27,      -4,     507,      -4,      41,     125,      44,
00467      125,      44,      58,      40,      -3,      -9,      -4,     297,
00468      256,     502,     -12,      44,      93,     515,      93,      93,
00469       93,      41,      44,      44,      58,     125,     125,      40,
00470       44,      59,      41,      -7,     297,     256,     125,      41,
00471      125,     -10,     125,      59,     -30,     -10,     -10,      41,
00472       94,     -17,      -4,      -4,      -4,      -6,      41,     502,
00473      256,      59,      41,      -4,      -4,     297,     502,     -12,
00474       -4,     -35,      -3,     -36,      -4,     -14,     -12,      -8,
00475       -8,      -4,     507,      -4,      41,      -4,      -4,     515,
00476      516,     256,      -4,      -4,      41,     -10,     -30,      41,
00477       44,      59,      41,      -4,      -4,     515,     516,      41,
00478       -4,      -9,      -4,      -4,      41,      41,      41,      41,
00479 };
00480 
00481 const int yydef[] = {
00482       32,      -2,       0,       2,      15,      33,     103,       0,
00483        0,       0,       0,       0,       0,       0,       0,       0,
00484       49,      50,      90,       0,       0,       0,     102,       0,
00485      105,       0,       0,       0,       0,       0,      88,      28,
00486       29,      30,      31,       0,       0,      63,       0,       0,
00487        0,      77,       0,       0,      76,       3,       0,       1,
00488       32,      57,       0,       0,       0,       0,       0,       0,
00489        0,       0,       0,       0,       0,       0,       0,       0,
00490        0,       0,      19,       0,       0,       0,      88,     107,
00491      109,      35,      32,      18,       0,       0,       0,       0,
00492       41,      32,      42,      43,      44,      45,      47,       0,
00493       51,      91,     103,       0,      54,      55,     104,       0,
00494        0,      20,     106,     108,       0,     127,     128,       0,
00495        0,      89,      93,      86,       0,       0,      32,      65,
00496        0,       0,      75,      78,      83,      84,       0,      16,
00497      111,     112,     113,     114,     115,     116,     117,     118,
00498      119,     120,     121,     122,     123,     124,     125,     126,
00499       22,      23,       0,       0,       0,      34,       0,      98,
00500       99,      89,      96,      86,      30,       0,       0,       0,
00501        0,      12,       7,      11,       0,       0,       0,       0,
00502       48,       0,      79,       0,       0,     110,     129,       0,
00503      130,       0,       0,       0,       0,       0,      33,       0,
00504       72,       0,     103,       0,       4,       0,      25,      26,
00505       27,     101,       0,       0,       0,      17,      36,       0,
00506        0,       0,      37,      10,       0,       9,      38,      39,
00507       40,      46,      52,       0,      81,      80,      56,       0,
00508       21,      94,       0,      87,      92,       0,       6,       0,
00509       61,       0,      64,       0,      73,       0,       0,      85,
00510       24,      97,       0,     100,      95,      28,       0,      13,
00511       14,       8,       0,      79,       5,       0,       0,       0,
00512        0,      71,       0,       0,      58,      53,      82,      59,
00513        0,      32,      66,      67,      69,       0,       0,      74,
00514        0,       0,       0,       0,      60,      62,      68,      70,
00515 };
00516 
00517 const int *yyxi;
00518 /*****************************************************************/
00519 /* PCYACC LALR parser driver routine -- a table driven procedure */
00520 /* for recognizing sentences of a language defined by the        */
00521 /* grammar that PCYACC analyzes. An LALR parsing table is then   */
00522 /* constructed for the grammar and the skeletal parser uses the  */
00523 /* table when performing syntactical analysis on input source    */
00524 /* programs. The actions associated with grammar rules are       */
00525 /* inserted into a switch statement for execution.               */
00526 /*****************************************************************/
00527 
00528 
00529 #ifndef YYMAXDEPTH
00530 #define YYMAXDEPTH 200
00531 #endif
00532 #ifndef YYREDMAX
00533 #define YYREDMAX 1000
00534 #endif
00535 #define PCYYFLAG -1000
00536 #define WAS0ERR 0
00537 #define WAS1ERR 1
00538 #define WAS2ERR 2
00539 #define WAS3ERR 3
00540 #define yyclearin pcyytoken = -1
00541 #define yyerrok   pcyyerrfl = 0
00542 YYSTYPE yyv[YYMAXDEPTH];     /* value stack */
00543 int pcyyerrct = 0;           /* error count */
00544 int pcyyerrfl = 0;           /* error flag */
00545 int redseq[YYREDMAX];
00546 int redcnt = 0;
00547 int pcyytoken = -1;          /* input token */
00548 
00549 
00550 int yyparse(void)
00551 {
00552   int statestack[YYMAXDEPTH]; /* state stack */
00553   int      j, m;              /* working index */
00554   YYSTYPE *yypvt;
00555   int      tmpstate, *yyps, n;
00556   YYSTYPE *yypv;
00557 
00558 #ifdef YYDEBUG
00559   int tmptoken = -1;
00560 #endif
00561 
00562 
00563   tmpstate = 0;
00564   pcyytoken = -1;
00565   pcyyerrct = 0;
00566   pcyyerrfl = 0;
00567   yyps = &statestack[-1];
00568   yypv = &yyv[-1];
00569 
00570 
00571   enstack:    /* push stack */
00572 #ifdef YYDEBUG
00573     printf("at state %d, next token %d\n", tmpstate, tmptoken);
00574 #endif
00575     if (++yyps - &statestack[YYMAXDEPTH-1] > 0) {
00576       yyerror("pcyacc internal stack overflow");
00577       return(1);
00578     }
00579     *yyps = tmpstate;
00580     ++yypv;
00581     *yypv = yyval;
00582 
00583 
00584   newstate:
00585     n = yypact[tmpstate];
00586     if (n <= PCYYFLAG) goto defaultact; /*  a simple state */
00587 
00588 
00589     if (pcyytoken < 0) if ((pcyytoken=yylex()) < 0) pcyytoken = 0;
00590     if ((n += pcyytoken) < 0 || n >= YYLAST) goto defaultact;
00591 
00592 
00593     if (yychk[n=yyact[n]] == pcyytoken) { /* a shift */
00594 #ifdef YYDEBUG
00595       tmptoken  = pcyytoken;
00596 #endif
00597       pcyytoken = -1;
00598       yyval = yylval;
00599       tmpstate = n;
00600       if (pcyyerrfl > 0) --pcyyerrfl;
00601       goto enstack;
00602     }
00603 
00604 
00605   defaultact:
00606 
00607 
00608     if ((n=yydef[tmpstate]) == -2) {
00609       if (pcyytoken < 0) if ((pcyytoken=yylex())<0) pcyytoken = 0;
00610       for (yyxi=yyexca; (*yyxi!= (-1)) || (yyxi[1]!=tmpstate); yyxi += 2)
00611         ;
00612       while (*(yyxi+=2) >= 0) if (*yyxi == pcyytoken) break;
00613       if ((n=yyxi[1]) < 0) { /* an accept action */
00614         if (yytflag) {
00615           int ti; int tj;
00616           yytfilep = fopen(yytfilen, "w");
00617           if (yytfilep == NULL) {
00618             fprintf(stderr, "Can't open t file: %s\n", yytfilen);
00619             return(0);          }
00620           for (ti=redcnt-1; ti>=0; ti--) {
00621             tj = svdprd[redseq[ti]];
00622             while (strcmp(svdnams[tj], "$EOP"))
00623               fprintf(yytfilep, "%s ", svdnams[tj++]);
00624             fprintf(yytfilep, "\n");
00625           }
00626           fclose(yytfilep);
00627         }
00628         return (0);
00629       }
00630     }
00631 
00632 
00633     if (n == 0) {        /* error situation */
00634       switch (pcyyerrfl) {
00635         case WAS0ERR:          /* an error just occurred */
00636           yyerror("syntax error");
00637           //yyerrlab:
00638             ++pcyyerrct;
00639         case WAS1ERR:
00640         case WAS2ERR:           /* try again */
00641           pcyyerrfl = 3;
00642        /* find a state for a legal shift action */
00643           while (yyps >= statestack) {
00644          n = yypact[*yyps] + YYERRCODE;
00645          if (n >= 0 && n < YYLAST && yychk[yyact[n]] == YYERRCODE) {
00646            tmpstate = yyact[n];  /* simulate a shift of "error" */
00647            goto enstack;
00648             }
00649          n = yypact[*yyps];
00650 
00651 
00652          /* the current yyps has no shift on "error", pop stack */
00653 #ifdef YYDEBUG
00654             printf("error: pop state %d, recover state %d\n", *yyps, yyps[-1]);
00655 #endif
00656          --yyps;
00657          --yypv;
00658        }
00659 
00660 
00661        yyabort:
00662             if (yytflag) {
00663               int ti; int tj;
00664               yytfilep = fopen(yytfilen, "w");
00665               if (yytfilep == NULL) {
00666                 fprintf(stderr, "Can't open t file: %s\n", yytfilen);
00667                 return(1);              }
00668               for (ti=1; ti<redcnt; ti++) {
00669                 tj = svdprd[redseq[ti]];
00670                 while (strcmp(svdnams[tj], "$EOP"))
00671                   fprintf(yytfilep, "%s ", svdnams[tj++]);
00672                 fprintf(yytfilep, "\n");
00673               }
00674               fclose(yytfilep);
00675             }
00676          return(1);
00677 
00678 
00679      case WAS3ERR:  /* clobber input char */
00680 #ifdef YYDEBUG
00681           printf("error: discard token %d\n", pcyytoken);
00682 #endif
00683           if (pcyytoken == 0) goto yyabort; /* quit */
00684        pcyytoken = -1;
00685        goto newstate;      } /* switch */
00686     } /* if */
00687 
00688 
00689     /* reduction, given a production n */
00690 #ifdef YYDEBUG
00691     printf("reduce with rule %d\n", n);
00692 #endif
00693     if (yytflag && redcnt<YYREDMAX) redseq[redcnt++] = n;
00694     yyps -= yyr2[n];
00695     yypvt = yypv;
00696     yypv -= yyr2[n];
00697     yyval = yypv[1];
00698     m = n;
00699     /* find next state from goto table */
00700     n = yyr1[n];
00701     j = yypgo[n] + *yyps + 1;
00702     if (j>=YYLAST || yychk[ tmpstate = yyact[j] ] != -n) tmpstate = yyact[yypgo[n]];
00703     switch (m) { /* actions associated with grammar rules */
00704       
00705       case 1:
00706 # line 205 "langparser.y"
00707       {
00708             
00709             yytrace ("module | statementlist eoltoken");
00710             
00711             if (pcyyerrct) {
00712                 
00713                 yyval = yypvt[-1];
00714                 
00715                 return (1);
00716                 }
00717             
00718             if (!pushbinaryoperation (moduleop, yypvt[-1], nil, &yyval))
00719                 goto cleanexit;
00720             
00721             return (0);
00722         
00723         cleanexit:
00724             while (--yypv - &yyv[0] > 0)
00725                 langdisposetree (*yypv);
00726         
00727             return (2);
00728             } break;
00729       case 2:
00730 # line 228 "langparser.y"
00731       {
00732             
00733             yytrace ("module | error");
00734             
00735             return (1);
00736             } break;
00737       case 3:
00738 # line 238 "langparser.y"
00739       {
00740             
00741             yytrace ("bracketedidentifier : identifiertoken");
00742             
00743             yyval = yypvt[-0];
00744             } break;
00745       case 4:
00746 # line 245 "langparser.y"
00747       {
00748             
00749             yytrace ("bracketedidentifier | '[' expr ']'");
00750             
00751             if (!pushunaryoperation (bracketop, yypvt[-1], &yyval))
00752                 goto cleanexit;
00753             } break;
00754       case 5:
00755 # line 256 "langparser.y"
00756       {
00757             
00758             yytrace ("handlerheader | ontoken bracketedidentifier '(' namelist ')'");
00759             
00760             if (!pushbinaryoperation (procop, yypvt[-3], yypvt[-1], &yyval))
00761                 goto cleanexit;
00762             } break;
00763       case 6:
00764 # line 264 "langparser.y"
00765       {
00766             
00767             yytrace ("handlerheader | ontoken bracketedidentifier '(' ')'");
00768             
00769             if (!pushbinaryoperation (procop, yypvt[-2], nil, &yyval))
00770                 goto cleanexit;
00771             } break;
00772       case 7:
00773 # line 282 "langparser.y"
00774       {
00775             
00776             yytrace ("optionalinit | empty");
00777             
00778             yyval = nil;
00779             } break;
00780       case 8:
00781 # line 289 "langparser.y"
00782       {
00783             
00784             yytrace ("optionalinit | assigntoken expr");
00785             
00786             yyval = yypvt[-0];
00787             } break;
00788       case 9:
00789 # line 296 "langparser.y"
00790       {
00791             
00792             yytrace ("optionalinit | error");
00793             
00794             yyval = nil;
00795             } break;
00796       case 10:
00797 # line 306 "langparser.y"
00798       {
00799             
00800             yytrace ("namelistid | optionalinit");
00801             
00802             if (yypvt[-0] == nil)
00803                 yyval = yypvt[-1]; /*just return the id*/
00804                 
00805             else {
00806                 if (!pushbinaryoperation (assignlocalop, yypvt[-1], yypvt[-0], &yyval))
00807                     goto cleanexit;
00808                 }
00809             } break;
00810       case 11:
00811 # line 319 "langparser.y"
00812       {
00813             
00814             yytrace ("namelistid | error");
00815             
00816             yyval = nil;
00817             } break;
00818       case 12:
00819 # line 329 "langparser.y"
00820       {
00821             
00822             yytrace ("namelist | namelistid");
00823             
00824             yyval = yypvt[-0]; /*start the name list off with our address*/
00825             } break;
00826       case 13:
00827 # line 336 "langparser.y"
00828       {
00829             
00830             yytrace ("namelist | namelist ',' namelistid");
00831             
00832             if (!pushlastlink (yypvt[-0], yypvt[-2])) /*add new name to end of list*/
00833                 goto cleanexit;
00834             } break;
00835       case 14:
00836 # line 344 "langparser.y"
00837       {
00838             
00839             yytrace ("namelist | namelist ';' namelistid");
00840             
00841             if (!pushlastlink (yypvt[-0], yypvt[-2])) /*add new name to end of list*/
00842                 goto cleanexit;
00843             } break;
00844       case 15:
00845 # line 355 "langparser.y"
00846       {
00847             
00848             yytrace ("statementlist: statement");
00849             
00850             yyval = yypvt[-0]; /*start the statement list off with our address*/
00851             } break;
00852       case 16:
00853 # line 362 "langparser.y"
00854       {
00855             
00856             yytrace ("statementlist | statementlist ';' statement");
00857             
00858             if (!pushlastlink (yypvt[-0], yypvt[-2])) /*add new statement to end of list*/
00859                 goto cleanexit;
00860             
00861             yyval = yypvt[-2]; 
00862             } break;
00863       case 17:
00864 # line 375 "langparser.y"
00865       {
00866             
00867             yytrace ("bracketedstatementlist: '{' statementlist '}'");
00868             
00869             yyval = yypvt[-1];
00870             } break;
00871       case 18:
00872 # line 382 "langparser.y"
00873       {
00874             
00875             yytrace ("bracketedstatementlist | error");
00876             
00877             yyval = nil;
00878             } break;
00879       case 19:
00880 # line 392 "langparser.y"
00881       {
00882             
00883             yytrace ("derefid : term '^'");
00884             
00885             if (!pushunaryoperation (dereferenceop, yypvt[-1], &yyval))
00886                 goto cleanexit;
00887             } break;
00888       case 20:
00889 # line 400 "langparser.y"
00890       {
00891             
00892             yytrace ("derefid | functionref '^'");
00893             
00894             if (!pushunaryoperation (dereferenceop, yypvt[-1], &yyval))
00895                 goto cleanexit;
00896             } break;
00897       case 21:
00898 # line 408 "langparser.y"
00899       {
00900             
00901             yytrace ("derefid | '(' expr ')' '^'");
00902             
00903             if (!pushunaryoperation (dereferenceop, yypvt[-2], &yyval))
00904                 goto cleanexit;
00905             } break;
00906       case 22:
00907 # line 419 "langparser.y"
00908       {
00909             
00910             yytrace ("dottedid : term '.' bracketedidentifier");
00911             
00912             if (!pushbinaryoperation (dotop, yypvt[-2], yypvt[-0], &yyval))
00913                 goto cleanexit;
00914             } break;
00915       case 23:
00916 # line 427 "langparser.y"
00917       {
00918             
00919             yytrace ("dottedid : term '.' error");
00920             
00921             yyval = yypvt[-2];
00922             } break;
00923       case 24:
00924 # line 437 "langparser.y"
00925       {
00926             
00927             yytrace ("rangeref: expr totoken expr");
00928             
00929             if (!pushbinaryoperation (rangeop, yypvt[-2], yypvt[-0], &yyval))
00930                 goto cleanexit;
00931             } break;
00932       case 25:
00933 # line 448 "langparser.y"
00934       {
00935             
00936             yytrace ("arrayref: term '[' expr ']'");
00937             
00938             if (!pushbinaryoperation (arrayop, yypvt[-3], yypvt[-1], &yyval))
00939                 goto cleanexit;
00940             } break;
00941       case 26:
00942 # line 456 "langparser.y"
00943       {
00944             
00945             yytrace ("arrayref | term '[' rangeref ']'");
00946             
00947             if (!pushbinaryoperation (arrayop, yypvt[-3], yypvt[-1], &yyval))
00948                 goto cleanexit;
00949             } break;
00950       case 27:
00951 # line 464 "langparser.y"
00952       {
00953             
00954             yytrace ("arrayref | term '[' fieldspec ']'");
00955             
00956             if (!pushbinaryoperation (arrayop, yypvt[-3], yypvt[-1], &yyval))
00957                 goto cleanexit;
00958             } break;
00959       case 28:
00960 # line 475 "langparser.y"
00961       {
00962             
00963             yytrace ("term: dottedid");
00964             
00965             yyval = yypvt[-0];
00966             } break;
00967       case 29:
00968 # line 482 "langparser.y"
00969       {
00970             
00971             yytrace ("term | arrayref");
00972             
00973             yyval = yypvt[-0];
00974             } break;
00975       case 30:
00976 # line 489 "langparser.y"
00977       {
00978             
00979             yytrace ("term | bracketedidentifier");
00980             
00981             yyval = yypvt[-0];
00982             } break;
00983       case 31:
00984 # line 496 "langparser.y"
00985       {
00986             
00987             yytrace ("term | derefid");
00988             
00989             yyval = yypvt[-0];
00990             } break;
00991       case 32:
00992 # line 506 "langparser.y"
00993       {
00994             
00995             yytrace ("statement: <empty statement>");
00996             
00997             if (!pushoperation (noop, &yyval)) /*a place for the debugger to stop*/
00998                 goto cleanexit;
00999             } break;
01000       case 33:
01001 # line 514 "langparser.y"
01002       {
01003             
01004             yytrace ("statement: expr");
01005             
01006             yyval = yypvt[-0];
01007             } break;
01008       case 34:
01009 # line 521 "langparser.y"
01010       {
01011             
01012             yytrace ("statement | term assigntoken expr");
01013             
01014             if (!pushbinaryoperation (assignop, yypvt[-2], yypvt[-0], &yyval))
01015                 goto cleanexit;
01016             } break;
01017       case 35:
01018 # line 529 "langparser.y"
01019       {
01020             
01021             yytrace ("statement : handlerheader bracketedstatementlist");
01022             
01023             if (!pushbinaryoperation (moduleop, yypvt[-0], yypvt[-1], &yyval))
01024                 goto cleanexit;     
01025             } break;
01026       case 36:
01027 # line 537 "langparser.y"
01028       {
01029             
01030             yytrace ("statement : handlerheader '{' kernelcall '}'");
01031             
01032             if (!pushbinaryoperation (moduleop, yypvt[-1], yypvt[-3], &yyval))
01033                 goto cleanexit;     
01034             } break;
01035       case 37:
01036 # line 545 "langparser.y"
01037       {
01038             
01039             yytrace ("statement | localtoken '(' namelist ')'");
01040             
01041             if (!pushunaryoperation (localop, yypvt[-1], &yyval))
01042                 goto cleanexit;
01043             } break;
01044       case 38:
01045 # line 553 "langparser.y"
01046       {
01047             
01048             yytrace ("statement | localtoken '{' namelist '}'");
01049             
01050             if (!pushunaryoperation (localop, yypvt[-1], &yyval))
01051                 goto cleanexit;
01052             } break;
01053       case 39:
01054 # line 561 "langparser.y"
01055       {
01056             
01057             yytrace ("statement | globaltoken '(' namelist ')'");
01058             
01059             if (!pushunaryoperation (globalop, yypvt[-1], &yyval))
01060                 goto cleanexit;
01061             } break;
01062       case 40:
01063 # line 569 "langparser.y"
01064       {
01065             
01066             yytrace ("statement | globaltoken '{' namelist '}'");
01067             
01068             if (!pushunaryoperation (globalop, yypvt[-1], &yyval))
01069                 goto cleanexit;
01070             } break;
01071       case 41:
01072 # line 577 "langparser.y"
01073       {
01074             
01075             yytrace ("statement | fileloopheader bracketedstatementlist");
01076             
01077             if (!pushtripletstatementlists (nil, yypvt[-0], yypvt[-1]))
01078                 goto cleanexit;
01079             
01080             yyval = yypvt[-1];
01081             } break;
01082       case 42:
01083 # line 587 "langparser.y"
01084       {
01085             
01086             yytrace ("statement | loopheader bracketedstatementlist");
01087             
01088             if (!pushloopbody (yypvt[-0], yypvt[-1]))
01089                 goto cleanexit;
01090             
01091             yyval = yypvt[-1];
01092             } break;
01093       case 43:
01094 # line 597 "langparser.y"
01095       {
01096             
01097             yytrace ("statement | forloopheader bracketedstatementlist");
01098             
01099             if (!pushloopbody (yypvt[-0], yypvt[-1]))
01100                 goto cleanexit;
01101             
01102             yyval = yypvt[-1];
01103             } break;
01104       case 44:
01105 # line 607 "langparser.y"
01106       {
01107             
01108             yytrace ("statement | forinloopheader bracketedstatementlist");
01109             
01110             if (!pushloopbody (yypvt[-0], yypvt[-1]))
01111                 goto cleanexit;
01112             
01113             yyval = yypvt[-1];
01114             } break;
01115       case 45:
01116 # line 617 "langparser.y"
01117       {
01118             
01119             yytrace ("statement | ifheader bracketedstatementlist");
01120             
01121             if (!pushtripletstatementlists (yypvt[-0], nil, yypvt[-1]))
01122                 goto cleanexit;
01123             
01124             yyval = yypvt[-1];
01125             } break;
01126       case 46:
01127 # line 627 "langparser.y"
01128       {
01129             
01130             yytrace ("statement | ifheader bracketedstatementlist elsetoken bracketedstatementlist");
01131             
01132             if (!pushtripletstatementlists (yypvt[-2], yypvt[-0], yypvt[-3]))
01133                 goto cleanexit;
01134             
01135             yyval = yypvt[-3];
01136             } break;
01137       case 47:
01138 # line 637 "langparser.y"
01139       {
01140             
01141             yytrace ("statement | bundleheader bracketedstatementlist");
01142             
01143             if (!pushunarystatementlist (yypvt[-0], yypvt[-1]))
01144                 goto cleanexit;
01145             
01146             yyval = yypvt[-1];
01147             } break;
01148       case 48:
01149 # line 647 "langparser.y"
01150       {
01151             
01152             yytrace ("statement | breaktoken '(' ')'");
01153             
01154             if (!pushoperation (breakop, &yyval))
01155                 goto cleanexit;
01156             } break;
01157       case 49:
01158 # line 655 "langparser.y"
01159       {
01160             
01161             yytrace ("statement | breaktoken");
01162             
01163             if (!pushoperation (breakop, &yyval))
01164                 goto cleanexit;
01165             } break;
01166       case 50:
01167 # line 663 "langparser.y"
01168       {
01169             
01170             yytrace ("statement | continuetoken");
01171             
01172             if (!pushoperation (continueop, &yyval))
01173                 goto cleanexit;
01174             } break;
01175       case 51:
01176 # line 671 "langparser.y"
01177       {
01178             
01179             yytrace ("statement | returntoken");
01180             
01181             if (!pushunaryoperation (returnop, yypvt[-0], &yyval))
01182                 goto cleanexit;
01183             } break;
01184       case 52:
01185 # line 679 "langparser.y"
01186       {
01187             
01188             yytrace ("statement | caseheader casebody");
01189             
01190             if (!pushtripletstatementlists (yypvt[-1], nil, yypvt[-3]))
01191                 goto cleanexit;
01192             
01193             yyval = yypvt[-3];
01194             } break;
01195       case 53:
01196 # line 689 "langparser.y"
01197       {
01198             
01199             yytrace ("statement | caseheader casebody elsetoken bracketedstatementlist");
01200             
01201             if (!pushtripletstatementlists (yypvt[-3], yypvt[-0], yypvt[-5]))
01202                 goto cleanexit;
01203             
01204             yyval = yypvt[-5];
01205             } break;
01206       case 54:
01207 # line 699 "langparser.y"
01208       {
01209             
01210             yytrace ("statement | withheader bracketedstatementlist");
01211             
01212             if (!pushtripletstatementlists (yypvt[-0], nil, yypvt[-1]))
01213                 goto cleanexit;
01214             
01215             yyval = yypvt[-1];
01216             } break;
01217       case 55:
01218 # line 709 "langparser.y"
01219       {
01220             
01221             yytrace ("statement | tryheader bracketedstatementlist");
01222             
01223             if (!pushtripletstatementlists (yypvt[-0], nil, yypvt[-1]))
01224                 goto cleanexit;
01225             
01226             yyval = yypvt[-1];
01227             } break;
01228       case 56:
01229 # line 719 "langparser.y"
01230       {
01231             
01232             yytrace ("statement | tryheader bracketedstatementlist elsetoken bracketedstatementlist");
01233             
01234             if (!pushtripletstatementlists (yypvt[-2], yypvt[-0], yypvt[-3]))
01235                 goto cleanexit;
01236             
01237             yyval = yypvt[-3];
01238             } break;
01239       case 57:
01240 # line 729 "langparser.y"
01241       {
01242             
01243             yytrace ("statement | expr error");
01244             
01245             yyval = yypvt[-1];
01246             } break;
01247       case 58:
01248 # line 747 "langparser.y"
01249       {
01250             
01251             yytrace ("kernelcall: kerneltoken '(' dottedid ')'");
01252             
01253             if (!pushkernelcall (yypvt[-1], &yyval))
01254                 return (1);
01255             } break;
01256       case 59:
01257 # line 778 "langparser.y"
01258       {
01259             
01260             yytrace ("fileloopheader: filelooptoken '(' bracketedidentifier intoken expr ')'");
01261             
01262             if (!pushquadruplet (fileloopop, yypvt[-3], yypvt[-1], nil, nil, &yyval))
01263                 goto cleanexit;
01264             } break;
01265       case 60:
01266 # line 786 "langparser.y"
01267       {
01268             
01269             yytrace ("fileloopheader | filelooptoken '(' bracketedidentifier intoken expr ',' expr ')'");
01270             
01271             if (!pushquadruplet (fileloopop, yypvt[-5], yypvt[-3], nil, yypvt[-1], &yyval))
01272                 goto cleanexit;
01273             } break;
01274       case 61:
01275 # line 794 "langparser.y"
01276       {
01277             
01278             yytrace ("fileloopheader | filelooptoken '(' bracketedidentifier error");
01279             
01280             if (!pushquadruplet (fileloopop, yypvt[-1], nil, nil, nil, &yyval))
01281                 goto cleanexit;
01282             } break;
01283       case 62:
01284 # line 805 "langparser.y"
01285       {
01286             
01287             yytrace ("loopheader: looptoken '(' statement ';' expr ';' statement ')'");
01288             
01289             if (!pushloop (yypvt[-5], yypvt[-3], yypvt[-1], &yyval))
01290                 goto cleanexit;
01291             } break;
01292       case 63:
01293 # line 813 "langparser.y"
01294       {
01295             
01296             yytrace ("loopheader | looptoken");
01297             
01298             if (!pushloop (nil, nil, nil, &yyval))
01299                 goto cleanexit;
01300             } break;
01301       case 64:
01302 # line 821 "langparser.y"
01303       {
01304             
01305             yytrace ("loopheader | looptoken '(' expr ')'");
01306             
01307             if (!pushloop (yypvt[-1], nil, nil, &yyval))
01308                 goto cleanexit;
01309             } break;
01310       case 65:
01311 # line 829 "langparser.y"
01312       {
01313             
01314             yytrace ("loopheader | whiletoken expr");
01315             
01316             if (!pushloop (nil, yypvt[-0], nil, &yyval))
01317                 goto cleanexit;
01318             } break;
01319       case 66:
01320 # line 837 "langparser.y"
01321       {
01322             
01323             yytrace ("loopheader | looptoken '(' statement ';' expr ')'");
01324             
01325             if (!pushloop (yypvt[-3], yypvt[-1], nil, &yyval))
01326                 goto cleanexit;
01327             } break;
01328       case 67:
01329 # line 848 "langparser.y"
01330       {
01331             
01332             yytrace ("forloopheader: fortoken term assigntoken expr totoken expr");
01333             
01334             if (!pushquadruplet (forloopop, yypvt[-2], yypvt[-0], yypvt[-4], nil, &yyval))
01335                 goto cleanexit;
01336             } break;
01337       case 68:
01338 # line 856 "langparser.y"
01339       {
01340             
01341             yytrace ("forloopheader | fortoken '(' term assigntoken expr totoken expr ')' ");
01342             
01343             if (!pushquadruplet (forloopop, yypvt[-3], yypvt[-1], yypvt[-5], nil, &yyval))
01344                 goto cleanexit;
01345             } break;
01346       case 69:
01347 # line 864 "langparser.y"
01348       {
01349             
01350             yytrace ("forloopheader | fortoken term assigntoken expr downtotoken expr");
01351             
01352             if (!pushquadruplet (fordownloopop, yypvt[-2], yypvt[-0], yypvt[-4], nil, &yyval))
01353                 goto cleanexit;
01354             } break;
01355       case 70:
01356 # line 872 "langparser.y"
01357       {
01358             
01359             yytrace ("forloopheader | fortoken '(' term assigntoken expr downtotoken expr ')' ");
01360             
01361             if (!pushquadruplet (fordownloopop, yypvt[-3], yypvt[-1], yypvt[-5], nil, &yyval))
01362                 goto cleanexit;
01363             } break;
01364       case 71:
01365 # line 880 "langparser.y"
01366       {
01367             
01368             yytrace ("forloopheader: fortoken term assigntoken expr error");
01369             
01370             if (!pushquadruplet (noop, yypvt[-3], yypvt[-1], nil, nil, &yyval))
01371                 goto cleanexit;
01372             } break;
01373       case 72:
01374 # line 888 "langparser.y"
01375       {
01376             
01377             yytrace ("forloopheader: fortoken term error");
01378             
01379             if (!pushquadruplet (noop, yypvt[-1], nil, nil, nil, &yyval))
01380                 goto cleanexit;
01381             } break;
01382       case 73:
01383 # line 899 "langparser.y"
01384       {
01385             
01386             yytrace ("forinloopheader: fortoken term intoken expr");
01387             
01388             if (!pushquadruplet (forinloopop, yypvt[-0], yypvt[-2], nil, nil, &yyval))
01389                 goto cleanexit;
01390             } break;
01391       case 74:
01392 # line 907 "langparser.y"
01393       {
01394             
01395             yytrace ("forinloopheader | fortoken '(' term intoken expr ')' ");
01396             
01397             if (!pushquadruplet (forinloopop, yypvt[-1], yypvt[-3], nil, nil, &yyval))
01398                 goto cleanexit;
01399             } break;
01400       case 75:
01401 # line 918 "langparser.y"
01402       {
01403             
01404             yytrace ("ifheader: iftoken expr");
01405             
01406             if (!pushtriplet (ifop, yypvt[-0], nil, nil, &yyval))
01407                 goto cleanexit;
01408             } break;
01409       case 76:
01410 # line 929 "langparser.y"
01411       {
01412             
01413             yytrace ("tryheader | trytoken");
01414             
01415             if (!pushtriplet (tryop, nil, nil, nil, &yyval)) /*it's really just a binary*/
01416                 goto cleanexit;
01417             } break;
01418       case 77:
01419 # line 940 "langparser.y"
01420       {
01421             
01422             yytrace ("bundleheader: bundletoken");
01423             
01424             if (!pushunaryoperation (bundleop, nil, &yyval))
01425                 goto cleanexit;
01426             } break;
01427       case 78:
01428 # line 951 "langparser.y"
01429       {
01430             
01431             yytrace ("caseheader | casetoken expr");
01432             
01433             if (!pushtriplet (caseop, yypvt[-0], nil, nil, &yyval))
01434                 goto cleanexit;
01435             } break;
01436       case 79:
01437 # line 962 "langparser.y"
01438       {
01439         
01440             yytrace ("optionalstatementlist : (empty list)");
01441             
01442             yyval = nil;
01443             } break;
01444       case 80:
01445 # line 969 "langparser.y"
01446       {
01447             
01448             yytrace ("optionalstatementlist | bracketedstatementlist");
01449             
01450             yyval = yypvt[-0];
01451             } break;
01452       case 81:
01453 # line 979 "langparser.y"
01454       {
01455             
01456             yytrace ("casebody: expr optionalstatementlist");
01457             
01458             if (!pushbinaryoperation (casebodyop, yypvt[-1], yypvt[-0], &yyval))
01459                 goto cleanexit;
01460             } break;
01461       case 82:
01462 # line 987 "langparser.y"
01463       {
01464             
01465             yytrace ("casebody | casebody ';' expr optionalstatementlist");
01466             
01467             if (!pushbinaryoperation (casebodyop, yypvt[-1], yypvt[-0], &yyval))
01468                 goto cleanexit;
01469             
01470             if (!pushlastlink (yyval, yypvt[-3]))
01471                 goto cleanexit;
01472             
01473             yyval = yypvt[-3];
01474             } break;
01475       case 83:
01476 # line 1003 "langparser.y"
01477       {
01478             
01479             yytrace ("withheader: withtoken termlist");
01480             
01481             if (!pushbinaryoperation (withop, yypvt[-0], nil, &yyval))
01482                 goto cleanexit;
01483             } break;
01484       case 84:
01485 # line 1014 "langparser.y"
01486       {
01487             
01488             yytrace ("termlist: term");
01489             
01490             yyval = yypvt[-0];
01491             } break;
01492       case 85:
01493 # line 1021 "langparser.y"
01494       {
01495             
01496             yytrace ("termlist | termlist ',' term");
01497             
01498             if (!pushlastlink (yypvt[-0], yypvt[-2]))
01499                 goto cleanexit;
01500                 
01501             yyval = yypvt[-2];
01502             } break;
01503       case 86:
01504 # line 1034 "langparser.y"
01505       {
01506             
01507             yytrace ("exprlist: expr");
01508             
01509             yyval = yypvt[-0];
01510             } break;
01511       case 87:
01512 # line 1041 "langparser.y"
01513       {
01514             
01515             yytrace ("exprlist | exprlist ',' expr");
01516             
01517             if (!pushlastlink (yypvt[-0], yypvt[-2]))
01518                 goto cleanexit;
01519                 
01520             yyval = yypvt[-2];
01521             } break;
01522       case 88:
01523 # line 1055 "langparser.y"
01524       {
01525         
01526             yytrace ("optionalexprlist : (empty list)");
01527             
01528             yyval = nil;
01529             } break;
01530       case 89:
01531 # line 1062 "langparser.y"
01532       {
01533             
01534             yytrace ("optionalexprlist | exprlist");
01535             
01536             yyval = yypvt[-0];
01537             } break;
01538       case 90:
01539 # line 1094 "langparser.y"
01540       {
01541             
01542             yytrace ("optionalexpr : (empty expr)");
01543             
01544             yyval = nil;
01545             } break;
01546       case 91:
01547 # line 1101 "langparser.y"
01548       {
01549             
01550             yytrace ("optionalexpr | expr");
01551             
01552             yyval = yypvt[-0];
01553             } break;
01554       case 92:
01555 # line 1112 "langparser.y"
01556       {
01557             
01558             yytrace ("fieldspec: expr : expr ");
01559             
01560             if (!pushbinaryoperation (fieldop, yypvt[-2], yypvt[-0], &yyval))
01561                 goto cleanexit;
01562             } break;
01563       case 93:
01564 # line 1123 "langparser.y"
01565       {
01566             
01567             yytrace ("fieldlist: fieldspec ");
01568             
01569             yyval = yypvt[-0];
01570             } break;
01571       case 94:
01572 # line 1130 "langparser.y"
01573       {
01574             
01575             yytrace ("fieldlist | fieldlist ',' fieldspec");
01576             
01577             if (!pushlastlink (yypvt[-0], yypvt[-2]))
01578                 goto cleanexit;
01579             
01580             yyval = yypvt[-2];
01581             } break;
01582       case 95:
01583 # line 1143 "langparser.y"
01584       {
01585             
01586             yytrace ("namedvalue: bracketedidentifier : expr ");
01587             
01588             if (!pushbinaryoperation (fieldop, yypvt[-2], yypvt[-0], &yyval))
01589                 goto cleanexit;
01590             } break;
01591       case 96:
01592 # line 1154 "langparser.y"
01593       {
01594             
01595             yytrace ("namedvaluelist: namedvalue ");
01596             
01597             yyval = yypvt[-0];
01598             } break;
01599       case 97:
01600 # line 1161 "langparser.y"
01601       {
01602             
01603             yytrace ("namedvaluelist | namedvaluelist ',' namedvalue");
01604             
01605             if (!pushlastlink (yypvt[-0], yypvt[-2]))
01606                 goto cleanexit;
01607             
01608             yyval = yypvt[-2];
01609             } break;
01610       case 98:
01611 # line 1174 "langparser.y"
01612       {
01613             
01614             yytrace ("parameterlist : optionalexprlist");
01615             
01616             yyval = yypvt[-0];
01617             } break;
01618       case 99:
01619 # line 1181 "langparser.y"
01620       {
01621             
01622             yytrace ("parameterlist | namedvaluelist");
01623             
01624             yyval = yypvt[-0];
01625             } break;
01626       case 100:
01627 # line 1188 "langparser.y"
01628       {
01629             
01630             yytrace ("parameterlist | exprlist ',' namedvaluelist");
01631             
01632             if (!pushlastlink (yypvt[-0], yypvt[-2]))
01633                 goto cleanexit;
01634             
01635             yyval = yypvt[-2];
01636             } break;
01637       case 101:
01638 # line 1202 "langparser.y"
01639       {
01640             
01641             yytrace ("functionref: term '(' parameterlist ')'");
01642             
01643             if (!pushfunctioncall (yypvt[-3], yypvt[-1], &yyval))
01644                 goto cleanexit;
01645             } break;
01646       case 102:
01647 # line 1212 "langparser.y"
01648       {
01649             
01650             yytrace ("expr | constanttoken");
01651             
01652             yyval = yypvt[-0];
01653             } break;
01654       case 103:
01655 # line 1219 "langparser.y"
01656       {
01657             
01658             yytrace ("expr | term");
01659             
01660             yyval = yypvt[-0];
01661             } break;
01662       case 104:
01663 # line 1226 "langparser.y"
01664       {
01665             
01666             yytrace ("expr | '@' term");
01667             
01668             if (!pushunaryoperation (addressofop, yypvt[-0], &yyval))
01669                 goto cleanexit;
01670             } break;
01671       case 105:
01672 # line 1234 "langparser.y"
01673       {
01674             
01675             yytrace ("expr | functionref");
01676             
01677             yyval = yypvt[-0];
01678             } break;
01679       case 106:
01680 # line 1241 "langparser.y"
01681       {
01682             
01683             yytrace ("expr | plusplustoken term"); 
01684             
01685             if (!pushunaryoperation (incrpreop, yypvt[-0], &yyval))
01686                 goto cleanexit;
01687             } break;
01688       case 107:
01689 # line 1249 "langparser.y"
01690       {
01691             
01692             yytrace ("expr | term plusplustoken");
01693             
01694             if (!pushunaryoperation (incrpostop, yypvt[-1], &yyval))
01695                 goto cleanexit;
01696             } break;
01697       case 108:
01698 # line 1257 "langparser.y"
01699       {
01700             
01701             yytrace ("expr | minusminustoken term");
01702             
01703             if (!pushunaryoperation (decrpreop, yypvt[-0], &yyval))
01704                 goto cleanexit;
01705             } break;
01706       case 109:
01707 # line 1265 "langparser.y"
01708       {
01709             
01710             yytrace ("expr | term minusminustoken");
01711             
01712             if (!pushunaryoperation (decrpostop, yypvt[-1], &yyval))
01713                 goto cleanexit;
01714             } break;
01715       case 110:
01716 # line 1273 "langparser.y"
01717       {
01718             
01719             yytrace ("expr | '(' expr ')'");
01720             
01721             yyval = yypvt[-1];
01722             } break;
01723       case 111:
01724 # line 1280 "langparser.y"
01725       {
01726             
01727             yytrace ("expr | expr addtoken expr");
01728             
01729             if (!pushbinaryoperation (addop, yypvt[-2], yypvt[-0], &yyval))
01730                 goto cleanexit;
01731             } break;
01732       case 112:
01733 # line 1288 "langparser.y"
01734       {
01735             
01736             yytrace ("expr | expr subtracttoken expr");
01737             
01738             if (!pushbinaryoperation (subtractop, yypvt[-2], yypvt[-0], &yyval))
01739                 goto cleanexit;
01740             } break;
01741       case 113:
01742 # line 1296 "langparser.y"
01743       {
01744             
01745             yytrace ("expr | expr multiplytoken expr");
01746             
01747             if (!pushbinaryoperation (multiplyop, yypvt[-2], yypvt[-0], &yyval))
01748                 goto cleanexit;
01749             } break;
01750       case 114:
01751 # line 1304 "langparser.y"
01752       {
01753             
01754             yytrace ("expr | expr dividetoken expr");
01755             
01756             if (!pushbinaryoperation (divideop, yypvt[-2], yypvt[-0], &yyval))
01757                 goto cleanexit;
01758             } break;
01759       case 115:
01760 # line 1312 "langparser.y"
01761       {
01762             
01763             yytrace ("expr | expr modtoken expr");
01764             
01765             if (!pushbinaryoperation (modop, yypvt[-2], yypvt[-0], &yyval))
01766                 goto cleanexit;
01767             } break;
01768       case 116:
01769 # line 1320 "langparser.y"
01770       {
01771             
01772             yytrace ("expr | expr EQtoken expr");
01773             
01774             if (!pushbinaryoperation (EQop, yypvt[-2], yypvt[-0], &yyval))
01775                 goto cleanexit;
01776             } break;
01777       case 117:
01778 # line 1328 "langparser.y"
01779       {
01780             
01781             yytrace ("expr | expr NEtoken expr");
01782             
01783             if (!pushbinaryoperation (NEop, yypvt[-2], yypvt[-0], &yyval))
01784                 goto cleanexit;
01785             } break;
01786       case 118:
01787 # line 1336 "langparser.y"
01788       {
01789             
01790             yytrace ("expr | expr LTtoken expr");
01791             
01792             if (!pushbinaryoperation (LTop, yypvt[-2], yypvt[-0], &yyval))
01793                 goto cleanexit;
01794             } break;
01795       case 119:
01796 # line 1344 "langparser.y"
01797       {
01798             
01799             yytrace ("expr | expr LEtoken expr");
01800             
01801             if (!pushbinaryoperation (LEop, yypvt[-2], yypvt[-0], &yyval))
01802                 goto cleanexit;
01803             } break;
01804       case 120:
01805 # line 1352 "langparser.y"
01806       {
01807             
01808             yytrace ("expr | expr GTtoken expr");
01809             
01810             if (!pushbinaryoperation (GTop, yypvt[-2], yypvt[-0], &yyval))
01811                 goto cleanexit;
01812             } break;
01813       case 121:
01814 # line 1360 "langparser.y"
01815       {
01816             
01817             yytrace ("expr | expr GEtoken expr");
01818             
01819             if (!pushbinaryoperation (GEop, yypvt[-2], yypvt[-0], &yyval))
01820                 goto cleanexit;
01821             } break;
01822       case 122:
01823 # line 1368 "langparser.y"
01824       {
01825             
01826             yytrace ("expr | expr beginswithtoken expr");
01827             
01828             if (!pushbinaryoperation (beginswithop, yypvt[-2], yypvt[-0], &yyval))
01829                 goto cleanexit;
01830             } break;
01831       case 123:
01832 # line 1376 "langparser.y"
01833       {
01834             
01835             yytrace ("expr | expr endswithtoken expr");
01836             
01837             if (!pushbinaryoperation (endswithop, yypvt[-2], yypvt[-0], &yyval))
01838                 goto cleanexit;
01839             } break;
01840       case 124:
01841 # line 1384 "langparser.y"
01842       {
01843             
01844             yytrace ("expr | expr containstoken expr");
01845             
01846             if (!pushbinaryoperation (containsop, yypvt[-2], yypvt[-0], &yyval))
01847                 goto cleanexit;
01848             } break;
01849       case 125:
01850 # line 1392 "langparser.y"
01851       {
01852             
01853             yytrace ("expr | expr orortoken expr");
01854             
01855             if (!pushbinaryoperation (ororop, yypvt[-2], yypvt[-0], &yyval))
01856                 goto cleanexit;
01857             } break;
01858       case 126:
01859 # line 1400 "langparser.y"
01860       {
01861             
01862             yytrace ("expr | expr andandtoken expr");
01863             
01864             if (!pushbinaryoperation (andandop, yypvt[-2], yypvt[-0], &yyval))
01865                 goto cleanexit;
01866             } break;
01867       case 127:
01868 # line 1408 "langparser.y"
01869       {
01870             
01871             yytrace ("expr | subtracttoken expr %prec unaryminus");
01872             
01873             if (!pushunaryoperation (unaryop, yypvt[-0], &yyval))
01874                 goto cleanexit;
01875             } break;
01876       case 128:
01877 # line 1416 "langparser.y"
01878       {
01879             
01880             yytrace ("expr | nottoken expr");
01881             
01882             if (!pushunaryoperation (notop, yypvt[-0], &yyval))
01883                 goto cleanexit;
01884             } break;
01885       case 129:
01886 # line 1424 "langparser.y"
01887       {
01888             
01889             yytrace ("expr | '{' exprlist '}'");
01890             
01891             if (!pushunaryoperation (listop, yypvt[-1], &yyval))
01892                 goto cleanexit;
01893             } break;
01894       case 130:
01895 # line 1432 "langparser.y"
01896       {
01897             
01898             yytrace ("expr | '{' fieldlist '}'");
01899             
01900             if (!pushunaryoperation (recordop, yypvt[-1], &yyval))
01901                 goto cleanexit;
01902             } break;    }
01903     goto enstack;
01904 }

Generated on Wed May 31 18:19:52 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6