1 /* 2 3 This file is part of the Maude 2 interpreter. 4 5 Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 20 21 */ 22 23 // 24 // Declarations for auxiliary functions needed by lexical analyzer. 25 // 26 void lexerIdMode(); 27 void lexerTokenTreeMode(int terminatingTokens); 28 void lexerCmdMode(); 29 void lexerOpMode(); 30 void lexerInitialMode(); 31 void lexerFileNameMode(); 32 void lexerStringMode(); 33 void lexerLatexMode(); 34 bool includeFile(const string& directory, const string& fileName, bool silent, int lineNr); 35 bool handleEof(); 36 void eatComment(bool firstNonWhite); 37 void cleanUpLexer(); 38 void checkForPending(); 39 40 void lexBubble(int termination, int minLen); 41 void lexBubble(const Token& first, int termination, int minLen, int pCount = 0); 42 void lexContinueBubble(const Token& next, int termination, int minLen, int pCount = 0); 43 void lexSave(const Token& first); 44 void lexContinueSave(const Token& next); 45 46 enum TERMINATION_TOKENS 47 { 48 BAR_COLON = 0x1, 49 BAR_COMMA = 0x2, 50 BAR_LEFT_BRACKET = 0x4, 51 BAR_EQUALS = 0x8, 52 BAR_ARROW2 = 0x10, 53 BAR_TO = 0x20, 54 BAR_IF = 0x40, 55 BAR_RIGHT_PAREN = 0x80, 56 BAR_OP_ATTRIBUTE = 0x100, 57 BAR_RIGHT_BRACKET = 0x200, 58 59 END_STATEMENT = 0x40000000, 60 END_COMMAND = 0x80000000 61 }; 62