1 // 2 // Copyright (C) 2014-2019 Nick Gasson 3 // 4 // This program is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // This program is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with this program. If not, see <http://www.gnu.org/licenses/>. 16 // 17 18 #ifndef _TOKEN_H 19 #define _TOKEN_H 20 21 #include <stdint.h> 22 23 typedef union { 24 double d; 25 char *s; 26 int64_t n; 27 } yylval_t; 28 29 typedef enum { 30 tEOF, 31 tID, 32 tENTITY, 33 tIS, 34 tEND, 35 tGENERIC, 36 tPORT, 37 tCONSTANT, 38 tCOMPONENT, 39 tCONFIGURATION, 40 tARCHITECTURE, 41 tOF, 42 tBEGIN, 43 tFOR, 44 tTYPE, 45 tTO, 46 tALL, 47 tIN, 48 tOUT, 49 tBUFFER, 50 tBUS, 51 tUNAFFECTED, 52 tSIGNAL, 53 tDOWNTO, 54 tPROCESS, 55 tPOSTPONED, 56 tWAIT, 57 tREPORT, 58 tLPAREN, 59 tRPAREN, 60 tSEMI, 61 tASSIGN, 62 tCOLON, 63 tCOMMA, 64 tINT, 65 tSTRING, 66 tERROR, 67 tINOUT, 68 tLINKAGE, 69 tVARIABLE, 70 tIF, 71 tRANGE, 72 tSUBTYPE, 73 tUNITS, 74 tPACKAGE, 75 tLIBRARY, 76 tUSE, 77 tDOT, 78 tNULL, 79 tTICK, 80 tFUNCTION, 81 tIMPURE, 82 tRETURN, 83 tPURE, 84 tARRAY, 85 tBOX, 86 tASSOC, 87 tOTHERS, 88 tASSERT, 89 tSEVERITY, 90 tON, 91 tMAP, 92 tTHEN, 93 tELSE, 94 tELSIF, 95 tBODY, 96 tWHILE, 97 tLOOP, 98 tAFTER, 99 tALIAS, 100 tATTRIBUTE, 101 tPROCEDURE, 102 tEXIT, 103 tNEXT, 104 tWHEN, 105 tCASE, 106 tLABEL, 107 tGROUP, 108 tLITERAL, 109 tBAR, 110 tLSQUARE, 111 tRSQUARE, 112 tINERTIAL, 113 tTRANSPORT, 114 tREJECT, 115 tBITSTRING, 116 tBLOCK, 117 tWITH, 118 tSELECT, 119 tGENERATE, 120 tACCESS, 121 tFILE, 122 tOPEN, 123 tREAL, 124 tUNTIL, 125 tRECORD, 126 tNEW, 127 tSHARED, 128 tAND, 129 tOR, 130 tNAND, 131 tNOR, 132 tXOR, 133 tXNOR, 134 tEQ, 135 tNEQ, 136 tLT, 137 tLE, 138 tGT, 139 tGE, 140 tPLUS, 141 tMINUS, 142 tAMP, 143 tPOWER, 144 tOVER, 145 tSLL, 146 tSRL, 147 tSLA, 148 tSRA, 149 tROL, 150 tROR, 151 tMOD, 152 tREM, 153 tABS, 154 tNOT, 155 tTIMES, 156 tGUARDED, 157 tREVRANGE, 158 tPROTECTED, 159 tCONTEXT, 160 tCONDIF, 161 tCONDELSE, 162 tCONDELSIF, 163 tCONDEND, 164 tCONDERROR, 165 tCONDWARN, 166 tSYNTHOFF, 167 tSYNTHON, 168 tPRAGMA 169 } token_t; 170 171 #endif 172