1<?php
2/*************************************************************************************
3 * lb.php
4 * --------
5 * Author: Chris Iverson (cj.no.one@gmail.com)
6 * Copyright: (c) 2010 Chris Iverson
7 * Release Version: 1.0.9.1
8 * Date Started: 2010/07/18
9 *
10 * Liberty BASIC language file for GeSHi.
11 *
12 * CHANGES
13 * -------
14 * 2010/07/22
15 *  -  First Release
16 *
17 * 2010/08/23
18 *  -  Added missing default variables
19 *
20 * TODO (updated 2010/07/20)
21 * -------------------------
22 * Prevent highlighting numbers in handle names(constants beginning with #)
23 * Allow number highlighting after a single period(e.g.  .9 = 0.9, should be
24 *     highlighted
25 * Prevent highlighting keywords within branch labels(within brackets)
26 *
27 *************************************************************************************
28 *
29 *     This file is part of GeSHi.
30 *
31 *   GeSHi is free software; you can redistribute it and/or modify
32 *   it under the terms of the GNU General Public License as published by
33 *   the Free Software Foundation; either version 2 of the License, or
34 *   (at your option) any later version.
35 *
36 *   GeSHi is distributed in the hope that it will be useful,
37 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
38 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
39 *   GNU General Public License for more details.
40 *
41 *   You should have received a copy of the GNU General Public License
42 *   along with GeSHi; if not, write to the Free Software
43 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
44 *
45 ************************************************************************************/
46
47$language_data = array(
48    'LANG_NAME' => 'Liberty BASIC',
49    'COMMENT_SINGLE' => array(1 => '\''),
50    'COMMENT_MULTI' => array(),
51    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
52    'QUOTEMARKS' => array('"'),
53    'ESCAPE_CHAR' => '',
54    'KEYWORDS' => array(
55        1 => array(
56            'and', 'append', 'as', 'beep', 'bmpbutton', 'bmpsave', 'boolean',
57            'button', 'byref', 'call', 'callback', 'calldll', 'callfn', 'case',
58            'checkbox', 'close', 'cls', 'colordialog', 'combobox', 'confirm',
59            'cursor', 'data', 'dialog', 'dim', 'dll', 'do', 'double', 'dump',
60            'dword', 'else', 'end', 'error', 'exit', 'field', 'filedialog',
61            'files', 'fontdialog', 'for', 'function', 'get', 'gettrim',
62            'global', 'gosub', 'goto', 'graphicbox', 'graphics', 'groupbox',
63            'if', 'input', 'kill', 'let', 'line', 'listbox', 'loadbmp',
64            'locate', 'long', 'loop', 'lprint', 'mainwin', 'maphandle', 'menu',
65            'mod', 'name', 'next', 'nomainwin', 'none', 'notice', 'on',
66            'oncomerror', 'or', 'open', 'out', 'output', 'password', 'playmidi',
67            'playwave', 'popupmenu', 'print', 'printerdialog', 'prompt', 'ptr',
68            'put', 'radiobutton', 'random', 'randomize', 'read', 'readjoystick',
69            'redim', 'rem', 'restore', 'resume', 'return', 'run', 'scan',
70            'seek', 'select', 'short', 'sort', 'statictext', 'stop', 'stopmidi',
71            'struct', 'stylebits', 'sub', 'text', 'textbox', 'texteditor',
72            'then', 'timer', 'titlebar', 'to', 'trace', 'ulong', 'unloadbmp',
73            'until', 'ushort', 'void', 'wait', 'window', 'wend', 'while',
74            'word', 'xor'
75            ),
76        2 => array(
77            'abs', 'acs', 'asc', 'asn', 'atn', 'chr$', 'cos', 'date$',
78            'dechex$', 'eof', 'eval', 'eval$', 'exp', 'hbmp', 'hexdec', 'hwnd',
79            'inp', 'input$', 'inputto$', 'instr', 'int', 'left$', 'len', 'lof',
80            'log', 'lower$', 'max', 'midipos', 'mid$', 'min', 'mkdir', 'not',
81            'right$', 'rmdir', 'rnd', 'sin', 'space$', 'sqr', 'str$', 'tab',
82            'tan', 'time$', 'trim$', 'txcount', 'upper$', 'using', 'val',
83            'winstring', 'word$'
84            ),
85        3 => array(
86            'BackgroundColor$', 'Com', 'ComboboxColor$', 'ComError', 'ComErrorNumber',
87            'CommandLine$', 'ComPortNumber', 'DefaultDir$',
88            'DisplayHeight', 'DisplayWidth', 'Drives$', 'Err', 'Err$',
89            'ForegroundColor$', 'Inkey$', 'Joy1x', 'Joy1y', 'Joy1z',
90            'Joy1button1', 'Joy1button2', 'Joy2x', 'Joy2y', 'Joy2z',
91            'Joy2button1', 'Joy2button2', 'ListboxColor$', 'MouseX', 'MouseY', 'Platform$',
92            'PrintCollate', 'PrintCopies', 'PrinterFont$', 'PrinterName$', 'StartupDir$',
93            'TextboxColor$', 'TexteditorColor$', 'Version$', 'WindowHeight',
94            'WindowWidth', 'UpperLeftX', 'UpperLeftY'
95            )
96        ),
97    'SYMBOLS' => array(
98        1 => array(
99            '(', ')', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', ':', ',', '#'
100            )
101        ),
102    'CASE_SENSITIVE' => array(
103        GESHI_COMMENTS => false,
104        1 => false,
105        2 => false,
106        3 => true
107        ),
108    'STYLES' => array(
109        'KEYWORDS' => array(
110            1 => 'color: #0000FF;',
111            2 => 'color: #AD0080;',
112            3 => 'color: #008080;'
113            ),
114        'COMMENTS' => array(
115            1 => 'color: #666666; font-style: italic;',
116            'MULTI' => 'color: #666666; font-style: italic;'
117            ),
118        'ESCAPE_CHAR' => array(
119            0 => 'color: #000099; font-weight: bold;'
120            ),
121        'BRACKETS' => array(
122            0 => 'color: #009900;'
123            ),
124        'STRINGS' => array(
125            0 => 'color: #008000;'
126            ),
127        'NUMBERS' => array(
128            0 => 'color: #FF0000;',
129            ),
130        'METHODS' => array(
131            0 => 'color: #004000;'
132            ),
133        'SYMBOLS' => array(
134            1 => 'color: #339933;'
135            ),
136        'REGEXPS' => array(),
137        'SCRIPT' => array()
138        ),
139    'URLS' => array(
140        1 => '',
141        2 => '',
142        3 => ''
143        ),
144    'OOLANG' => false,
145    'OBJECT_SPLITTERS' => array(),
146    'REGEXPS' => array(),
147    'STRICT_MODE_APPLIES' => GESHI_NEVER,
148    'SCRIPT_DELIMITERS' => array(),
149    'HIGHLIGHT_STRICT_BLOCK' => array(),
150    'PARSER_CONTROL' => array(
151        'KEYWORDS' => array(
152            2 => array(
153                //In LB, the second keyword list is a list of built-in functions,
154                //and their names should not be highlighted unless being used
155                //as a function name.
156                'DISALLOWED_AFTER' => '(?=\s*\()'
157                )
158            )
159        )
160);
161