coan 4.2.4
|
00001 #ifndef LEXICON_H 00002 #define LEXICON_H 00003 /*************************************************************************** 00004 * Copyright (C) 2004, 2006 Symbian Software Ltd. * 00005 * All rights reserved. * 00006 * Copyright (C) 2007-2011 Mike Kinghan, imk@strudl.org * 00007 * All rights reserved. * 00008 * * 00009 * Contributed originally by Mike Kinghan, imk@strudl.org * 00010 * * 00011 * Redistribution and use in source and binary forms, with or without * 00012 * modification, are permitted provided that the following conditions * 00013 * are met: * 00014 * * 00015 * Redistributions of source code must retain the above copyright * 00016 * notice, this list of conditions and the following disclaimer. * 00017 * * 00018 * Redistributions in binary form must reproduce the above copyright * 00019 * notice, this list of conditions and the following disclaimer in the * 00020 * documentation and/or other materials provided with the distribution. * 00021 * * 00022 * Neither the name of Symbian Software Ltd. nor the names of its * 00023 * contributors may be used to endorse or promote products derived from * 00024 * this software without specific prior written permission. * 00025 * * 00026 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * 00027 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * 00028 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * 00029 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * 00030 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * 00031 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * 00032 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * 00033 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * 00034 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,* 00035 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF * 00036 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * 00037 * DAMAGE. * 00038 * * 00039 **************************************************************************/ 00040 #include "bool.h" 00041 00049 00050 #define IF "if" 00051 #define IFDEF "ifdef" 00052 #define IFNDEF "ifndef" 00053 #define ELSE "else" 00054 #define ELIF "elif" 00055 #define ENDIF "endif" 00056 #define DEFINE "define" 00057 #define UNDEF "undef" 00058 #define INCLUDE "include" 00059 #define PRAGMA "pragma" 00060 #define ERROR "error" 00061 #define DEFINED "defined" 00062 #define BOOLEAN_OR "||" 00063 #define BOOLEAN_AND "&&" 00064 #define BIT_OR "|" 00065 #define BIT_XOR "^" 00066 #define BIT_AND "&" 00067 #define EQ "==" 00068 #define NEQ "!=" 00069 #define LE "<=" 00070 #define GE ">=" 00071 #define LESS "<" 00072 #define GREATER ">" 00073 #define LSHIFT "<<" 00074 #define RSHIFT ">>" 00075 #define ADD "+" 00076 #define SUBTRACT "-" 00077 #define MULTIPLY "*" 00078 #define DIV "/" 00079 #define MOD "%" 00082 00083 00085 00095 extern bool 00096 match_keyword(char const **ptxt, char const *keyword); 00097 00105 extern bool 00106 match_op(char const ** ptxt, char const *op); 00107 00110 #endif /* EOF*/ 00111