Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 306 lines (290 sloc) 8.968 kB
a9461cd initializing repo from version 0.10.2 minus the example files
Julian authored
1 #ifndef INCLUDE_BLASSIC_KEYWORD_H
2 #define INCLUDE_BLASSIC_KEYWORD_H
3
4 // keyword.h
5 // Revision 9-jan-2005
6
7 #include "blassic.h"
8
9 const BlCode
10 keyColon= ':',
11 keyPlus= '+',
12 keyMinus= '-',
13 keyMult= '*',
14 keyDiv= '/',
15 keyDivInt= '\\',
16 keyEqual= '=',
17 keyMinor= '<',
18 keyGreater= '>',
19 keyOpenPar= '(',
20 keyClosePar= ')',
21 keyComma= ',',
22 keySharp= '#',
23 keyPower= '^',
24
25 keyEND= 0x0101,
26 keyLIST= 0x0102,
27 keyREM= 0x0103,
28 keyLOAD= 0x0104,
29 keySAVE= 0x0105,
30 keyNEW= 0x0106,
31 keyEXIT= 0x0107,
32 keyRUN= 0x0108,
33 keyPRINT= 0x0109,
34 keyFOR= 0x010A,
35 keyNEXT= 0x010B,
36 keyTO= 0x010C,
37 keySTEP= 0x010D,
38 keyIF= 0x010E,
39 keyTHEN= 0x010F,
40 keyELSE= 0x0110,
41 keyTRON= 0x0111,
42 keyTROFF= 0x0112,
43 keyLET= 0x0113,
44 keyGOTO= 0x0114,
45 keySTOP= 0x0115,
46 keyCONT= 0x0116,
47 keyCLEAR= 0x0117,
48 keyGOSUB= 0x0118,
49 keyRETURN= 0x0119,
50 keyPOKE= 0x011A,
51 keyDATA= 0x011B,
52 keyREAD= 0x011C,
53 keyRESTORE= 0x011D,
54 keyINPUT= 0x011E,
55 keyLINE= 0x011F,
56 keyRANDOMIZE= 0x0120,
57 keyPLEASE= 0x0121,
58 keyAUTO= 0x0122,
59 keyDIM= 0x0123,
60 keySYSTEM= 0x0124,
61 keyON= 0x0125,
62 keyERROR= 0x0126,
63 keyOPEN= 0x0127,
64 keyCLOSE= 0x0128,
65 keyOUTPUT= 0x0129,
66 keyAS= 0x012A,
67 keyLOCATE= 0x012B,
68 keyCLS= 0x012C,
69 keyAPPEND= 0x012D,
70 keyWRITE= 0x012E,
71 keyMODE= 0x012F,
72 keyMOVE= 0x0130,
73 keyCOLOR= 0x0131,
74 keyGET= 0x0132,
75 keyLABEL= 0x0133,
76 keyDELIMITER= 0x0134,
77 keyREPEAT= 0x0135,
78 keyUNTIL= 0x0136,
79 keyWHILE= 0x0137,
80 keyWEND= 0x0138,
81 keyPLOT= 0x0139,
82 keyPOPEN= 0x013A,
83 keyRESUME= 0x013B,
84 keyDELETE= 0x013C,
85 keyLOCAL= 0x013D,
86 keyRANDOM= 0x013E,
87 keyPUT= 0x013F,
88 keyFIELD= 0x0140,
89 keyLSET= 0x0141,
90 keyRSET= 0x0142,
91 keySOCKET= 0x0143,
92 keyDRAW= 0x0144,
93 keyDEF= 0x0145,
94 keyFN= 0x0146,
95 keyERASE= 0x0147,
96 keySWAP= 0x0148,
97 keySYMBOL= 0x0149,
98 keyZONE= 0x014A,
99 keyPOP= 0x014B,
100 keyNAME= 0x014C,
101 keyKILL= 0x014D,
102 keyFILES= 0x014E,
103 keyPAPER= 0x014F,
104 keyPEN= 0x0150,
105 keySHELL= 0x0151,
106 keyMERGE= 0x0152,
107 keyCHDIR= 0x0153,
108 keyMKDIR= 0x0154,
109 keyRMDIR= 0x0155,
110 keyBREAK= 0x0156,
111 keySYNCHRONIZE= 0x0157,
112 keyPAUSE= 0x0158,
113 keyCHAIN= 0x0159,
114 keySTR= 0x015A,
115 keyREAL= 0x015B,
116 keyENVIRON= 0x015C,
117 keyEDIT= 0x015D,
118 keyDRAWR= 0x015E,
119 keyPLOTR= 0x015F,
120 keyMOVER= 0x0160,
121 keyPOKE16= 0x0161,
122 keyPOKE32= 0x0162,
123 keyRENUM= 0x0163,
124 keyCIRCLE= 0x0164,
125 keyMASK= 0x0165,
126 keyWINDOW= 0x0166,
127 keyGRAPHICS= 0x0167,
128 keyAFTER= 0x0168,
129 keyBEEP= 0x0169,
130 keyDEFINT= 0x016A,
131 keyDEFSTR= 0x016B,
132 keyDEFREAL= 0x016C,
133 keyDEFSNG= 0x016D,
134 keyDEFDBL= 0x016E,
135 keyINK= 0x016F,
136 keySET_TITLE= 0x0170,
137 keyTAG= 0x0171,
138 keyTAGOFF= 0x0172,
139 keyORIGIN= 0x0173,
140 keyDEG= 0x0174,
141 keyRAD= 0x0175,
142 keyINVERSE= 0x0176,
143 keyIF_DEBUG= 0x0177,
144 keyLPRINT= 0x0178,
145 keyLLIST= 0x0179,
146 keyWIDTH= 0x017A,
147 keyBRIGHT= 0x017B,
148 keyBINARY= 0x017C,
149 keyDRAWARC= 0x017D,
150 keyPULL= 0x017E,
151 keyPAINT= 0x017F,
152 keyFREE_MEMORY= 0x0180,
153 keySCROLL= 0x0181,
154 keyZX_PLOT= 0x0182,
155 keyZX_UNPLOT= 0x0183,
156
157 keyMID_S= 0x0201,
158 keyLEFT_S= 0x0202,
159 keyRIGHT_S= 0x0203,
160 keyCHR_S= 0x0204,
161 keyENVIRON_S= 0x0205,
162 keySTRING_S= 0x0206,
163 keyOSFAMILY_S= 0x0207,
164 keyHEX_S= 0x0208,
165 keySPACE_S= 0x0209,
166 keyUPPER_S= 0x020A,
167 keyLOWER_S= 0x020B,
168 keySTR_S= 0x020C,
169 keyOCT_S= 0x020D,
170 keyBIN_S= 0x020E,
171 keyINKEY_S= 0x020F,
172 keyPROGRAMARG_S= 0x0210,
173 keyDATE_S= 0x0211,
174 keyTIME_S= 0x0212,
175 keyINPUT_S= 0x0213,
176 keyMKI_S= 0x0214,
177 keyMKS_S= 0x0215,
178 keyMKD_S= 0x0216,
179 keyMKL_S= 0x0217,
180 keyTRIM_S= 0x0218,
181 keyLTRIM_S= 0x0219,
182 keyRTRIM_S= 0x021A,
183 keyOSNAME_S= 0x021B,
184 keyFINDFIRST_S= 0x021C,
185 keyFINDNEXT_S= 0x021D,
186 keyCOPYCHR_S= 0x021E,
187 keySTRERR_S= 0x021F,
188 keyDEC_S= 0x0220,
189 keyVAL_S= 0x0221,
190 keySCREEN_S= 0x0222,
191 keyMKSMBF_S= 0x0223,
192 keyMKDMBF_S= 0x0224,
193 keyREGEXP_REPLACE_S= 0x0225,
194 keyUCASE_S= 0x0226,
195 keyLCASE_S= 0x0227,
196
197 keyASC= 0x0301,
198 keyLEN= 0x0302,
199 keyPEEK= 0x0303,
200 keyPROGRAMPTR= 0x0304,
201 keyRND= 0x0305,
202 keyINT= 0x0306,
203 keySIN= 0x0307,
204 keyCOS= 0x0308,
205 keyPI= 0x0309,
206 keyTAN= 0x030A,
207 keySQR= 0x030B,
208 keyASIN= 0x030C,
209 keyACOS= 0x030D,
210 keyINSTR= 0x030E,
211 keyATAN= 0x030F,
212 keyABS= 0x0310,
213 keyUSR= 0x0311,
214 keyVAL= 0x0312,
215 keyEOF= 0x0313,
216 keyVARPTR= 0x0314,
217 keySYSVARPTR= 0x0315,
218 keySGN= 0x0316,
219 keyLOG= 0x0317,
220 keyLOG10= 0x0318,
221 keyEXP= 0x0319,
222 keyTIME= 0x031A,
223 keyERR= 0x031B,
224 keyERL= 0x031C,
225 keyCVI= 0x031D,
226 keyCVS= 0x031E,
227 keyCVD= 0x031F,
228 keyCVL= 0x0320,
229 keyMIN= 0x0321,
230 keyMAX= 0x0322,
231 keyCINT= 0x0323,
232 keyFIX= 0x0324,
233 keyXMOUSE= 0x0325,
234 keyYMOUSE= 0x0326,
235 keyXPOS= 0x0327,
236 keyYPOS= 0x0328,
237 keyPEEK16= 0x0329,
238 keyPEEK32= 0x032A,
239 keyRINSTR= 0x032B,
240 keyFIND_FIRST_OF= 0x032C,
241 keyFIND_LAST_OF= 0x032D,
242 keyFIND_FIRST_NOT_OF= 0x032E,
243 keyFIND_LAST_NOT_OF= 0x032F,
244 keySINH= 0x0330,
245 keyCOSH= 0x0331,
246 keyTANH= 0x0332,
247 keyASINH= 0x0333,
248 keyACOSH= 0x0334,
249 keyATANH= 0x0335,
250 keyATAN2= 0x0336,
251 keyTEST= 0x0337,
252 keyTESTR= 0x0338,
253 keyPOS= 0x0339,
254 keyVPOS= 0x033A,
255 keyLOF= 0x033B,
256 keyFREEFILE= 0x033C,
257 keyINKEY= 0x033D,
258 keyROUND= 0x033E,
259 keyCVSMBF= 0x033F,
260 keyCVDMBF= 0x0340,
261 keyREGEXP_INSTR= 0x0341,
262 keyALLOC_MEMORY= 0x0342,
263 keyLOC= 0x0343,
264
265 keyNOT= 0x0401,
266 keyOR= 0x0402,
267 keyAND= 0x0403,
268 keyTAB= 0x0404,
269 keySPC= 0x0405,
270 keyAT= 0x0406,
271 keyXOR= 0x0407,
272 keyMOD= 0x0408,
273 keyUSING= 0x0409,
274
275 keyIDENTIFIER= 0x0601, // Not in program.
276 keyNUMBER= 0x0602, // Not in program.
277 keySTRING= 0x0603, // Not in program.
278 keyDISTINCT= 0x0604,
279 keyMINOREQUAL= 0x0605,
280 keyGREATEREQUAL= 0x0606,
281 keyINTEGER= 0x0607, // Not in program.
282 keyEQUALMINOR= 0x0608,
283 keyEQUALGREATER= 0x0609,
284 keyGREATERMINOR= 0x060A,
285 keyENDLINE= 0x06FF, // Not in program.
286
287 keyMAX_CODE_USED= 0x06FF;
288
289
290 inline bool iskey (unsigned char c)
291 {
292 // Por ahora.
293 return c == '\x01' || c == '\x02' || c == '\x03' ||
294 c == '\x04' || c == '\x06';
295 }
296
297 const BlChar INTEGER_PREFIX= '\x05';
298
299 void excludekeyword (const std::string & str);
300 BlCode keyword (const std::string & str);
301 std::string decodekeyword (BlCode s);
302
303 #endif
304
305 // Fin de keyword.h
Something went wrong with that request. Please try again.