Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

lclinit.c

Go to the documentation of this file.
00001 /*
00002 ** LCLint - annotation-assisted static program checker
00003 ** Copyright (C) 1994-2000 University of Virginia,
00004 **         Massachusetts Institute of Technology
00005 **
00006 ** This program is free software; you can redistribute it and/or modify it
00007 ** under the terms of the GNU General Public License as published by the
00008 ** Free Software Foundation; either version 2 of the License, or (at your
00009 ** option) any later version.
00010 ** 
00011 ** This program is distributed in the hope that it will be useful, but
00012 ** WITHOUT ANY WARRANTY; without even the implied warranty of
00013 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 ** General Public License for more details.
00015 ** 
00016 ** The GNU General Public License is available from http://www.gnu.org/ or
00017 ** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00018 ** MA 02111-1307, USA.
00019 **
00020 ** For information on lclint: lclint-request@cs.virginia.edu
00021 ** To report a bug: lclint-bug@cs.virginia.edu
00022 ** For more information: http://lclint.cs.virginia.edu
00023 */
00024 /*
00025 ** lslinit.c
00026 **
00027 ** Processor for Larch Shared Language Init Files
00028 */
00029 
00030 # include "lclintMacros.nf"
00031 # include "llbasic.h"
00032 # include "gram.h"
00033 # include "lclscan.h"
00034 # include "scanline.h"
00035 # include "lclscanline.h"
00036 # include "lcltokentable.h"
00037 # include "lclsyntable.h"
00038 # include "lslinit.h"
00039 # include "lclinit.h"
00040 # include "shift.h"
00041 
00042 # if 0
00043 /*@notfunction@*/
00044 # define TRACE(rule) printf ("Reducing: %s\n", rule)
00045 # else
00046 /*@notfunction@*/
00047 # define TRACE(rule)
00048 # endif
00049 
00050 static /*@dependent@*/ ltoken nextToken;
00051 static void InitLines (void) /*@modifies nextToken@*/ ;
00052 static void InitLine (void) /*@modifies nextToken@*/;
00053 static void Classification (void) /*@modifies nextToken@*/;
00054 static void CharClass (void) /*@modifies nextToken@*/;
00055 
00056 static void EndCommentChars (void) /*@modifies nextToken@*/ ;
00057 static void IdChars (void) /*@modifies nextToken@*/ ;
00058 static void OpChars (void) /*@modifies nextToken@*/ ;
00059 static void ExtensionChar (void) /*@modifies nextToken@*/ ;
00060 static void SingChars (void) /*@modifies nextToken@*/ ;
00061 static void WhiteChars (void) /*@modifies nextToken@*/ ;
00062 static void EndCommentChar (void) /*@modifies nextToken@*/ ;
00063 static void IdChar (void) /*@modifies nextToken@*/ ;
00064 static void OpChar (void) /*@modifies nextToken@*/ ;
00065 static void SingChar (void) /*@modifies nextToken@*/ ;
00066 static void WhiteChar (void) /*@modifies nextToken@*/ ;
00067 
00068 static void TokenClass (void) /*@modifies nextToken@*/ ;
00069 static void QuantifierSymToks (void) /*@modifies nextToken@*/ ;
00070 static void LogicalOpToks (void) /*@modifies nextToken@*/ ;
00071 static void EqOpToks (void) /*@modifies nextToken@*/ ;
00072 static void EquationSymToks (void) /*@modifies nextToken@*/ ;
00073 static void EqSepSymToks (void) /*@modifies nextToken@*/ ;
00074 static void SelectSymToks (void) /*@modifies nextToken@*/ ;
00075 static void OpenSymToks (void) /*@modifies nextToken@*/ ;
00076 static void SepSymToks (void) /*@modifies nextToken@*/ ;
00077 static void CloseSymToks (void) /*@modifies nextToken@*/ ;
00078 static void SimpleIdToks (void) /*@modifies nextToken@*/ ;
00079 static void MapSymToks (void) /*@modifies nextToken@*/ ;
00080 static void MarkerSymToks (void) /*@modifies nextToken@*/ ;
00081 static void CommentSymToks (void) /*@modifies nextToken@*/ ;
00082 static void QuantifierSymTok (void) /*@modifies nextToken@*/ ;
00083 static void LogicalOpTok (void) /*@modifies nextToken@*/ ;
00084 static void EqOpTok (void) /*@modifies nextToken@*/ ;
00085 static void EquationSymTok (void) /*@modifies nextToken@*/ ;
00086 static void EqSepSymTok (void) /*@modifies nextToken@*/ ;
00087 static void SelectSymTok (void) /*@modifies nextToken@*/ ;
00088 static void OpenSymTok (void) /*@modifies nextToken@*/ ;
00089 static void SepSymTok (void) /*@modifies nextToken@*/ ;
00090 static void CloseSymTok (void) /*@modifies nextToken@*/ ;
00091 static void SimpleIdTok (void) /*@modifies nextToken@*/ ;
00092 static void MapSymTok (void) /*@modifies nextToken@*/ ;
00093 static void MarkerSymTok (void) /*@modifies nextToken@*/ ;
00094 static void CommentSymTok (void) /*@modifies nextToken@*/ ;
00095 static void SynClass (void) /*@modifies nextToken@*/ ;
00096 static void OldToken (void) /*@modifies nextToken@*/ ;
00097 static void NewToken (void) /*@modifies nextToken@*/ ;
00098 static void Token (void) /*@modifies nextToken@*/ ;
00099 
00100 static void InitReduce (LCLInitRuleCode p_rule) /*@modifies nextToken@*/ ;
00101 static void UpdateXCharKeywords (charCode p_xChar) /*@modifies nextToken@*/ ;
00102 static void ProcessExtensionChar (void) /*@modifies nextToken@*/ ;
00103 static void ProcessEndCommentChar (void) /*@modifies nextToken@*/ ;
00104 static void ProcessSingleChar (charCode p_code) /*@modifies nextToken@*/ ;
00105 static void ProcessToken (ltokenCode p_code) /*@modifies nextToken@*/ ;
00106 static void ProcessSynonym (void) /*@modifies nextToken@*/ ;
00107 
00108 static void
00109   LocalUserError (/*@unused@*/ ltoken p_t, /*@temp@*/ char *p_msg)
00110   /*@modifies *g_msgstream@*/ ;
00111 
00112 /* If TRUE character has been redefined as a singleChar. */
00113 static bool defineSingleChar[LASTCHAR + 1];
00114 
00115 static charCode currentExtensionChar;
00116 
00117 /* LSL init file keyword tokens.  */
00118 
00119 static /*@exposed@*/ ltoken endCommentCharToken;
00120 static /*@exposed@*/ ltoken idCharToken;
00121 static /*@exposed@*/ ltoken opCharToken;
00122 static /*@exposed@*/ ltoken extensionCharToken;
00123 static /*@exposed@*/ ltoken singleCharToken;
00124 static /*@exposed@*/ ltoken whiteCharToken;
00125 
00126 static /*@exposed@*/ ltoken quantifierSymToken;
00127 static /*@exposed@*/ ltoken logicalOpToken;
00128 static /*@exposed@*/ ltoken eqOpToken;
00129 static /*@exposed@*/ ltoken equationSymToken;
00130 static /*@exposed@*/ ltoken eqSepSymToken;
00131 static /*@exposed@*/ ltoken selectSymToken;
00132 static /*@exposed@*/ ltoken openSymToken;
00133 static /*@exposed@*/ ltoken sepSymToken;
00134 static /*@exposed@*/ ltoken closeSymToken;
00135 static /*@exposed@*/ ltoken simpleIdToken;
00136 static /*@exposed@*/ ltoken mapSymToken;
00137 static /*@exposed@*/ ltoken markerSymToken;
00138 static /*@exposed@*/ ltoken commentSymToken;
00139 
00140 static /*@exposed@*/ ltoken synonymToken;
00141 
00142 static /*@exposed@*/ ltoken
00143 insertSimpleToken (char *s) /*@modifies internalState@*/ 
00144 {
00145     return (LCLInsertToken (simpleId, lsymbol_fromChars (s), 0, FALSE));
00146 }
00147 
00148 static bool
00149 hasFirstChar (ltoken tok) /*@*/ 
00150 {
00151   return (ltoken_isChar (tok)
00152           && ltoken_isSingleChar (cstring_firstChar (ltoken_unparse (tok))));
00153 }
00154 
00155 void
00156 LCLProcessInitFile (void)
00157 {
00158   InitLines ();
00159 
00160   InitReduce (INITFILE1);
00161 
00162   if (ltoken_getCode (nextToken) != LEOFTOKEN)
00163     {
00164       LocalUserError (nextToken, "unexpected tokens after end-of-file");
00165     }
00166 }
00167 
00168 static void
00169 InitLines (void)
00170 {
00171   setCodePoint ();
00172   InitReduce (INITLINES1);
00173 
00174   
00175 
00176   if (ltoken_getCode (nextToken) != LEOFTOKEN)
00177     {
00178       InitLine ();
00179       InitReduce (INITLINES2);
00180     }
00181 
00182   while (ltoken_getCode (nextToken) != LEOFTOKEN)
00183     {
00184       InitLine ();
00185       InitReduce (INITLINES3);
00186     }
00187 }
00188 
00189 static void
00190 InitLine (void)
00191 {
00192   
00193   if (ltoken_getCode (nextToken) == LLT_EOL)
00194     {
00195       /* Nothing on line. */
00196             InitReduce (INITLINE1);
00197     }
00198   else
00199     {
00200             Classification ();
00201       InitReduce (INITLINE2);
00202     }
00203 
00204   if (ltoken_getCode (nextToken) != LLT_EOL)
00205     {
00206       LocalUserError (nextToken, "Unexpected tokens on line");
00207     }
00208 
00209   nextToken = LCLScanNextToken (); /* Discard EOL       */
00210   }
00211 
00212 static void
00213 Classification (void)
00214 {
00215   lsymbol ntext = ltoken_getRawText (nextToken);  
00216 
00217     
00218   if (ntext == ltoken_getText (endCommentCharToken)
00219       || ntext == ltoken_getText (idCharToken)
00220       || ntext == ltoken_getText (opCharToken)
00221       || ntext == ltoken_getText (extensionCharToken)
00222       || ntext == ltoken_getText (singleCharToken)
00223       || ntext == ltoken_getText (whiteCharToken))
00224     {
00225       CharClass ();
00226       InitReduce (CLASSIFICATION1);
00227     }
00228   else if (ntext == ltoken_getText (quantifierSymToken)
00229            || ntext == ltoken_getText (logicalOpToken)
00230            || ntext == ltoken_getText (eqOpToken)
00231            || ntext == ltoken_getText (equationSymToken)
00232            || ntext == ltoken_getText (eqSepSymToken)
00233            || ntext == ltoken_getText (selectSymToken)
00234            || ntext == ltoken_getText (openSymToken)
00235            || ntext == ltoken_getText (sepSymToken)
00236            || ntext == ltoken_getText (closeSymToken)
00237            || ntext == ltoken_getText (simpleIdToken)
00238            || ntext == ltoken_getText (mapSymToken)
00239            || ntext == ltoken_getText (markerSymToken)
00240            || ntext == ltoken_getText (commentSymToken))
00241     {
00242       TokenClass ();
00243       InitReduce (CLASSIFICATION2);
00244     }
00245   else if (ntext == ltoken_getText (synonymToken))
00246     {
00247       SynClass ();
00248       InitReduce (CLASSIFICATION3);
00249     }
00250   else
00251     {
00252       llbug (message ("Expected character, token, or synonym classification: %s",
00253                       ltoken_getRawString (nextToken)));
00254      /* pop off all tokens on this line */
00255     }
00256 }
00257 
00258 static void
00259 CharClass (void)
00260 {
00261   ltoken charClassToken;
00262 
00263   charClassToken = nextToken;
00264 
00265   nextToken = LCLScanNextToken ();              /* Discard char class keyword. */
00266 
00267   if (ltoken_getRawText (charClassToken) == ltoken_getText (endCommentCharToken))
00268     {
00269       EndCommentChars ();
00270       InitReduce (CHARCLASS1);
00271     }
00272   else if (ltoken_getRawText (charClassToken) == ltoken_getText (idCharToken))
00273     {
00274       IdChars ();
00275       InitReduce (CHARCLASS2);
00276     }
00277   else if (ltoken_getRawText (charClassToken) == ltoken_getText (opCharToken))
00278     {
00279       OpChars ();
00280       InitReduce (CHARCLASS3);
00281     }
00282   else if (ltoken_getRawText (charClassToken)
00283            == ltoken_getText (extensionCharToken))
00284     {
00285       ExtensionChar ();
00286       InitReduce (CHARCLASS4);
00287     }
00288   else if (ltoken_getRawText (charClassToken) == ltoken_getText (singleCharToken))
00289     {
00290       SingChars ();
00291       InitReduce (CHARCLASS5);
00292     }
00293   else if (ltoken_getRawText (charClassToken) == ltoken_getText (whiteCharToken))
00294     {
00295       WhiteChars ();
00296       InitReduce (CHARCLASS6);
00297     }
00298   else
00299     {
00300       LocalUserError (nextToken, "expected character classification");
00301     }
00302 }
00303 
00304 static void
00305 EndCommentChars (void)
00306 {
00307   EndCommentChar ();
00308   InitReduce (LRC_ENDCOMMENT1);
00309 
00310   while (ltoken_getCode (nextToken) != LLT_EOL)
00311     {
00312       EndCommentChar ();
00313       InitReduce (LRC_ENDCOMMENT2);
00314     }
00315 
00316 }
00317 
00318 static void IdChars (void) /*@modifies nextToken@*/
00319 {
00320   IdChar ();
00321   InitReduce (IDCHARS1);
00322   
00323   while (ltoken_getCode (nextToken) != LLT_EOL)
00324     {
00325       IdChar ();
00326       InitReduce (IDCHARS2);
00327     }
00328 }
00329 
00330 static void OpChars (void) /*@modifies nextToken@*/
00331 {
00332   OpChar ();
00333   InitReduce (OPCHARS1);
00334 
00335   while (ltoken_getCode (nextToken) != LLT_EOL)
00336     {
00337       OpChar ();
00338       InitReduce (OPCHARS2);
00339     }
00340 }
00341 
00342 static void ExtensionChar (void) /*@modifies nextToken@*/
00343 {
00344   if (hasFirstChar (nextToken))
00345     {
00346       LSLGenShift (nextToken);
00347       nextToken = LCLScanNextToken ();
00348       InitReduce (LRC_EXTENSIONCHAR1);
00349     }
00350   else
00351     {
00352       LocalUserError (nextToken, "expected only one character");
00353     }
00354 }
00355 
00356 static void SingChars (void) /*@modifies nextToken@*/
00357 {
00358   SingChar ();
00359   InitReduce (SINGCHARS1);
00360 
00361   while (ltoken_getCode (nextToken) != LLT_EOL)
00362     {
00363       SingChar ();
00364       InitReduce (SINGCHARS2);
00365     }
00366 }
00367 
00368 static void WhiteChars (void) /*@modifies nextToken@*/
00369 {
00370   WhiteChar ();
00371   InitReduce (WHITECHARS1);
00372 
00373   while (ltoken_getCode (nextToken) != LLT_EOL)
00374     {
00375       WhiteChar ();
00376       InitReduce (WHITECHARS2);
00377     }
00378 }
00379 
00380 static void EndCommentChar (void) /*@modifies nextToken@*/
00381 {
00382   if (ltoken_isChar (nextToken))
00383     {
00384       LSLGenShift (nextToken);
00385       nextToken = LCLScanNextToken ();
00386       InitReduce (LRC_ENDCOMMENTCHAR1);
00387     }
00388   else
00389     {
00390       LocalUserError (nextToken, "expected only one character");
00391     }
00392 }
00393 
00394 static void IdChar (void) /*@modifies nextToken@*/
00395 {
00396   if (hasFirstChar (nextToken))
00397     {
00398       LSLGenShift (nextToken);
00399       nextToken = LCLScanNextToken ();
00400       InitReduce (IDCHAR1);
00401     }
00402   else
00403     {
00404       LocalUserError (nextToken,
00405                       "Character is already defined, cannot redefine");
00406     }
00407 }
00408 
00409 static void OpChar (void) /*@modifies nextToken@*/
00410 {
00411   if (hasFirstChar (nextToken))
00412     {
00413       LSLGenShift (nextToken);
00414       nextToken = LCLScanNextToken ();
00415       InitReduce (OPCHAR1);
00416     }
00417   else
00418     {
00419       LocalUserError (nextToken, 
00420                       "Character is already defined, cannot redefine");
00421     }
00422 }
00423 
00424 static void SingChar (void) /*@modifies nextToken@*/
00425 {
00426   if (hasFirstChar (nextToken))
00427     {
00428       LSLGenShift (nextToken);
00429       nextToken = LCLScanNextToken ();
00430       InitReduce (SINGCHAR1);
00431     }
00432   else
00433     {
00434       LocalUserError (nextToken, 
00435                       "Character is already defined, cannot redefine");
00436     }
00437 }
00438 
00439 static void WhiteChar (void) /*@modifies nextToken@*/
00440 {
00441   if (hasFirstChar (nextToken))
00442     {
00443       LSLGenShift (nextToken);
00444       nextToken = LCLScanNextToken ();
00445       InitReduce (WHITECHAR1);
00446     }
00447   else
00448     {
00449       LocalUserError (nextToken, "Character is already defined, cannot redefine");
00450     }
00451 }
00452 
00453 static void
00454   TokenClass (void) /*@modifies nextToken@*/
00455 {
00456   ltoken tokenClassToken;
00457   lsymbol ttext = ltoken_getRawText (nextToken);
00458 
00459   tokenClassToken = nextToken;
00460 
00461   /* Discard token class keyword. */
00462   nextToken = LCLScanNextToken ();
00463 
00464   if (ttext == ltoken_getText (quantifierSymToken))
00465     {
00466       QuantifierSymToks ();
00467       InitReduce (TOKENCLASS1);
00468     }
00469   else if (ttext == ltoken_getText (logicalOpToken))
00470     {
00471       LogicalOpToks ();
00472       InitReduce (TOKENCLASS2);
00473     }
00474   else if (ttext == ltoken_getText (eqOpToken))
00475     {
00476       EqOpToks ();
00477       InitReduce (TOKENCLASS3);
00478     }
00479   else if (ttext == ltoken_getText (equationSymToken))
00480     {
00481       EquationSymToks ();
00482       InitReduce (TOKENCLASS4);
00483     }
00484   else if (ttext == ltoken_getText (eqSepSymToken))
00485     {
00486       EqSepSymToks ();
00487       InitReduce (TOKENCLASS5);
00488     }
00489   else if (ttext == ltoken_getText (selectSymToken))
00490     {
00491       SelectSymToks ();
00492       InitReduce (TOKENCLASS6);
00493     }
00494   else if (ttext == ltoken_getText (openSymToken))
00495     {
00496       OpenSymToks ();
00497       InitReduce (TOKENCLASS7);
00498     }
00499   else if (ttext == ltoken_getText (sepSymToken))
00500     {
00501       SepSymToks ();
00502       InitReduce (TOKENCLASS8);
00503     }
00504   else if (ttext == ltoken_getText (closeSymToken))
00505     {
00506       CloseSymToks ();
00507       InitReduce (TOKENCLASS9);
00508     }
00509   else if (ttext == ltoken_getText (simpleIdToken))
00510     {
00511       SimpleIdToks ();
00512       InitReduce (TOKENCLASS10);
00513     }
00514   else if (ttext == ltoken_getText (mapSymToken))
00515     {
00516       MapSymToks ();
00517       InitReduce (TOKENCLASS11);
00518     }
00519   else if (ttext == ltoken_getText (markerSymToken))
00520     {
00521       MarkerSymToks ();
00522       InitReduce (TOKENCLASS12);
00523     }
00524   else if (ttext == ltoken_getText (commentSymToken))
00525     {
00526             CommentSymToks ();
00527       InitReduce (TOKENCLASS13);
00528     }
00529   else
00530     {
00531       LocalUserError (nextToken, "expected token classification");
00532     }
00533 }
00534 
00535 static void
00536 QuantifierSymToks (void) /*@modifies nextToken@*/
00537 {
00538   QuantifierSymTok ();
00539   InitReduce (QUANTIFIERSYMTOKS1);
00540 
00541   while (ltoken_getCode (nextToken) != LLT_EOL)
00542     {
00543       QuantifierSymTok ();
00544       InitReduce (QUANTIFIERSYMTOKS2);
00545     }
00546 }
00547 
00548 static void
00549 LogicalOpToks (void) /*@modifies nextToken@*/
00550 {
00551   LogicalOpTok ();
00552   InitReduce (LOGICALOPTOKS1);
00553 
00554   while (ltoken_getCode (nextToken) != LLT_EOL)
00555     {
00556       LogicalOpTok ();
00557       InitReduce (LOGICALOPTOKS2);
00558     }
00559 }
00560 
00561 static void
00562 EqOpToks (void) /*@modifies nextToken@*/
00563 {
00564   EqOpTok ();
00565   InitReduce (LRC_EQOPTOKS1);
00566 
00567   while (ltoken_getCode (nextToken) != LLT_EOL)
00568     {
00569       EqOpTok ();
00570       InitReduce (LRC_EQOPTOKS2);
00571     }
00572 }
00573 
00574 static void
00575 EquationSymToks (void) /*@modifies nextToken@*/
00576 {
00577   EquationSymTok ();
00578   InitReduce (LRC_EQUATIONSYMTOKS1);
00579 
00580   while (ltoken_getCode (nextToken) != LLT_EOL)
00581     {
00582       EquationSymTok ();
00583       InitReduce (LRC_EQUATIONSYMTOKS2);
00584     }
00585 }
00586 
00587 static void
00588 EqSepSymToks (void) /*@modifies nextToken@*/
00589 {
00590   EqSepSymTok ();
00591   InitReduce (LRC_EQSEPSYMTOKS1);
00592 
00593   while (ltoken_getCode (nextToken) != LLT_EOL)
00594     {
00595       EqSepSymTok ();
00596       InitReduce (LRC_EQSEPSYMTOKS2);
00597     }
00598 }
00599 
00600 static void
00601 SelectSymToks (void) /*@modifies nextToken@*/
00602 {
00603   SelectSymTok ();
00604   InitReduce (SELECTSYMTOKS1);
00605 
00606   while (ltoken_getCode (nextToken) != LLT_EOL)
00607     {
00608       SelectSymTok ();
00609       InitReduce (SELECTSYMTOKS2);
00610     }
00611 }
00612 
00613 static void
00614 OpenSymToks (void) /*@modifies nextToken@*/
00615 {
00616   OpenSymTok ();
00617   InitReduce (OPENSYMTOKS1);
00618 
00619   while (ltoken_getCode (nextToken) != LLT_EOL)
00620     {
00621       OpenSymTok ();
00622       InitReduce (OPENSYMTOKS2);
00623     }
00624 }
00625 
00626 static void
00627 SepSymToks (void) /*@modifies nextToken@*/
00628 {
00629   SepSymTok ();
00630   InitReduce (SEPSYMTOKS1);
00631 
00632   while (ltoken_getCode (nextToken) != LLT_EOL)
00633     {
00634       SepSymTok ();
00635       InitReduce (SEPSYMTOKS2);
00636     }
00637 }
00638 
00639 static void
00640 CloseSymToks (void) /*@modifies nextToken@*/
00641 {
00642   CloseSymTok ();
00643   InitReduce (CLOSESYMTOKS1);
00644 
00645   while (ltoken_getCode (nextToken) != LLT_EOL)
00646     {
00647       CloseSymTok ();
00648       InitReduce (CLOSESYMTOKS2);
00649     }
00650 }
00651 
00652 static void
00653 SimpleIdToks (void) /*@modifies nextToken@*/
00654 { 
00655   SimpleIdTok ();
00656   InitReduce (SIMPLEIDTOKS1);
00657 
00658   while (ltoken_getCode (nextToken) != LLT_EOL)
00659     {
00660       SimpleIdTok ();
00661       InitReduce (SIMPLEIDTOKS2);
00662     }
00663 }
00664 
00665 static void
00666 MapSymToks (void) /*@modifies nextToken@*/
00667 {
00668   MapSymTok ();
00669   InitReduce (MAPSYMTOKS1);
00670 
00671   while (ltoken_getCode (nextToken) != LLT_EOL)
00672     {
00673       MapSymTok ();
00674       InitReduce (MAPSYMTOKS2);
00675     }
00676 }
00677 
00678 static void
00679 MarkerSymToks (void) /*@modifies nextToken@*/
00680 {
00681   MarkerSymTok ();
00682   InitReduce (MARKERSYMTOKS1);
00683 
00684   while (ltoken_getCode (nextToken) != LLT_EOL)
00685     {
00686       MarkerSymTok ();
00687       InitReduce (MARKERSYMTOKS2);
00688     }
00689 }
00690 
00691 static void
00692 CommentSymToks (void) /*@modifies nextToken@*/
00693 {
00694   CommentSymTok ();
00695     InitReduce (COMMENTSYMTOKS1);
00696   
00697   while (ltoken_getCode (nextToken) != LLT_EOL)
00698     {
00699             CommentSymTok ();
00700             InitReduce (COMMENTSYMTOKS2);
00701     }
00702 }
00703 
00704 static void
00705 QuantifierSymTok (void) /*@modifies nextToken@*/
00706 {
00707   Token ();
00708   InitReduce (QUANTIFIERSYMTOK1);
00709 }
00710 
00711 static void
00712 LogicalOpTok (void) /*@modifies nextToken@*/
00713 {
00714   Token ();
00715   InitReduce (LOGICALOPTOK1);
00716 }
00717 
00718 static void
00719 EqOpTok (void) /*@modifies nextToken@*/
00720 {
00721   Token ();
00722   InitReduce (LRC_EQOPTOK1);
00723 }
00724 
00725 static void EquationSymTok (void) /*@modifies nextToken@*/
00726 {
00727   Token ();
00728   InitReduce (LRC_EQUATIONSYMTOK1);
00729 }
00730 
00731 static void EqSepSymTok (void) /*@modifies nextToken@*/
00732 {
00733   Token ();
00734   InitReduce (LRC_EQSEPSYMTOK1);
00735 
00736 }
00737 
00738 static void SelectSymTok (void) /*@modifies nextToken@*/
00739 {
00740   Token ();
00741   InitReduce (SELECTSYMTOK1);
00742 }
00743 
00744 static void OpenSymTok (void) /*@modifies nextToken@*/
00745 {
00746   Token ();
00747   InitReduce (OPENSYMTOK1);
00748 }
00749 
00750 static void SepSymTok (void) /*@modifies nextToken@*/
00751 {
00752   Token ();
00753   InitReduce (SEPSYMTOK1);
00754 }
00755 
00756 static void CloseSymTok (void) /*@modifies nextToken@*/
00757 {
00758   Token ();
00759   InitReduce (CLOSESYMTOK1);
00760 }
00761 
00762 static void SimpleIdTok (void) /*@modifies nextToken@*/
00763 {
00764   Token ();
00765   InitReduce (SIMPLEIDTOK1);
00766 }
00767 
00768 static void
00769 MapSymTok (void) /*@modifies nextToken@*/
00770 {
00771   Token ();
00772   InitReduce (MAPSYMTOK1);
00773 }
00774 
00775 static void
00776 MarkerSymTok (void) /*@modifies nextToken@*/
00777 {
00778   Token ();
00779   InitReduce (MARKERSYMTOK1);
00780 
00781 }
00782 
00783 static void
00784 CommentSymTok (void) /*@modifies nextToken@*/
00785 {
00786   Token ();
00787   InitReduce (COMMENTSYMTOK1);
00788 }
00789 
00790 
00791 static void
00792 SynClass (void) /*@modifies nextToken@*/
00793 {
00794   if (ltoken_getRawText (nextToken) == ltoken_getText (synonymToken))
00795     {
00796       nextToken = LCLScanNextToken ();
00797 
00798       OldToken ();
00799       NewToken ();
00800 
00801       InitReduce (SYNCLASS1);
00802     }
00803   else
00804     {
00805       LocalUserError (nextToken, "expected synonym classification");
00806     }
00807 
00808 }
00809 
00810 static void
00811 OldToken (void) /*@modifies nextToken@*/
00812 {
00813   Token ();
00814   InitReduce (OLDTOKEN1);
00815 
00816 }
00817 
00818 static void
00819 NewToken (void) /*@modifies nextToken@*/
00820 {
00821   Token ();
00822   InitReduce (NEWTOKEN1);
00823 
00824 }
00825 
00826 static void
00827 Token (void) /*@modifies nextToken@*/
00828 {
00829   if (ltoken_getCode (nextToken) == LLT_EOL
00830       || ltoken_getCode (nextToken) == LEOFTOKEN)
00831     {
00832       LocalUserError (nextToken, "unexpected end-of-line or end-of-file");
00833     }
00834   else
00835     {
00836       LSLGenShift (nextToken);
00837       nextToken = LCLScanNextToken ();
00838     }
00839 }
00840 
00841 /*
00842 ** Init File Processing Routines, these routines use the shift-reduce sequence
00843 ** produced by the init file parser and update the necessary tables for the
00844 ** scanner.
00845 **
00846 ** The same shift stack is used that LSL parser uses.  A different reduce
00847 ** procedure is used because the init file grammar is different from the LSL
00848 ** grammar.
00849 */
00850 
00851 static void
00852 InitReduce (LCLInitRuleCode rule) /*@modifies nextToken@*/
00853 {
00854   switch (rule)
00855     {
00856     case INITFILE1:
00857       TRACE ("INITFILE1");
00858       break;
00859       
00860     case INITLINES1:
00861       TRACE ("INITLINES1");
00862       break;
00863       
00864     case INITLINES2:
00865       TRACE ("INITLINES2");
00866       break;
00867 
00868     case INITLINES3:
00869       TRACE ("INITLINES3");
00870       break;
00871 
00872     case INITLINE1:
00873       TRACE ("INITLINE1");
00874       break;
00875 
00876     case INITLINE2:
00877       TRACE ("INITLINE2");
00878       break;
00879 
00880     case CLASSIFICATION1:
00881       TRACE ("CLASSIFICATION1");
00882       break;
00883 
00884     case CLASSIFICATION2:
00885       TRACE ("CLASSIFICATION2");
00886       break;
00887 
00888     case CLASSIFICATION3:
00889       TRACE ("CLASSIFICATION3");
00890       break;
00891 
00892     case CHARCLASS1:
00893       TRACE ("CHARCLASS1");
00894       break;
00895 
00896     case CHARCLASS2:
00897       TRACE ("CHARCLASS2");
00898       break;
00899 
00900     case CHARCLASS3:
00901       TRACE ("CHARCLASS3");
00902       break;
00903 
00904     case CHARCLASS4:
00905       TRACE ("CHARCLASS4");
00906       break;
00907 
00908     case CHARCLASS5:
00909       TRACE ("CHARCLASS5");
00910       break;
00911 
00912     case CHARCLASS6:
00913       TRACE ("CHARCLASS6");
00914       break;
00915 
00916     case LRC_ENDCOMMENT1:
00917       TRACE ("LRC_ENDCOMMENT1");
00918       break;
00919 
00920     case LRC_ENDCOMMENT2:
00921       TRACE ("LRC_ENDCOMMENT2");
00922       break;
00923 
00924     case IDCHARS1:
00925       TRACE ("IDCHARS1");
00926       break;
00927 
00928     case IDCHARS2:
00929       TRACE ("IDCHARS2");
00930       break;
00931 
00932     case OPCHARS1:
00933       TRACE ("OPCHARS1");
00934       break;
00935 
00936     case OPCHARS2:
00937       TRACE ("OPCHARS2");
00938       break;
00939 
00940     case LRC_EXTENSIONCHAR1:
00941       TRACE ("LRC_EXTENSIONCHAR1");
00942       ProcessExtensionChar ();
00943       break;
00944 
00945     case SINGCHARS1:
00946       TRACE ("SINGCHARS1");
00947       break;
00948 
00949     case SINGCHARS2:
00950       TRACE ("SINGCHARS2");
00951       break;
00952 
00953     case WHITECHARS1:
00954       TRACE ("WHITECHARS1");
00955       break;
00956 
00957     case WHITECHARS2:
00958       TRACE ("WHITECHARS2");
00959       break;
00960 
00961     case LRC_ENDCOMMENTCHAR1:
00962       TRACE ("LRC_ENDCOMMENTCHAR1");
00963       ProcessEndCommentChar ();
00964       break;
00965 
00966     case IDCHAR1:
00967       TRACE ("IDCHAR1");
00968       ProcessSingleChar (IDCHAR);
00969       break;
00970 
00971     case OPCHAR1:
00972       TRACE ("OPCHAR1");
00973       ProcessSingleChar (OPCHAR);
00974       break;
00975 
00976     case SINGCHAR1:
00977       TRACE ("SINGCHAR1");
00978       ProcessSingleChar (SINGLECHAR);
00979       break;
00980 
00981     case WHITECHAR1:
00982       TRACE ("CHAR1");
00983       ProcessSingleChar (WHITECHAR);
00984       break;
00985 
00986     case TOKENCLASS1:
00987       TRACE ("TOKENCLASS1");
00988       break;
00989 
00990     case TOKENCLASS2:
00991       TRACE ("TOKENCLASS2");
00992       break;
00993 
00994     case TOKENCLASS3:
00995       TRACE ("TOKENCLASS3");
00996       break;
00997 
00998     case TOKENCLASS4:
00999       TRACE ("TOKENCLASS4");
01000       break;
01001 
01002     case TOKENCLASS5:
01003       TRACE ("TOKENCLASS5");
01004       break;
01005 
01006     case TOKENCLASS6:
01007       TRACE ("TOKENCLASS6");
01008       break;
01009 
01010     case TOKENCLASS7:
01011       TRACE ("TOKENCLASS7");
01012       break;
01013 
01014     case TOKENCLASS8:
01015       TRACE ("TOKENCLASS8");
01016       break;
01017 
01018     case TOKENCLASS9:
01019       TRACE ("TOKENCLASS9");
01020       break;
01021 
01022     case TOKENCLASS10:
01023       TRACE ("TOKENCLASS10");
01024       break;
01025 
01026     case TOKENCLASS11:
01027       TRACE ("TOKENCLASS11");
01028       break;
01029 
01030     case TOKENCLASS12:
01031       TRACE ("TOKENCLASS12");
01032       break;
01033 
01034     case TOKENCLASS13:
01035       TRACE ("TOKENCLASS13");
01036       break;
01037 
01038     case QUANTIFIERSYMTOKS1:
01039       TRACE ("QUALIFERSYMTOKS1");
01040       break;
01041 
01042     case QUANTIFIERSYMTOKS2:
01043       TRACE ("QUANTIFIERSYMTOKS2");
01044       break;
01045 
01046     case LOGICALOPTOKS1:
01047       TRACE ("LOGICALOPTOKS1");
01048       break;
01049 
01050     case LOGICALOPTOKS2:
01051       TRACE ("LOGICALOPTOKS2");
01052       break;
01053 
01054     case LRC_EQOPTOKS1:
01055       TRACE ("LRC_EQOPTOKS1");
01056       break;
01057 
01058     case LRC_EQOPTOKS2:
01059       TRACE ("LRC_EQOPTOKS2");
01060       break;
01061 
01062     case LRC_EQUATIONSYMTOKS1:
01063       TRACE ("LRC_EQUATIONSYMTOKS1");
01064       break;
01065 
01066     case LRC_EQUATIONSYMTOKS2:
01067       TRACE ("LRC_EQUATIONSYMTOKS2");
01068       break;
01069 
01070     case LRC_EQSEPSYMTOKS1:
01071       TRACE ("LRC_EQSEPSYMTOKS1");
01072       break;
01073 
01074     case LRC_EQSEPSYMTOKS2:
01075       TRACE ("LRC_EQSEPSYMTOKS2");
01076       break;
01077 
01078     case SELECTSYMTOKS1:
01079       TRACE ("SELECTSYMTOKS1");
01080       break;
01081 
01082     case SELECTSYMTOKS2:
01083       TRACE ("SELECTSYMTOKS2");
01084       break;
01085 
01086     case OPENSYMTOKS1:
01087       TRACE ("OPENSYMTOKS1");
01088       break;
01089 
01090     case OPENSYMTOKS2:
01091       TRACE ("OPENSYMTOKS2");
01092       break;
01093 
01094     case SEPSYMTOKS1:
01095       TRACE ("SEPSYMTOKS1");
01096       break;
01097 
01098     case SEPSYMTOKS2:
01099       TRACE ("SEPSYMTOKS2");
01100       break;
01101 
01102     case CLOSESYMTOKS1:
01103       TRACE ("CLOSESYMTOKS1");
01104       break;
01105 
01106     case CLOSESYMTOKS2:
01107       TRACE ("CLOSESYMTOKS2");
01108       break;
01109 
01110     case SIMPLEIDTOKS1:
01111       TRACE ("SIMPLEIDTOKS1");
01112       break;
01113 
01114     case SIMPLEIDTOKS2:
01115       TRACE ("SIMPLEIDTOKS2");
01116       break;
01117 
01118     case MAPSYMTOKS1:
01119       TRACE ("MAPSYMTOKS1");
01120       break;
01121 
01122     case MAPSYMTOKS2:
01123       TRACE ("MAPSYMTOKS2");
01124       break;
01125 
01126     case MARKERSYMTOKS1:
01127       TRACE ("MARKERSYMTOKS1");
01128       break;
01129 
01130     case MARKERSYMTOKS2:
01131       TRACE ("MARKERSYMTOKS2");
01132       break;
01133 
01134     case COMMENTSYMTOKS1:
01135       TRACE ("COMMENTSYMTOKS1");
01136       break;
01137 
01138     case COMMENTSYMTOKS2:
01139       TRACE ("COMMENTSYMTOKS2");
01140       break;
01141 
01142     case QUANTIFIERSYMTOK1:
01143       TRACE ("QUANTIFERSYMTOK1");
01144       ProcessToken (quantifierSym);
01145       break;
01146 
01147     case LOGICALOPTOK1:
01148       TRACE ("LOGICALOPTOK1");
01149       ProcessToken (logicalOp);
01150       break;
01151 
01152     case LRC_EQOPTOK1:
01153       TRACE ("LRC_EQOPTOK1");
01154       ProcessToken (eqOp);
01155       break;
01156 
01157     case LRC_EQUATIONSYMTOK1:
01158       TRACE ("LRC_EQUATIONSYMTOK1");
01159       ProcessToken (equationSym);
01160       break;
01161 
01162     case LRC_EQSEPSYMTOK1:
01163       TRACE ("LRC_EQSEPSYMTOK1");
01164       ProcessToken (eqSepSym);
01165       break;
01166 
01167     case SELECTSYMTOK1:
01168       TRACE ("SELECTSYMTOK1");
01169       ProcessToken (selectSym);
01170       break;
01171 
01172     case OPENSYMTOK1:
01173       TRACE ("OPENSYMTOK1");
01174       ProcessToken (openSym);
01175       break;
01176 
01177     case SEPSYMTOK1:
01178       TRACE ("SEPSYMTOK1");
01179       ProcessToken (sepSym);
01180       break;
01181 
01182     case CLOSESYMTOK1:
01183       TRACE ("CLOSESYMTOK1");
01184       ProcessToken (closeSym);
01185       break;
01186 
01187     case SIMPLEIDTOK1:
01188       TRACE ("SIMPLEIDTOK1");
01189       ProcessToken (simpleId);
01190       break;
01191 
01192     case MAPSYMTOK1:
01193       TRACE ("MAPSYMTOK1");
01194       ProcessToken (mapSym);
01195       break;
01196 
01197     case MARKERSYMTOK1:
01198       TRACE ("MARKERSYMTOK1");
01199       ProcessToken (markerSym);
01200       break;
01201 
01202     case COMMENTSYMTOK1:
01203       TRACE ("COMMENTSYMTOK1");
01204       ProcessToken (commentSym);
01205       break;
01206 
01207     case SYNCLASS1:
01208       TRACE ("SYNCLASS1");
01209       ProcessSynonym ();
01210       break;
01211 
01212     case OLDTOKEN1:
01213       TRACE ("OLDTOKEN1");
01214       break;
01215 
01216     case NEWTOKEN1:
01217       TRACE ("NEWTOKEN1");
01218       break;
01219 
01220     default:
01221       llcontbuglit ("InitReduce: bad case");
01222       break;
01223     }
01224 }       
01225 
01226 /*
01227 ** Reset the first character of the predefined extensionChar keywords when  
01228 ** the extensionChar changes.  e.g. "extensionChar @" changes "\forall" to  
01229 ** "@forall".                                                               
01230 */
01231 
01232 static void
01233 UpdateXCharKeywords (charCode xChar)
01234 {
01235   char *str;
01236   char xchar = (char)xChar;
01237 
01238   str = ltoken_getTextChars (ltoken_forall);
01239   *str = xchar;
01240 
01241   str = ltoken_getTextChars (ltoken_and);
01242   *str = xchar;
01243 
01244   str = ltoken_getTextChars (ltoken_or);
01245   *str = xchar;
01246 
01247   str = ltoken_getTextChars (ltoken_implies);
01248   *str = xchar;
01249 
01250   str = ltoken_getTextChars (ltoken_eq);
01251   *str = xchar;
01252 
01253   str = ltoken_getTextChars (ltoken_neq);
01254   *str = xchar;
01255 
01256   str = ltoken_getTextChars (ltoken_equals);
01257   *str = xchar;
01258 
01259   str = ltoken_getTextChars (ltoken_eqsep);
01260   *str = xchar;
01261 
01262   str = ltoken_getTextChars (ltoken_select);
01263   *str = xchar;
01264 
01265   str = ltoken_getTextChars (ltoken_open);
01266   *str = xchar;
01267 
01268   str = ltoken_getTextChars (ltoken_sep);
01269   *str = xchar;
01270 
01271   str = ltoken_getTextChars (ltoken_close);
01272   *str = xchar;
01273 
01274   str = ltoken_getTextChars (ltoken_id);
01275   *str = xchar;
01276 
01277   str = ltoken_getTextChars (ltoken_arrow);
01278   *str = xchar;
01279 
01280   str = ltoken_getTextChars (ltoken_marker);
01281   *str = xchar;
01282 
01283   str = ltoken_getTextChars (ltoken_comment);
01284   *str = xchar;
01285 }
01286 
01287 /* Different from ProcessCharClass because only allow one extension         */
01288 /* character. Therefore, the present extension character must be set to a   */
01289 /* singleChar.                                                              */
01290 
01291 static void
01292 ProcessExtensionChar (void)
01293 {
01294   ltoken stackToken = LSLGenTopPopShiftStack ();
01295   char firstChar = cstring_firstChar (ltoken_unparse (stackToken));
01296 
01297   if (!defineSingleChar[(int)firstChar]
01298       && ltoken_isSingleChar (firstChar))
01299     {
01300       /*
01301       ** Is a single character that has not been defined before.           
01302       ** Can only have one extension char.  Release old one. 
01303       */
01304 
01305       LCLSetCharClass (firstChar, CHC_EXTENSION);
01306       LCLSetCharClass ((char) currentExtensionChar, SINGLECHAR);
01307       currentExtensionChar = (charCode) firstChar;
01308       UpdateXCharKeywords (currentExtensionChar);
01309     }
01310   else
01311     {
01312       /* Already redefined.  Don't allow to be redefined. */
01313       LocalUserError (stackToken, "Character is already defined, cannot redefine");
01314     }
01315 
01316   ltoken_free (stackToken);
01317 }
01318 
01319 /* Different from ProcessSingleChar because allow any characters to be      */
01320 /* endCommentChar and also set a different part of the scanner structure.   */
01321 
01322 static void
01323 ProcessEndCommentChar (void)
01324 {
01325   ltoken stackToken = LSLGenTopPopShiftStack ();
01326   char firstChar = cstring_firstChar (ltoken_unparse (stackToken));
01327 
01328   if (LCLIsEndComment (firstChar))
01329     {
01330       LocalUserError (stackToken,
01331                     "already defined as a endCommentChar, cannot redefine");
01332     }
01333   else
01334     {
01335       LCLSetEndCommentChar (firstChar, TRUE);
01336     }
01337   ltoken_free (stackToken);
01338 }
01339 
01340 static void
01341 ProcessSingleChar (charCode code)
01342 {
01343   ltoken stackToken = LSLGenTopPopShiftStack ();
01344   char firstChar = cstring_firstChar (ltoken_unparse (stackToken));
01345 
01346   if (!defineSingleChar[(int)firstChar]
01347       && ltoken_isSingleChar (firstChar))
01348     {
01349       /* Is a single character that has not been defined before.            */
01350       /* It's OK to redefine once. */
01351       LCLSetCharClass (firstChar, code);
01352       /* OK to mark as a defined singleChar even if not.  Only check        */
01353       /* defineSingleChar[] if defining a singleChar.                       */
01354       defineSingleChar[(int)(firstChar)] = TRUE;
01355     }
01356   else
01357     {
01358       LocalUserError (stackToken, "Character is already defined, cannot redefine");
01359     }
01360   
01361   ltoken_free (stackToken);
01362 }
01363 
01364 static void
01365 ProcessToken (ltokenCode code)
01366 {
01367   ltoken stackToken, ptok;
01368 
01369   stackToken = LSLGenTopPopShiftStack ();
01370 
01371   
01372   if (LCLIsSyn (ltoken_getText (stackToken)))
01373     {
01374       LocalUserError (stackToken, "already defined as a synonym, cannot redefine");
01375     }
01376 
01377   /*
01378   ** Get the token from the token table, so can check if the token    
01379   ** was updated by a previous token.                               
01380   */
01381 
01382   ptok = LCLGetToken (ltoken_getText (stackToken));
01383 
01384   if (ltoken_isStateDefined (ptok))
01385     {
01386             LocalUserError (stackToken, "already defined, cannot redefine");
01387     }
01388 
01389     LCLUpdateToken (code, ltoken_getText (stackToken), TRUE);
01390   ltoken_free (stackToken);
01391 }
01392 
01393 
01394 static void
01395 ProcessSynonym (void)
01396 {
01397   ltoken newtok;
01398   ltoken oldtok;
01399 
01400   
01401   newtok = LSLGenTopPopShiftStack ();
01402   oldtok = LSLGenTopPopShiftStack ();
01403 
01404   
01405  /* ignore synonyms: Bool -> bool
01406     and:             bool -> Bool */
01407  /*
01408      if ((ltoken_getText (newtok) == lsymbol_Bool ||
01409           ltoken_getText (newtok) == lsymbol_bool) &&
01410          (ltoken_getText (oldtok) == lsymbol_Bool ||
01411           ltoken_getText (oldtok) == lsymbol_bool)) return;
01412  */
01413 
01414   if (ltoken_wasSyn (newtok))
01415     {
01416      /*
01417      ** The token has a synonym.  This means that the synonym was in the 
01418      ** init file, so complain about redefining as a synonym again       
01419      */
01420 
01421       LocalUserError (newtok, "already is a synonym, cannot redefine");
01422     }
01423 
01424   if (ltoken_hasSyn (newtok))
01425     {
01426       /*
01427       ** newtok already has a synonym defined for it.  Do not allow        
01428       ** synonyms to be chained.                                            
01429       */
01430 
01431       LocalUserError (newtok,
01432                       "newtok already has a synonym, cannot chain synonyms");
01433     }
01434 
01435   if (ltoken_isStateDefined (newtok))
01436     {
01437       LocalUserError (newtok, "newtok already defined, cannot redefine");
01438     }
01439 
01440     LCLAddSyn (ltoken_getText (newtok), ltoken_getText (oldtok));
01441 
01442   ltoken_free (newtok);
01443   ltoken_free (oldtok); 
01444 }
01445 
01446 
01447 /*
01448 ** Utilities, in alphabetical order
01449 */
01450 
01451 static void
01452   LocalUserError (ltoken t, char *msg)
01453 {
01454   lclplainerror (message ("%s %s in the LCL init file.  Ignoring line.", 
01455                           ltoken_unparse (t), cstring_fromChars (msg)));
01456 
01457   /* discard the whole current line */
01458 
01459   nextToken = LCLScanNextToken ();              /* Discard bad token    */
01460 
01461   while (ltoken_getCode (nextToken) != LLT_EOL 
01462          && ltoken_getCode (nextToken) != LEOFTOKEN)
01463     {
01464       nextToken = LCLScanNextToken ();
01465     }
01466 }
01467 
01468 
01469 /*
01470  *  Required initialization and cleanup routines
01471  */
01472 
01473 void
01474 LCLProcessInitFileInit (void)
01475 {
01476   int i;
01477 
01478   LSLGenInit (FALSE);           /* parsing LCLinit, not LSLinit */
01479   
01480   /*
01481   ** Insert the init file keywords into the token table as undefined        
01482   ** SIMPLEIDs.  They are defined as simpleIds since they must be treated 
01483   ** that way if they do not appear as the first token on a line, and       
01484   ** they must be treated that way for the actual LSL parsing. Save the   
01485   ** tokens so can recognize as init file keywords when necessary.          
01486   */
01487 
01488   endCommentCharToken = insertSimpleToken ("endCommentChar");
01489   idCharToken = insertSimpleToken ("idChar");
01490   opCharToken = insertSimpleToken ("opChar");
01491   extensionCharToken = insertSimpleToken ("extensionChar");
01492   singleCharToken = insertSimpleToken ("singleChar");
01493   whiteCharToken = insertSimpleToken ("whiteChar");
01494 
01495   quantifierSymToken = insertSimpleToken ("quantifierSym");
01496   logicalOpToken = insertSimpleToken ("logicalOp");
01497   eqOpToken = insertSimpleToken ("eqOp");
01498   equationSymToken = insertSimpleToken ("equationSym");
01499   eqSepSymToken = insertSimpleToken ("eqSepSym");
01500   selectSymToken = insertSimpleToken ("selectSym");
01501   openSymToken = insertSimpleToken ("openSym");
01502   sepSymToken = insertSimpleToken ("sepSym");
01503   closeSymToken = insertSimpleToken ("closeSym");
01504   simpleIdToken = insertSimpleToken ("simpleId");
01505   mapSymToken = insertSimpleToken ("mapSym");
01506   markerSymToken = insertSimpleToken ("markerSym");
01507   commentSymToken = insertSimpleToken ("commentSym");
01508 
01509   synonymToken = insertSimpleToken ("synonym");
01510 
01511   /*
01512   ** Initialize defineSingleChar array to all FALSE to signal that no       
01513   ** characters have been redefined as singleChar. 
01514   */
01515 
01516   for (i = 0; i <= LASTCHAR; i++)
01517     {
01518       defineSingleChar[i] = FALSE;
01519     }
01520 
01521   /* 
01522   ** Record the current extension character so can redefine back to         
01523   ** singleChar if a new extension character is redefined.                  
01524   */
01525 
01526   currentExtensionChar = (charCode) CHAREXTENDER;
01527   
01528   /* Init file processing needs to have EOL reported. */
01529 
01530   LCLReportEolTokens (TRUE);
01531 
01532   /* Not: context_getBoolName () */
01533 
01534   LCLAddSyn (lsymbol_fromChars ("Bool"),
01535              lsymbol_fromChars ("bool"));
01536 }
01537 
01538 void
01539 LCLProcessInitFileReset (void)
01540 {
01541   nextToken = LCLScanNextToken ();        
01542 }
01543 
01544 void
01545 LCLProcessInitFileCleanup (void)
01546 {
01547 }
01548 
01549 
01550 
01551 
01552 
01553 
01554 
01555 
01556 
01557 

Generated at Fri Nov 3 18:57:41 2000 for LCLint by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000