1 | <?php
|
---|
2 | /*************************************************************************************
|
---|
3 | * qbasic.php
|
---|
4 | * ----------
|
---|
5 | * Author: Nigel McNie ([email protected])
|
---|
6 | * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
|
---|
7 | * Release Version: 1.0.8.8
|
---|
8 | * Date Started: 2004/06/20
|
---|
9 | *
|
---|
10 | * QBasic/QuickBASIC language file for GeSHi.
|
---|
11 | *
|
---|
12 | * CHANGES
|
---|
13 | * -------
|
---|
14 | * 2008/05/23 (1.0.7.22)
|
---|
15 | * - Added description of extra language features (SF#1970248)
|
---|
16 | * 2004/11/27 (1.0.3)
|
---|
17 | * - Added support for multiple object splitters
|
---|
18 | * 2004/10/27 (1.0.2)
|
---|
19 | * - Added support for URLs
|
---|
20 | * 2004/08/05 (1.0.1)
|
---|
21 | * - Added support for symbols
|
---|
22 | * - Removed unnessecary slashes from some keywords
|
---|
23 | * 2004/07/14 (1.0.0)
|
---|
24 | * - First Release
|
---|
25 | *
|
---|
26 | * TODO (updated 2004/11/27)
|
---|
27 | * -------------------------
|
---|
28 | * * Make sure all possible combinations of keywords with
|
---|
29 | * a space in them (EXIT FOR, END SELECT) are added
|
---|
30 | * to the first keyword group
|
---|
31 | * * Update colours, especially for the first keyword group
|
---|
32 | *
|
---|
33 | *************************************************************************************
|
---|
34 | *
|
---|
35 | * This file is part of GeSHi.
|
---|
36 | *
|
---|
37 | * GeSHi is free software; you can redistribute it and/or modify
|
---|
38 | * it under the terms of the GNU General Public License as published by
|
---|
39 | * the Free Software Foundation; either version 2 of the License, or
|
---|
40 | * (at your option) any later version.
|
---|
41 | *
|
---|
42 | * GeSHi is distributed in the hope that it will be useful,
|
---|
43 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
44 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
45 | * GNU General Public License for more details.
|
---|
46 | *
|
---|
47 | * You should have received a copy of the GNU General Public License
|
---|
48 | * along with GeSHi; if not, write to the Free Software
|
---|
49 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
50 | *
|
---|
51 | ************************************************************************************/
|
---|
52 | $language_data = array (
|
---|
53 | 'LANG_NAME' => 'QBasic/QuickBASIC',
|
---|
54 | 'COMMENT_SINGLE' => array(1 => "'"),
|
---|
55 | 'COMMENT_MULTI' => array(),
|
---|
56 | 'COMMENT_REGEXP' => array(
|
---|
57 | //Single-Line Comments using REM command
|
---|
58 | 2 => "/\bREM.*?$/i",
|
---|
59 | //Line numbers
|
---|
60 | 3 => "/^\s*\d+/im"
|
---|
61 | ),
|
---|
62 | 'CASE_KEYWORDS' => GESHI_CAPS_UPPER,
|
---|
63 | 'QUOTEMARKS' => array('"'),
|
---|
64 | 'ESCAPE_CHAR' => '',
|
---|
65 | 'KEYWORDS' => array(
|
---|
66 | 1 => array(
|
---|
67 | 'DO', 'LOOP', 'WHILE', 'WEND', 'THEN', 'ELSE', 'ELSEIF', 'IF',
|
---|
68 | 'FOR', 'TO', 'NEXT', 'STEP', 'GOTO', 'GOSUB', 'CALL', 'CALLS',
|
---|
69 | 'SUB', 'FUNCTION', 'RETURN', 'RESUME', 'SELECT', 'CASE', 'UNTIL'
|
---|
70 | ),
|
---|
71 | 3 => array(
|
---|
72 | 'ABS', 'ABSOLUTE', 'ACCESS', 'ALIAS', 'AND', 'ANY', 'APPEND', 'AS', 'ASC', 'ATN',
|
---|
73 | 'BASE', 'BEEP', 'BINARY', 'BLOAD', 'BSAVE', 'BYVAL',
|
---|
74 | 'CDBL', 'CDECL', 'CHAIN', 'CHDIR', 'CHR$', 'CINT', 'CIRCLE', 'CLEAR',
|
---|
75 | 'CLNG', 'CLOSE', 'CLS', 'COM', 'COMMAND$', 'COMMON', 'CONST', 'COS', 'CSNG',
|
---|
76 | 'CSRLIN', 'CVD', 'CVDMBF', 'CVI', 'CVL', 'CVS', 'CVSMDF', 'DATA', 'DATE$',
|
---|
77 | 'DECLARE', 'DEF', 'FN', 'SEG', 'DEFDBL', 'DEFINT', 'DEFLNG', 'DEFSNG', 'DEFSTR',
|
---|
78 | 'DIM', 'DOUBLE', 'DRAW', 'END', 'ENVIRON', 'ENVIRON$', 'EOF', 'EQV', 'ERASE',
|
---|
79 | 'ERDEV', 'ERDEV$', 'ERL', 'ERR', 'ERROR', 'EXIT', 'EXP', 'FIELD', 'FILEATTR',
|
---|
80 | 'FILES', 'FIX', 'FRE', 'FREEFILE', 'GET', 'HEX$', 'IMP', 'INKEY$',
|
---|
81 | 'INP', 'INPUT', 'INPUT$', 'INSTR', 'INT', 'INTEGER', 'IOCTL', 'IOCTL$', 'IS',
|
---|
82 | 'KEY', 'KILL', 'LBOUND', 'LCASE$', 'LEFT$', 'LEN', 'LET', 'LINE', 'LIST', 'LOC',
|
---|
83 | 'LOCAL', 'LOCATE', 'LOCK', 'LOF', 'LOG', 'LONG', 'LPOS', 'LPRINT',
|
---|
84 | 'LSET', 'LTRIM$', 'MID$', 'MKD$', 'MKDIR', 'MKDMBF$', 'MKI$', 'MKL$',
|
---|
85 | 'MKS$', 'MKSMBF$', 'MOD', 'NAME', 'NOT', 'OCT$', 'OFF', 'ON', 'PEN', 'PLAY',
|
---|
86 | 'OPEN', 'OPTION', 'OR', 'OUT', 'OUTPUT',
|
---|
87 | 'PAINT', 'PALETTE', 'PCOPY', 'PEEK', 'PMAP', 'POINT', 'POKE', 'POS', 'PRESET',
|
---|
88 | 'PRINT', 'PSET', 'PUT', 'RANDOM', 'RANDOMIZE', 'READ', 'REDIM', 'RESET',
|
---|
89 | 'RESTORE', 'RIGHT$', 'RMDIR', 'RND', 'RSET', 'RTRIM$', 'RUN', 'SADD', 'SCREEN',
|
---|
90 | 'SEEK', 'SETMEM', 'SGN', 'SHARED', 'SHELL', 'SIGNAL', 'SIN', 'SINGLE', 'SLEEP',
|
---|
91 | 'SOUND', 'SPACE$', 'SPC', 'SQR', 'STATIC', 'STICK', 'STOP', 'STR$', 'STRIG',
|
---|
92 | 'STRING', 'STRING$', 'SWAP', 'SYSTEM', 'TAB', 'TAN', 'TIME$', 'TIMER',
|
---|
93 | 'TROFF', 'TRON', 'TYPE', 'UBOUND', 'UCASE$', 'UEVENT', 'UNLOCK', 'USING', 'VAL',
|
---|
94 | 'VARPTR', 'VARPTR$', 'VARSEG', 'VIEW', 'WAIT', 'WIDTH', 'WINDOW', 'WRITE', 'XOR'
|
---|
95 | )
|
---|
96 | ),
|
---|
97 | 'SYMBOLS' => array(
|
---|
98 | '(', ')', ',', '+', '-', '*', '/', '=', '<', '>', '^'
|
---|
99 | ),
|
---|
100 | 'CASE_SENSITIVE' => array(
|
---|
101 | GESHI_COMMENTS => false,
|
---|
102 | 1 => false,
|
---|
103 | 3 => false
|
---|
104 | ),
|
---|
105 | 'STYLES' => array(
|
---|
106 | 'KEYWORDS' => array(
|
---|
107 | 1 => 'color: #a1a100;',
|
---|
108 | 3 => 'color: #000066;'
|
---|
109 | ),
|
---|
110 | 'COMMENTS' => array(
|
---|
111 | 1 => 'color: #808080;',
|
---|
112 | 2 => 'color: #808080;',
|
---|
113 | 3 => 'color: #8080C0;'
|
---|
114 | ),
|
---|
115 | 'BRACKETS' => array(
|
---|
116 | 0 => 'color: #66cc66;'
|
---|
117 | ),
|
---|
118 | 'STRINGS' => array(
|
---|
119 | 0 => 'color: #ff0000;'
|
---|
120 | ),
|
---|
121 | 'NUMBERS' => array(
|
---|
122 | 0 => 'color: #cc66cc;'
|
---|
123 | ),
|
---|
124 | 'METHODS' => array(
|
---|
125 | ),
|
---|
126 | 'SYMBOLS' => array(
|
---|
127 | 0 => 'color: #66cc66;'
|
---|
128 | ),
|
---|
129 | 'ESCAPE_CHAR' => array(
|
---|
130 | 0 => 'color: #000099;'
|
---|
131 | ),
|
---|
132 | 'SCRIPT' => array(
|
---|
133 | ),
|
---|
134 | 'REGEXPS' => array(
|
---|
135 | 1 => 'color: #cc66cc;',
|
---|
136 | 2 => 'color: #339933;'
|
---|
137 | )
|
---|
138 | ),
|
---|
139 | 'URLS' => array(
|
---|
140 | 1 => '',
|
---|
141 | 3 => 'http://www.qbasicnews.com/qboho/qck{FNAMEL}.shtml'
|
---|
142 | ),
|
---|
143 | 'OOLANG' => false,
|
---|
144 | 'OBJECT_SPLITTERS' => array(
|
---|
145 | ),
|
---|
146 | 'REGEXPS' => array(
|
---|
147 | 1 => '&(?:H[0-9a-fA-F]+|O[0-7]+)(?!\w)',
|
---|
148 | 2 => '#[0-9]+(?!\w)'
|
---|
149 | ),
|
---|
150 | 'STRICT_MODE_APPLIES' => GESHI_NEVER,
|
---|
151 | 'SCRIPT_DELIMITERS' => array(
|
---|
152 | ),
|
---|
153 | 'HIGHLIGHT_STRICT_BLOCK' => array(
|
---|
154 | ),
|
---|
155 | 'TAB_WIDTH' => 8
|
---|
156 | );
|
---|
157 |
|
---|
158 | ?> |
---|